Commit 2d693130 authored by zhangfeng's avatar zhangfeng

客户端礼品详情优化

parent 45ce2726
package cn.iocoder.yudao.module.reward.controller.app.reward;
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.dto.NodeRespDTO;
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.dal.dataobject.reward.RewardDO;
import cn.iocoder.yudao.module.reward.service.reward.RewardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......
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.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.ArrayList;
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;
/**
* 礼品 Response VO
* @author 系统管理员
*/
* 礼品 Response VO
*
* @author 系统管理员
*/
@Data
@ApiModel("客户端 - 礼品 Response VO")
public class AppRewardBackVO {
......@@ -66,14 +68,14 @@ public class AppRewardBackVO {
@ApiModelProperty(value = "领取方式(1上门领取,2包邮到家,3邮寄到付)")
private String pickMethod;
@ApiModelProperty(value = "领取方式:上门领取")
private String selfPickupZh;
private String selfPickupEn;
@ApiModelProperty(value = "领取方式:包邮到家")
private String sendHomeFreeZh;
private String sendHomeFreeEn;
@ApiModelProperty(value = "领取方式:邮寄到付")
private String sendHomePayZh;
private String sendHomePayEn;
private List<PickMethod> pickMethodList = new ArrayList<>();
@ApiModelProperty(value = "允许兑换次数")
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
private void setPickMethod(AppRewardBackVO appRewardBackVO){
for (String pickMethod : appRewardBackVO.getPickMethod().split(",")) {
if ("1".equals(pickMethod)) {
appRewardBackVO.setSelfPickupZh(DictFrameworkUtils.getDictDataFromCache("way_of_receiving", pickMethod).getLabel());
appRewardBackVO.setSelfPickupEn(DictFrameworkUtils.getDictDataFromCache("way_of_receiving", pickMethod).getLabelEn());
} else if ("2".equals(pickMethod)) {
appRewardBackVO.setSendHomeFreeZh(DictFrameworkUtils.getDictDataFromCache("way_of_receiving", pickMethod).getLabel());
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());
}
AppRewardBackVO.PickMethod pickMethodDict = new AppRewardBackVO.PickMethod();
pickMethodDict.setValue(pickMethod);
pickMethodDict.setLabelZh(DictFrameworkUtils.getDictDataFromCache("way_of_receiving", pickMethod).getLabel());
pickMethodDict.setLabelEn(DictFrameworkUtils.getDictDataFromCache("way_of_receiving", pickMethod).getLabelEn());
appRewardBackVO.getPickMethodList().add(pickMethodDict);
}
}
......
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