Commit 68e948dd authored by zhangfeng's avatar zhangfeng

feat-506,498: 兑换记录列表创建人修改,批量核销提示修改

parent 2efe88a1
......@@ -15,6 +15,7 @@ import cn.iocoder.yudao.module.ecw.api.express.dto.ExpressRespDTO;
import cn.iocoder.yudao.module.member.api.score.MemberUserScoreApi;
import cn.iocoder.yudao.module.member.api.score.dto.MemberUserScoreOperateReqDTO;
import cn.iocoder.yudao.module.member.api.score.dto.ReleationScoreExpireInfoDTO;
import cn.iocoder.yudao.module.member.enums.PlatformTypeEnum;
import cn.iocoder.yudao.module.member.enums.ScoreSourceTypeEnum;
import cn.iocoder.yudao.module.reward.controller.app.redeem.vo.AppRewardRedeemListRespVO;
import cn.iocoder.yudao.module.reward.dal.dataobject.redeem.RewardRedeemDO;
......@@ -80,6 +81,11 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
int start = (reqVO.getPageNo() - 1) * reqVO.getPageSize();
int size = reqVO.getPageSize();
List<RewardRedeemPageRespVO> result = rewardRedeemMapper.pageInfo(start, size, reqVO);
result.forEach(respVO -> {
if (respVO.getEntrance() != PlatformTypeEnum.BACKEND.getValue()) {
respVO.setCreatorName(respVO.getMemberNameZh());
}
});
int total = rewardRedeemMapper.pageCount(reqVO);
return new PageResult<>(result, total, reqVO.getPageSize(), reqVO.getPageNo(), (total + reqVO.getPageSize() - 1) / reqVO.getPageSize());
}
......@@ -159,7 +165,7 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
if (CollectionUtils.isEmpty(request.getIds())) {
throw exception(ErrorCodeConstants.REWARD_REDEEM_NOT_EXIST);
}
List<Long> errorIds = checkBatchVerifyParam(request);
List<String> errorIds = checkBatchVerifyParam(request);
if (CollectionUtils.isNotEmpty(errorIds)) {
throw exception(ErrorCodeConstants.REWARD_REDEEM_BATCH_VERIFY_ERROR, errorIds);
}
......@@ -407,13 +413,13 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
return failedInfoMap;
}
private List<Long> checkBatchVerifyParam(RewardRedeemBatchVerifyReqVO request) {
private List<String> checkBatchVerifyParam(RewardRedeemBatchVerifyReqVO request) {
LambdaUpdateWrapper<RewardRedeemDO> wrapper = Wrappers.lambdaUpdate();
wrapper.in(RewardRedeemDO::getId, request.getIds());
Map<Long, RewardRedeemDO> idRewardRedeemMap = this.list(wrapper).stream()
.collect(Collectors.toMap(RewardRedeemDO::getId, Function.identity(), (c1, c2) -> c1));
return idRewardRedeemMap.keySet().stream().filter(id -> {
RewardRedeemDO rewardRedeemDO = idRewardRedeemMap.get(id);
Map<String, RewardRedeemDO> idRewardRedeemMap = this.list(wrapper).stream()
.collect(Collectors.toMap(RewardRedeemDO::getRedemptionNumber, Function.identity(), (c1, c2) -> c1));
return idRewardRedeemMap.keySet().stream().filter(coder -> {
RewardRedeemDO rewardRedeemDO = idRewardRedeemMap.get(coder);
if (rewardRedeemDO == null) {
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment