From 0753df68b8006b807b1ce384c9b4f3c92f62db87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=AE=E6=A2=A6?= Date: Tue, 22 Aug 2023 15:31:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=8E=B7=E5=8F=96=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E8=AE=B0=E5=BD=95=20=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9userId=20=E7=9A=84=E6=94=AF=E6=8C=81?= =?UTF-8?q?,=E8=8E=B7=E5=8F=96=E7=94=A8=E6=88=B7=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E6=8E=A5=E5=8F=A3=E5=A2=9E=E5=8A=A0=E5=AF=B9?= =?UTF-8?q?userId=E7=9A=84=E6=94=AF=E6=8C=81=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/point/vo/recrod/MemberPointRecordPageReqVO.java | 3 +++ .../admin/signin/vo/record/MemberSignInRecordPageReqVO.java | 3 +++ .../member/service/point/MemberPointRecordServiceImpl.java | 4 ++++ .../member/service/signin/MemberSignInRecordServiceImpl.java | 4 ++++ 4 files changed, 14 insertions(+) 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 705b72ec3..bed2cc5ee 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,6 +15,9 @@ public class MemberPointRecordPageReqVO extends PageParam { @Schema(description = "用户昵称", example = "张三") private String nickname; + @Schema(description = "用户ID", example = "123") + private Long userId; + @Schema(description = "业务类型", example = "1") private Integer bizType; 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 7927c87a7..116c8f600 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,6 +23,9 @@ public class MemberSignInRecordPageReqVO extends PageParam { @Schema(description = "第几天签到", example = "10") private Integer day; + @Schema(description = "用户ID", example = "123") + private Long userId; + @Schema(description = "签到时间") @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; 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 11f67bab3..90ebcab4a 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 @@ -6,6 +6,7 @@ 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; @@ -45,6 +46,9 @@ 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 79708ba5f..202280510 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 @@ -6,6 +6,7 @@ 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.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; @@ -44,6 +45,9 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService } userIds = convertSet(users, MemberUserRespDTO::getId); } + if (pageReqVO.getUserId() != null) { + userIds = Sets.newHashSet(pageReqVO.getUserId()); + } // 分页查询 return signInRecordMapper.selectPage(pageReqVO, userIds); }