mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-25 08:25:07 +08:00
code review:签到记录
This commit is contained in:
@ -34,7 +34,7 @@ public interface ErrorCodeConstants {
|
||||
|
||||
ErrorCode RECORD_NOT_EXISTS = new ErrorCode( 1004005005, "用户积分记录不存在");
|
||||
|
||||
ErrorCode SIGN_IN_RECORD_NOT_EXISTS = new ErrorCode(1004005006, "用户签到积分不存在");
|
||||
ErrorCode SIGN_IN_RECORD_NOT_EXISTS = new ErrorCode(1004005006, "签到记录不存在");
|
||||
|
||||
|
||||
//========== 会员标签 1004006000 ==========
|
||||
|
@ -25,7 +25,7 @@ import java.util.List;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
|
||||
|
||||
@Tag(name = "管理后台 - 用户签到积分")
|
||||
@Tag(name = "管理后台 - 签到记录")
|
||||
@RestController
|
||||
@RequestMapping("/member/point/sign-in-record")
|
||||
@Validated
|
||||
@ -38,7 +38,7 @@ public class MemberSignInRecordController {
|
||||
private MemberUserApi memberUserApi;
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得用户签到积分分页")
|
||||
@Operation(summary = "获得签到记录分页")
|
||||
@PreAuthorize("@ss.hasPermission('point:sign-in-record:query')")
|
||||
public CommonResult<PageResult<MemberSignInRecordRespVO>> getSignInRecordPage(@Valid MemberSignInRecordPageReqVO pageVO) {
|
||||
// 执行分页查询
|
||||
|
@ -11,7 +11,7 @@ import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 用户签到积分分页 Request VO")
|
||||
@Schema(description = "管理后台 - 签到记录分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
|
@ -5,7 +5,7 @@ import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 用户签到积分 Response VO")
|
||||
@Schema(description = "管理后台 - 签到记录 Response VO")
|
||||
@Data
|
||||
public class MemberSignInRecordRespVO {
|
||||
|
||||
|
@ -14,7 +14,7 @@ import java.util.Map;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertMap;
|
||||
|
||||
/**
|
||||
* 用户签到积分 Convert
|
||||
* 签到记录 Convert
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
|
@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
* 用户签到积分 DO
|
||||
* 签到记录 DO
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
|
@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 用户签到积分 Mapper
|
||||
* 签到记录 Mapper
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
|
@ -5,17 +5,17 @@ import cn.iocoder.yudao.module.member.controller.admin.signin.vo.record.MemberSi
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.signin.MemberSignInRecordDO;
|
||||
|
||||
/**
|
||||
* 用户签到积分 Service 接口
|
||||
* 签到记录 Service 接口
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
public interface MemberSignInRecordService {
|
||||
|
||||
/**
|
||||
* 获得用户签到积分分页
|
||||
* 获得签到记录分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 用户签到积分分页
|
||||
* @return 签到记录分页
|
||||
*/
|
||||
PageResult<MemberSignInRecordDO> getSignInRecordPage(MemberSignInRecordPageReqVO pageReqVO);
|
||||
|
||||
|
@ -18,7 +18,7 @@ import java.util.Set;
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
|
||||
|
||||
/**
|
||||
* 用户签到积分 Service 实现类
|
||||
* 签到记录 Service 实现类
|
||||
*
|
||||
* @author 芋道源码
|
||||
*/
|
||||
@ -34,7 +34,7 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService
|
||||
|
||||
@Override
|
||||
public PageResult<MemberSignInRecordDO> getSignInRecordPage(MemberSignInRecordPageReqVO pageReqVO) {
|
||||
// 根据用户昵称查询出用户ids
|
||||
// 根据用户昵称查询出用户 ids
|
||||
Set<Long> userIds = null;
|
||||
if (StringUtils.isNotBlank(pageReqVO.getNickname())) {
|
||||
List<MemberUserRespDTO> users = memberUserApi.getUserListByNickname(pageReqVO.getNickname());
|
||||
@ -44,6 +44,7 @@ public class MemberSignInRecordServiceImpl implements MemberSignInRecordService
|
||||
}
|
||||
userIds = convertSet(users, MemberUserRespDTO::getId);
|
||||
}
|
||||
// 分页查询
|
||||
return signInRecordMapper.selectPage(pageReqVO, userIds);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user