Commit e065ae6d authored by zhangfeng's avatar zhangfeng

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

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