Commit d4222bd9 authored by zhangfeng's avatar zhangfeng

Merge branch 'refs/heads/feature_member_score_zhangfeng' into feature_member_score

parents 447ba62c 2c380f55
package cn.iocoder.yudao.module.member.controller.app.scoreRule.vo;
import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleShareExtraVO;
import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRulerRecommendExtraVO;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -17,6 +16,7 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel("客户端 - 积分规则详细信息 Response VO")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AppScoreRuleBackDetailVO extends AppScoreRuleListBackVO {
@ApiModelProperty(value = "单次获取积分数")
private Integer getScoreOnce;
......@@ -30,10 +30,4 @@ public class AppScoreRuleBackDetailVO extends AppScoreRuleListBackVO {
private Date endTime;
@ApiModelProperty(value = "积分有效期")
private Integer scorePeriod;
//@ApiModelProperty(value = "扩展字段原始")
//private String extra;
//@ApiModelProperty(value = "订单V值扩展字段")
//private ScoreRuleOrderVExtraVO extraOrderV;
//@ApiModelProperty(value = "注册扩展字段")
//private ScoreRuleRegisterExtraVO extraRegister;
}
package cn.iocoder.yudao.module.member.controller.app.scoreRule.vo;
import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleOrderVExtraVO;
import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRuleShareExtraVO;
import cn.iocoder.yudao.module.member.vo.scoreRule.extra.ScoreRulerRecommendExtraVO;
import io.swagger.annotations.ApiModel;
......@@ -47,4 +48,6 @@ public class AppScoreRuleListBackVO {
private ScoreRulerRecommendExtraVO extraRecommend;
@ApiModelProperty(value = "分享扩展字段")
private ScoreRuleShareExtraVO extraShare;
@ApiModelProperty(value = "订单V值扩展字段")
private ScoreRuleOrderVExtraVO extraOrderV;
}
......@@ -156,8 +156,8 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
if (rewardDO.getQuantityRemain() < rewardCount) {
throw exception(REWARD_COUNT_NOT_ENOUGH);
}
reward.setExchangeCount(reward.getExchangeCount() + 1);
reward.setQuantityRemain(reward.getQuantityRemain() - rewardCount);
reward.setExchangeCount(rewardDO.getExchangeCount() + 1);
reward.setQuantityRemain(rewardDO.getQuantityRemain() - rewardCount);
rewardMapper.updateById(reward);
}
......
......@@ -318,6 +318,7 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
@Override
public List<AppRewardRedeemListRespVO> recordList(Long memberId) {
List<RewardRedeemDO> rewardRedeemDOList = rewardRedeemMapper.selectList("member_id", memberId);
// 获得兑换记录列表,并根据时间倒序
return rewardRedeemDOList.stream().map(rewardRedeemDO -> {
RewardDO rewardDO = rewardService.getById(rewardRedeemDO.getRewardId());
return AppRewardRedeemListRespVO.builder()
......@@ -332,7 +333,7 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
.rewardCount(rewardRedeemDO.getRewardCount())
.scoreCount(rewardRedeemDO.getScoreCount())
.build();
}).collect(Collectors.toList());
}).sorted(Comparator.comparing(AppRewardRedeemListRespVO::getCreateTime).reversed()).collect(Collectors.toList());
}
private Map<String, String> validate(List<RedeemInfoImportExcelVO> dataList, Map<String, CurrencyRespDTO> titleZhCurrencyMap,
......
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