Commit e065ae6d authored by zhangfeng's avatar zhangfeng

feat-492: 客户端兑换日志列表新增兑换状态显示

parent 9f7a3655
......@@ -31,8 +31,6 @@ public class AppRewardRedeemListRespVO {
private String rewardTitleZh;
@ApiModelProperty(value = "礼品名称(英文)")
private String rewardTitleEn;
@ApiModelProperty(value = "礼品名称(法文)")
private String rewardTitleFr;
@ApiModelProperty(value = "中文礼品图片")
private String imgZh;
@ApiModelProperty(value = "英文礼品图片")
......@@ -44,4 +42,10 @@ public class AppRewardRedeemListRespVO {
@ApiModelProperty(value = "日志时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private Date createTime;
@ApiModelProperty(value = "兑换状态")
private Integer status;
@ApiModelProperty(value = "兑换状态中文")
private String statusZh;
@ApiModelProperty(value = "兑换状态英文")
private String statusEn;
}
......@@ -322,18 +322,21 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
// 获得兑换记录列表,并根据时间倒序
return rewardRedeemDOList.stream().map(rewardRedeemDO -> {
RewardDO rewardDO = rewardService.getById(rewardRedeemDO.getRewardId());
String status = rewardRedeemDO.getStatus().toString();
return AppRewardRedeemListRespVO.builder()
.id(rewardRedeemDO.getId())
.redemptionNumber(rewardRedeemDO.getRedemptionNumber())
.createTime(rewardRedeemDO.getCreateTime())
.rewardCode(rewardRedeemDO.getRewardId())
.rewardTitleEn(rewardDO.getTitleEn())
.rewardTitleFr(rewardDO.getTitleFr())
.rewardTitleZh(rewardDO.getTitleZh())
.imgZh(rewardDO.getImgZh())
.imgEn(rewardDO.getImgEn())
.rewardCount(rewardRedeemDO.getRewardCount())
.scoreCount(rewardRedeemDO.getScoreCount())
.status(rewardRedeemDO.getStatus())
.statusEn(DictFrameworkUtils.getDictDataFromCache("reward_redeem_status", status).getLabelEn())
.statusZh(DictFrameworkUtils.getDictDataFromCache("reward_redeem_status", status).getLabel())
.build();
}).sorted(Comparator.comparing(AppRewardRedeemListRespVO::getCreateTime).reversed()).collect(Collectors.toList());
}
......
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