Commit da4a1023 authored by zhangfeng's avatar zhangfeng

Merge branch 'refs/heads/feature_member_score_zhangfeng' into feature_member_score

parents 38a08d01 2d693130
package cn.iocoder.yudao.module.reward.controller.app.reward; package cn.iocoder.yudao.module.reward.controller.app.reward;
import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.dict.core.util.DictFrameworkUtils;
import cn.iocoder.yudao.module.ecw.api.node.NodeApi; import cn.iocoder.yudao.module.ecw.api.node.NodeApi;
import cn.iocoder.yudao.module.ecw.api.node.dto.NodeRespDTO;
import cn.iocoder.yudao.module.reward.controller.app.reward.vo.AppRewardBackVO; import cn.iocoder.yudao.module.reward.controller.app.reward.vo.AppRewardBackVO;
import cn.iocoder.yudao.module.reward.controller.app.reward.vo.AppRewardListReqVO; import cn.iocoder.yudao.module.reward.controller.app.reward.vo.AppRewardListReqVO;
import cn.iocoder.yudao.module.reward.dal.dataobject.reward.RewardDO;
import cn.iocoder.yudao.module.reward.service.reward.RewardService; import cn.iocoder.yudao.module.reward.service.reward.RewardService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
......
package cn.iocoder.yudao.module.reward.controller.app.reward.vo; package cn.iocoder.yudao.module.reward.controller.app.reward.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
/** /**
* 礼品 Response VO * 礼品 Response VO
* @author 系统管理员 *
*/ * @author 系统管理员
*/
@Data @Data
@ApiModel("客户端 - 礼品 Response VO") @ApiModel("客户端 - 礼品 Response VO")
public class AppRewardBackVO { public class AppRewardBackVO {
...@@ -66,14 +68,14 @@ public class AppRewardBackVO { ...@@ -66,14 +68,14 @@ public class AppRewardBackVO {
@ApiModelProperty(value = "领取方式(1上门领取,2包邮到家,3邮寄到付)") @ApiModelProperty(value = "领取方式(1上门领取,2包邮到家,3邮寄到付)")
private String pickMethod; private String pickMethod;
@ApiModelProperty(value = "领取方式:上门领取") @ApiModelProperty(value = "领取方式:上门领取")
private String selfPickupZh; private List<PickMethod> pickMethodList = new ArrayList<>();
private String selfPickupEn;
@ApiModelProperty(value = "领取方式:包邮到家")
private String sendHomeFreeZh;
private String sendHomeFreeEn;
@ApiModelProperty(value = "领取方式:邮寄到付")
private String sendHomePayZh;
private String sendHomePayEn;
@ApiModelProperty(value = "允许兑换次数") @ApiModelProperty(value = "允许兑换次数")
private Integer allowCount; private Integer allowCount;
@Data
public static class PickMethod {
private String value;
private String labelZh;
private String labelEn;
}
} }
...@@ -363,16 +363,11 @@ public class RewardServiceImpl extends AbstractService<RewardMapper, RewardDO> i ...@@ -363,16 +363,11 @@ public class RewardServiceImpl extends AbstractService<RewardMapper, RewardDO> i
private void setPickMethod(AppRewardBackVO appRewardBackVO){ private void setPickMethod(AppRewardBackVO appRewardBackVO){
for (String pickMethod : appRewardBackVO.getPickMethod().split(",")) { for (String pickMethod : appRewardBackVO.getPickMethod().split(",")) {
if ("1".equals(pickMethod)) { AppRewardBackVO.PickMethod pickMethodDict = new AppRewardBackVO.PickMethod();
appRewardBackVO.setSelfPickupZh(DictFrameworkUtils.getDictDataFromCache("way_of_receiving", pickMethod).getLabel()); pickMethodDict.setValue(pickMethod);
appRewardBackVO.setSelfPickupEn(DictFrameworkUtils.getDictDataFromCache("way_of_receiving", pickMethod).getLabelEn()); pickMethodDict.setLabelZh(DictFrameworkUtils.getDictDataFromCache("way_of_receiving", pickMethod).getLabel());
} else if ("2".equals(pickMethod)) { pickMethodDict.setLabelEn(DictFrameworkUtils.getDictDataFromCache("way_of_receiving", pickMethod).getLabelEn());
appRewardBackVO.setSendHomeFreeZh(DictFrameworkUtils.getDictDataFromCache("way_of_receiving", pickMethod).getLabel()); appRewardBackVO.getPickMethodList().add(pickMethodDict);
appRewardBackVO.setSendHomeFreeEn(DictFrameworkUtils.getDictDataFromCache("way_of_receiving", pickMethod).getLabelEn());
} else if ("3".equals(pickMethod)) {
appRewardBackVO.setSendHomePayZh(DictFrameworkUtils.getDictDataFromCache("way_of_receiving", pickMethod).getLabel());
appRewardBackVO.setSendHomePayEn(DictFrameworkUtils.getDictDataFromCache("way_of_receiving", pickMethod).getLabelEn());
}
} }
} }
......
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