Commit a83c156bf1ba8fe4dac696cc717449383c51c215

Authored by YunaiV
1 parent c5e85f3b

code review:签到记录

sql/mysql/ruoyi-vue-pro.sql
@@ -1648,7 +1648,7 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i @@ -1648,7 +1648,7 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i
1648 INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2287, '积分记录', '', 2, 1, 2299, 'record', '', 'member/point/record/index', 'PointRecord', 0, b'1', b'1', b'1', '', '2023-06-10 04:18:50', '1', '2023-06-27 22:51:07', b'0'); 1648 INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2287, '积分记录', '', 2, 1, 2299, 'record', '', 'member/point/record/index', 'PointRecord', 0, b'1', b'1', b'1', '', '2023-06-10 04:18:50', '1', '2023-06-27 22:51:07', b'0');
1649 INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2288, '用户积分记录查询', 'member:point:record:query', 3, 1, 2287, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-06-10 04:18:50', '', '2023-06-10 04:18:50', b'0'); 1649 INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2288, '用户积分记录查询', 'member:point:record:query', 3, 1, 2287, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-06-10 04:18:50', '', '2023-06-10 04:18:50', b'0');
1650 INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2293, '签到记录', '', 2, 3, 2300, 'sign-in-record', '', 'member/signin/record/index', 'SignInRecord', 0, b'1', b'1', b'1', '', '2023-06-10 04:48:22', '1', '2023-07-02 15:04:10', b'0'); 1650 INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2293, '签到记录', '', 2, 3, 2300, 'sign-in-record', '', 'member/signin/record/index', 'SignInRecord', 0, b'1', b'1', b'1', '', '2023-06-10 04:48:22', '1', '2023-07-02 15:04:10', b'0');
1651 -INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2294, '用户签到积分查询', 'member:point:sign-in-record:query', 3, 1, 2293, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-06-10 04:48:22', '', '2023-06-10 04:48:22', b'0'); 1651 +INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2294, '签到记录查询', 'member:point:sign-in-record:query', 3, 1, 2293, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-06-10 04:48:22', '', '2023-06-10 04:48:22', b'0');
1652 INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2299, '会员积分', '', 1, 1, 2262, 'point', '', '', '', 0, b'1', b'1', b'1', '1', '2023-06-27 22:48:51', '1', '2023-06-27 22:48:51', b'0'); 1652 INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2299, '会员积分', '', 1, 1, 2262, 'point', '', '', '', 0, b'1', b'1', b'1', '1', '2023-06-27 22:48:51', '1', '2023-06-27 22:48:51', b'0');
1653 INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2300, '会员签到', '', 1, 2, 2262, 'signin', '', '', '', 0, b'1', b'1', b'1', '1', '2023-06-27 22:49:53', '1', '2023-06-27 22:49:53', b'0'); 1653 INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2300, '会员签到', '', 1, 2, 2262, 'signin', '', '', '', 0, b'1', b'1', b'1', '1', '2023-06-27 22:49:53', '1', '2023-06-27 22:49:53', b'0');
1654 INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2301, '回调通知', '', 2, 4, 1117, 'notify', 'example', 'pay/notify/index', 'PayNotify', 0, b'1', b'1', b'1', '', '2023-07-20 04:41:32', '1', '2023-07-20 13:45:08', b'0'); 1654 INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2301, '回调通知', '', 2, 4, 1117, 'notify', 'example', 'pay/notify/index', 'PayNotify', 0, b'1', b'1', b'1', '', '2023-07-20 04:41:32', '1', '2023-07-20 13:45:08', b'0');
yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/ErrorCodeConstants.java
@@ -34,7 +34,7 @@ public interface ErrorCodeConstants { @@ -34,7 +34,7 @@ public interface ErrorCodeConstants {
34 34
35 ErrorCode RECORD_NOT_EXISTS = new ErrorCode( 1004005005, "用户积分记录不存在"); 35 ErrorCode RECORD_NOT_EXISTS = new ErrorCode( 1004005005, "用户积分记录不存在");
36 36
37 - ErrorCode SIGN_IN_RECORD_NOT_EXISTS = new ErrorCode(1004005006, "用户签到积分不存在"); 37 + ErrorCode SIGN_IN_RECORD_NOT_EXISTS = new ErrorCode(1004005006, "签到记录不存在");
38 38
39 39
40 //========== 会员标签 1004006000 ========== 40 //========== 会员标签 1004006000 ==========
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/MemberSignInRecordController.java
@@ -25,7 +25,7 @@ import java.util.List; @@ -25,7 +25,7 @@ import java.util.List;
25 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; 25 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
26 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; 26 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
27 27
28 -@Tag(name = "管理后台 - 用户签到积分") 28 +@Tag(name = "管理后台 - 签到记录")
29 @RestController 29 @RestController
30 @RequestMapping("/member/point/sign-in-record") 30 @RequestMapping("/member/point/sign-in-record")
31 @Validated 31 @Validated
@@ -38,7 +38,7 @@ public class MemberSignInRecordController { @@ -38,7 +38,7 @@ public class MemberSignInRecordController {
38 private MemberUserApi memberUserApi; 38 private MemberUserApi memberUserApi;
39 39
40 @GetMapping("/page") 40 @GetMapping("/page")
41 - @Operation(summary = "获得用户签到积分分页") 41 + @Operation(summary = "获得签到记录分页")
42 @PreAuthorize("@ss.hasPermission('point:sign-in-record:query')") 42 @PreAuthorize("@ss.hasPermission('point:sign-in-record:query')")
43 public CommonResult<PageResult<MemberSignInRecordRespVO>> getSignInRecordPage(@Valid MemberSignInRecordPageReqVO pageVO) { 43 public CommonResult<PageResult<MemberSignInRecordRespVO>> getSignInRecordPage(@Valid MemberSignInRecordPageReqVO pageVO) {
44 // 执行分页查询 44 // 执行分页查询
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/record/MemberSignInRecordPageReqVO.java
@@ -11,7 +11,7 @@ import java.time.LocalDateTime; @@ -11,7 +11,7 @@ import java.time.LocalDateTime;
11 11
12 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; 12 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
13 13
14 -@Schema(description = "管理后台 - 用户签到积分分页 Request VO") 14 +@Schema(description = "管理后台 - 签到记录分页 Request VO")
15 @Data 15 @Data
16 @EqualsAndHashCode(callSuper = true) 16 @EqualsAndHashCode(callSuper = true)
17 @ToString(callSuper = true) 17 @ToString(callSuper = true)
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/record/MemberSignInRecordRespVO.java
@@ -5,7 +5,7 @@ import lombok.Data; @@ -5,7 +5,7 @@ import lombok.Data;
5 5
6 import java.time.LocalDateTime; 6 import java.time.LocalDateTime;
7 7
8 -@Schema(description = "管理后台 - 用户签到积分 Response VO") 8 +@Schema(description = "管理后台 - 签到记录 Response VO")
9 @Data 9 @Data
10 public class MemberSignInRecordRespVO { 10 public class MemberSignInRecordRespVO {
11 11
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/signin/MemberSignInRecordConvert.java
@@ -14,7 +14,7 @@ import java.util.Map; @@ -14,7 +14,7 @@ import java.util.Map;
14 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap; 14 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
15 15
16 /** 16 /**
17 - * 用户签到积分 Convert 17 + * 签到记录 Convert
18 * 18 *
19 * @author 芋道源码 19 * @author 芋道源码
20 */ 20 */
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/signin/MemberSignInRecordDO.java
@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName; @@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
7 import lombok.*; 7 import lombok.*;
8 8
9 /** 9 /**
10 - * 用户签到积分 DO 10 + * 签到记录 DO
11 * 11 *
12 * @author 芋道源码 12 * @author 芋道源码
13 */ 13 */
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/signin/MemberSignInRecordMapper.java
@@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper; @@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
10 import java.util.Set; 10 import java.util.Set;
11 11
12 /** 12 /**
13 - * 用户签到积分 Mapper 13 + * 签到记录 Mapper
14 * 14 *
15 * @author 芋道源码 15 * @author 芋道源码
16 */ 16 */
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordService.java
@@ -5,17 +5,17 @@ import cn.iocoder.yudao.module.member.controller.admin.signin.vo.record.MemberSi @@ -5,17 +5,17 @@ import cn.iocoder.yudao.module.member.controller.admin.signin.vo.record.MemberSi
5 import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO; 5 import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO;
6 6
7 /** 7 /**
8 - * 用户签到积分 Service 接口 8 + * 签到记录 Service 接口
9 * 9 *
10 * @author 芋道源码 10 * @author 芋道源码
11 */ 11 */
12 public interface MemberSignInRecordService { 12 public interface MemberSignInRecordService {
13 13
14 /** 14 /**
15 - * 获得用户签到积分分页 15 + * 获得签到记录分页
16 * 16 *
17 * @param pageReqVO 分页查询 17 * @param pageReqVO 分页查询
18 - * @return 用户签到积分分页 18 + * @return 签到记录分页
19 */ 19 */
20 PageResult<MemberSignInRecordDO> getSignInRecordPage(MemberSignInRecordPageReqVO pageReqVO); 20 PageResult<MemberSignInRecordDO> getSignInRecordPage(MemberSignInRecordPageReqVO pageReqVO);
21 21
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java
@@ -18,7 +18,7 @@ import java.util.Set; @@ -18,7 +18,7 @@ import java.util.Set;
18 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; 18 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
19 19
20 /** 20 /**
21 - * 用户签到积分 Service 实现类 21 + * 签到记录 Service 实现类
22 * 22 *
23 * @author 芋道源码 23 * @author 芋道源码
24 */ 24 */
@@ -34,7 +34,7 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService @@ -34,7 +34,7 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService
34 34
35 @Override 35 @Override
36 public PageResult<MemberSignInRecordDO> getSignInRecordPage(MemberSignInRecordPageReqVO pageReqVO) { 36 public PageResult<MemberSignInRecordDO> getSignInRecordPage(MemberSignInRecordPageReqVO pageReqVO) {
37 - // 根据用户昵称查询出用户ids 37 + // 根据用户昵称查询出用户 ids
38 Set<Long> userIds = null; 38 Set<Long> userIds = null;
39 if (StringUtils.isNotBlank(pageReqVO.getNickname())) { 39 if (StringUtils.isNotBlank(pageReqVO.getNickname())) {
40 List<MemberUserRespDTO> users = memberUserApi.getUserListByNickname(pageReqVO.getNickname()); 40 List<MemberUserRespDTO> users = memberUserApi.getUserListByNickname(pageReqVO.getNickname());
@@ -44,6 +44,7 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService @@ -44,6 +44,7 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService
44 } 44 }
45 userIds = convertSet(users, MemberUserRespDTO::getId); 45 userIds = convertSet(users, MemberUserRespDTO::getId);
46 } 46 }
  47 + // 分页查询
47 return signInRecordMapper.selectPage(pageReqVO, userIds); 48 return signInRecordMapper.selectPage(pageReqVO, userIds);
48 } 49 }
49 50