From 60875a0472acf0102a03b0fe2e642bcbcbb402c7 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 23 Aug 2023 00:48:33 +0800 Subject: [PATCH] =?UTF-8?q?code=20review=EF=BC=9A=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=A7=AF=E5=88=86=E8=AE=B0=E5=BD=95=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E5=AF=B9userId=20=E7=9A=84?= =?UTF-8?q?=E6=94=AF=E6=8C=81,=E8=8E=B7=E5=8F=96=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=AD=BE=E5=88=B0=E8=AE=B0=E5=BD=95=E6=8E=A5=E5=8F=A3=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=AF=B9userId=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/point/vo/recrod/MemberPointRecordPageReqVO.java | 2 +- .../admin/signin/vo/record/MemberSignInRecordPageReqVO.java | 2 +- .../member/dal/mysql/point/MemberPointRecordMapper.java | 1 + .../member/dal/mysql/signin/MemberSignInRecordMapper.java | 1 + .../member/service/point/MemberPointRecordServiceImpl.java | 4 ---- .../member/service/signin/MemberSignInRecordServiceImpl.java | 5 ----- 6 files changed, 4 insertions(+), 11 deletions(-) diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/vo/recrod/MemberPointRecordPageReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/vo/recrod/MemberPointRecordPageReqVO.java index bed2cc5eed..63cc800063 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/vo/recrod/MemberPointRecordPageReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/point/vo/recrod/MemberPointRecordPageReqVO.java @@ -15,7 +15,7 @@ public class MemberPointRecordPageReqVO extends PageParam { @Schema(description = "用户昵称", example = "张三") private String nickname; - @Schema(description = "用户ID", example = "123") + @Schema(description = "用户编号", example = "123") private Long userId; @Schema(description = "业务类型", example = "1") diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/record/MemberSignInRecordPageReqVO.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/record/MemberSignInRecordPageReqVO.java index 116c8f6006..b46712b6e9 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/record/MemberSignInRecordPageReqVO.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/signin/vo/record/MemberSignInRecordPageReqVO.java @@ -23,7 +23,7 @@ public class MemberSignInRecordPageReqVO extends PageParam { @Schema(description = "第几天签到", example = "10") private Integer day; - @Schema(description = "用户ID", example = "123") + @Schema(description = "用户编号", example = "123") private Long userId; @Schema(description = "签到时间") diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/point/MemberPointRecordMapper.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/point/MemberPointRecordMapper.java index 0d1f4aebb6..5c33709296 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/point/MemberPointRecordMapper.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/point/MemberPointRecordMapper.java @@ -21,6 +21,7 @@ public interface MemberPointRecordMapper extends BaseMapperX selectPage(MemberPointRecordPageReqVO reqVO, Set userIds) { return selectPage(reqVO, new LambdaQueryWrapperX() .inIfPresent(MemberPointRecordDO::getUserId, userIds) + .eqIfPresent(MemberPointRecordDO::getUserId, reqVO.getUserId()) .eqIfPresent(MemberPointRecordDO::getBizType, reqVO.getBizType()) .likeIfPresent(MemberPointRecordDO::getTitle, reqVO.getTitle()) .orderByDesc(MemberPointRecordDO::getId)); diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/signin/MemberSignInRecordMapper.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/signin/MemberSignInRecordMapper.java index e78f4d3915..840eeb3281 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/signin/MemberSignInRecordMapper.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/signin/MemberSignInRecordMapper.java @@ -21,6 +21,7 @@ public interface MemberSignInRecordMapper extends BaseMapperX selectPage(MemberSignInRecordPageReqVO reqVO, Set userIds) { return selectPage(reqVO, new LambdaQueryWrapperX() .inIfPresent(MemberSignInRecordDO::getUserId, userIds) + .eqIfPresent(MemberSignInRecordDO::getUserId, reqVO.getUserId()) .eqIfPresent(MemberSignInRecordDO::getDay, reqVO.getDay()) .betweenIfPresent(MemberSignInRecordDO::getCreateTime, reqVO.getCreateTime()) .orderByDesc(MemberSignInRecordDO::getId)); diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordServiceImpl.java index e81f21845c..52257183da 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/point/MemberPointRecordServiceImpl.java @@ -7,7 +7,6 @@ import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; import cn.iocoder.yudao.module.member.controller.admin.point.vo.recrod.MemberPointRecordPageReqVO; import cn.iocoder.yudao.module.member.dal.dataobject.point.MemberPointRecordDO; import cn.iocoder.yudao.module.member.dal.mysql.point.MemberPointRecordMapper; -import com.google.common.collect.Sets; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -47,9 +46,6 @@ public class MemberPointRecordServiceImpl implements MemberPointRecordService { } userIds = convertSet(users, MemberUserRespDTO::getId); } - if (pageReqVO.getUserId() != null) { - userIds = Sets.newHashSet(pageReqVO.getUserId()); - } // 执行查询 return recordMapper.selectPage(pageReqVO, userIds); } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java index 0dd750955f..63c8e9b310 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/service/signin/MemberSignInRecordServiceImpl.java @@ -5,10 +5,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.member.api.user.MemberUserApi; import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO; import cn.iocoder.yudao.module.member.controller.admin.signin.vo.record.MemberSignInRecordPageReqVO; -import cn.iocoder.yudao.module.member.controller.app.signin.vo.record.AppMemberSignInRecordRespVO; import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO; import cn.iocoder.yudao.module.member.dal.mysql.signin.MemberSignInRecordMapper; -import com.google.common.collect.Sets; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -47,9 +45,6 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService } userIds = convertSet(users, MemberUserRespDTO::getId); } - if (pageReqVO.getUserId() != null) { - userIds = Sets.newHashSet(pageReqVO.getUserId()); - } // 分页查询 return signInRecordMapper.selectPage(pageReqVO, userIds); }