!583 调整 获取用户积分记录 和 获取用户签到记录接口 配合前端用户详情页面

Merge pull request !583 from 风狗/会员详情
This commit is contained in:
芋道源码 2023-08-22 16:45:40 +00:00 committed by Gitee
commit 287a17a9ff
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 14 additions and 0 deletions

View File

@ -15,6 +15,9 @@ public class MemberPointRecordPageReqVO extends PageParam {
@Schema(description = "用户昵称", example = "张三") @Schema(description = "用户昵称", example = "张三")
private String nickname; private String nickname;
@Schema(description = "用户ID", example = "123")
private Long userId;
@Schema(description = "业务类型", example = "1") @Schema(description = "业务类型", example = "1")
private Integer bizType; private Integer bizType;

View File

@ -23,6 +23,9 @@ public class MemberSignInRecordPageReqVO extends PageParam {
@Schema(description = "第几天签到", example = "10") @Schema(description = "第几天签到", example = "10")
private Integer day; private Integer day;
@Schema(description = "用户ID", example = "123")
private Long userId;
@Schema(description = "签到时间") @Schema(description = "签到时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime; private LocalDateTime[] createTime;

View File

@ -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.controller.admin.point.vo.recrod.MemberPointRecordPageReqVO;
import cn.iocoder.yudao.module.member.dal.dataobject.point.MemberPointRecordDO; import cn.iocoder.yudao.module.member.dal.dataobject.point.MemberPointRecordDO;
import cn.iocoder.yudao.module.member.dal.mysql.point.MemberPointRecordMapper; import cn.iocoder.yudao.module.member.dal.mysql.point.MemberPointRecordMapper;
import com.google.common.collect.Sets;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
@ -45,6 +46,9 @@ public class MemberPointRecordServiceImpl implements MemberPointRecordService {
} }
userIds = convertSet(users, MemberUserRespDTO::getId); userIds = convertSet(users, MemberUserRespDTO::getId);
} }
if (pageReqVO.getUserId() != null) {
userIds = Sets.newHashSet(pageReqVO.getUserId());
}
// 执行查询 // 执行查询
return recordMapper.selectPage(pageReqVO, userIds); return recordMapper.selectPage(pageReqVO, userIds);
} }

View File

@ -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.controller.admin.signin.vo.record.MemberSignInRecordPageReqVO;
import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO; import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO;
import cn.iocoder.yudao.module.member.dal.mysql.signin.MemberSignInRecordMapper; import cn.iocoder.yudao.module.member.dal.mysql.signin.MemberSignInRecordMapper;
import com.google.common.collect.Sets;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
@ -44,6 +45,9 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService
} }
userIds = convertSet(users, MemberUserRespDTO::getId); userIds = convertSet(users, MemberUserRespDTO::getId);
} }
if (pageReqVO.getUserId() != null) {
userIds = Sets.newHashSet(pageReqVO.getUserId());
}
// 分页查询 // 分页查询
return signInRecordMapper.selectPage(pageReqVO, userIds); return signInRecordMapper.selectPage(pageReqVO, userIds);
} }