Commit cab76bba by 章家宝

fix:门店品牌单独使用一个request实体类,避免用通用DTO

1 parent 74aa82a6
...@@ -35,5 +35,5 @@ public class PerformanceConfigAddRequest extends AbstractRopRequest { ...@@ -35,5 +35,5 @@ public class PerformanceConfigAddRequest extends AbstractRopRequest {
private List<PerformanceParamConfigDTO> paramConfigList; private List<PerformanceParamConfigDTO> paramConfigList;
@ApiModelProperty(name = "merchantBrandRefList", notes = "商户品牌列表") @ApiModelProperty(name = "merchantBrandRefList", notes = "商户品牌列表")
private List<PerformanceConfigMerchantBrandRefDTO> merchantBrandRefList; private List<PerformanceConfigMerchantBrandRefRequest> merchantBrandRefList;
} }
package cn.com.glsx.dj.staff.request.performance;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
*
*
* @time 2026-01-30 13:49
*/
@Data
public class PerformanceConfigMerchantBrandRefRequest implements java.io.Serializable{
@ApiModelProperty(notes = "提成方案配置ID(dj_car_life_performance_config.id)")
private Integer performanceConfigId;
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
@ApiModelProperty(notes = "商户名")
private String merchantName;
@ApiModelProperty(notes = "主品牌id")
private Integer brandId;
@ApiModelProperty(notes = "主品牌名称")
private String brandName;
@ApiModelProperty(notes = "子品牌id")
private Integer childId;
@ApiModelProperty(notes = "子品牌名称")
private String childName;
}
...@@ -5,11 +5,13 @@ import cn.com.glsx.dj.staff.dto.*; ...@@ -5,11 +5,13 @@ import cn.com.glsx.dj.staff.dto.*;
import cn.com.glsx.dj.staff.enums.*; import cn.com.glsx.dj.staff.enums.*;
import cn.com.glsx.dj.staff.remote.performance.PerformanceConfigRemote; import cn.com.glsx.dj.staff.remote.performance.PerformanceConfigRemote;
import cn.com.glsx.dj.staff.request.performance.PerformanceConfigAddRequest; import cn.com.glsx.dj.staff.request.performance.PerformanceConfigAddRequest;
import cn.com.glsx.dj.staff.request.performance.PerformanceConfigMerchantBrandRefRequest;
import cn.com.glsx.dj.staff.util.CommonUtil; import cn.com.glsx.dj.staff.util.CommonUtil;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse; import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.rop.response.RopResponse; import cn.com.glsx.framework.rop.response.RopResponse;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -112,7 +114,17 @@ public class PerformanceConfigService { ...@@ -112,7 +114,17 @@ public class PerformanceConfigService {
} }
performanceConfig.setPerformanceParamConfigs(performanceParamConfigList); performanceConfig.setPerformanceParamConfigs(performanceParamConfigList);
performanceConfig.setPerformanceConfigRule(request.getPerformanceConfigRule()); performanceConfig.setPerformanceConfigRule(request.getPerformanceConfigRule());
performanceConfig.setMerchantBrandModelPageBrands(request.getMerchantBrandRefList()); if (request.getMerchantBrandRefList() == null) {
log.info("门店品牌必传。 ");
return RopResponse.error(RopErrorEnum.PERFORMANCE_SCHEME_REQUIREMENT_PARAM_ERROR, "门店品牌必传");
}
List<PerformanceConfigMerchantBrandRefDTO> merchantBrandRefList = new ArrayList<>();
for (PerformanceConfigMerchantBrandRefRequest performanceConfigMerchantBrandRefRequest : request.getMerchantBrandRefList()) {
PerformanceConfigMerchantBrandRefDTO dto = new PerformanceConfigMerchantBrandRefDTO();
BeanUtils.copyProperties(performanceConfigMerchantBrandRefRequest, dto);
merchantBrandRefList.add(dto);
}
performanceConfig.setMerchantBrandModelPageBrands(merchantBrandRefList);
LoginUserDTO loginUserDTO = CommonUtil.getLoginUser(); LoginUserDTO loginUserDTO = CommonUtil.getLoginUser();
Date curr = new Date(); Date curr = new Date();
assert loginUserDTO != null; assert loginUserDTO != null;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!