Merge #34 into master from cc_20260116_new_field
fix:加盟合同新增字段推送红圈通
* cc_20260116_new_field: (5 commits squashed)
- fix:加盟合同新增字段
- fix:加盟合同新增字段
- Merge branch 'refs/heads/master' into cc_20260116_new_field
# Conflicts:
#	coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java
#	coolstore-partner-service/src/main/java/com/cool/store/service/impl/SignFranchiseServiceImpl.java
- fix:加盟合同新增字段推送红圈通
- Merge branch 'master' into cc_20260116_new_field
# Conflicts:
#	coolstore-partner-model/src/main/java/com/cool/store/entity/ShopInfoDO.java
Signed-off-by: 王非凡 <accounts_67eba0c5fee9c49c80c8e2b4@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/34
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
package com.cool.store.constants;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 字典表常量池
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wangff
|
||||||
|
* @since 2026/1/19
|
||||||
|
*/
|
||||||
|
public class DictConstants {
|
||||||
|
/**
|
||||||
|
* 装修设计要求-统一装修设计
|
||||||
|
*/
|
||||||
|
public static final String DECORATION_REQUIREMENT_UNIFORM = "decoration_requirement_uniform";
|
||||||
|
}
|
||||||
@@ -334,6 +334,7 @@ public enum ErrorCodeEnum {
|
|||||||
WALLET_API_ERROR(1620003,"{0}",null),
|
WALLET_API_ERROR(1620003,"{0}",null),
|
||||||
MINI_PROGRAM_VERSION_TOO_LOW(1620004,"小程序版本过低,请刷新小程序再操作!",null),
|
MINI_PROGRAM_VERSION_TOO_LOW(1620004,"小程序版本过低,请刷新小程序再操作!",null),
|
||||||
CONTRACT_SIGNED(600002, "操作失败,合同签约已完成", null),
|
CONTRACT_SIGNED(600002, "操作失败,合同签约已完成", null),
|
||||||
|
ZXJP_AMOUNT_INSTRUCTION_IS_BLANK(1620005, "鸡排价格不为10元,请填写原因", null),
|
||||||
|
|
||||||
// 171闭店
|
// 171闭店
|
||||||
CLOSE_STORE_SUB_STAGE_ERROR(171002, "当前流程状态异常", null),
|
CLOSE_STORE_SUB_STAGE_ERROR(171002, "当前流程状态异常", null),
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package com.cool.store.enums.HqtEnum;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 红圈通装修等级枚举类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wangff
|
||||||
|
* @since 2026/1/19
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum HqtDecorationLevelEnum {
|
||||||
|
OPTION713("option713", "旗舰店", "decoration_level_flagship_store"),
|
||||||
|
OPTION714("option714", "A标店", "decoration_level_a_standard"),
|
||||||
|
OPTION715("option715", "标准店", "decoration_level_standard_store"),
|
||||||
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 红圈通编码
|
||||||
|
*/
|
||||||
|
private final String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private final String msg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典项编码
|
||||||
|
*/
|
||||||
|
private final String columnCode;
|
||||||
|
|
||||||
|
public static HqtDecorationLevelEnum getByColumnCode(String columnCode) {
|
||||||
|
for (HqtDecorationLevelEnum value : HqtDecorationLevelEnum.values()) {
|
||||||
|
if (value.columnCode.equals(columnCode)) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.cool.store.enums.HqtEnum;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 红圈通装修设计要求枚举类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wangff
|
||||||
|
* @since 2026/1/19
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum HqtDecorationReqEnum {
|
||||||
|
|
||||||
|
OPTION716("option716", "统一装修设计", "decoration_requirement_uniform"),
|
||||||
|
OPTION717("option717", "设备减少", "decoration_requirement_equipment"),
|
||||||
|
OPTION718("option718", "其他", "decoration_requirement_other"),
|
||||||
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 红圈通编码
|
||||||
|
*/
|
||||||
|
private final String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private final String msg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 字典项编码
|
||||||
|
*/
|
||||||
|
private final String columnCode;
|
||||||
|
|
||||||
|
public static HqtDecorationReqEnum getByColumnCode(String columnCode) {
|
||||||
|
for (HqtDecorationReqEnum value : HqtDecorationReqEnum.values()) {
|
||||||
|
if (value.columnCode.equals(columnCode)) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package com.cool.store.enums.HqtEnum;
|
||||||
|
|
||||||
|
import com.cool.store.enums.StoreTypeEnum;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 红圈通门店类型枚举类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author wangff
|
||||||
|
* @since 2026/1/19
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum HqtStoreTypeEnum {
|
||||||
|
OPTION710("option710", "无展示门店", StoreTypeEnum.NO_SHOW_STORE),
|
||||||
|
OPTION711("option711", "餐厅店", StoreTypeEnum.RESTAURANT_STORE),
|
||||||
|
OPTION712("option712", "普通门店", StoreTypeEnum.ORDINARY_STORE),
|
||||||
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 红圈通编码
|
||||||
|
*/
|
||||||
|
private final String code;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private final String msg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店类型
|
||||||
|
*/
|
||||||
|
private final StoreTypeEnum type;
|
||||||
|
|
||||||
|
public static HqtStoreTypeEnum getByStoreType(Integer type) {
|
||||||
|
for (HqtStoreTypeEnum value : HqtStoreTypeEnum.values()) {
|
||||||
|
if (value.type.getCode().equals(type)) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -173,4 +173,34 @@ public class ShopInfoDO {
|
|||||||
|
|
||||||
@Column(name = "actual_open_date")
|
@Column(name = "actual_open_date")
|
||||||
private Date actualOpenDate;
|
private Date actualOpenDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 鸡排价格
|
||||||
|
*/
|
||||||
|
@Column(name = "chicken_amount")
|
||||||
|
private BigDecimal chickenAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 其他价格原因说明
|
||||||
|
*/
|
||||||
|
@Column(name = "chicken_instruction")
|
||||||
|
private String chickenInstruction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装修等级
|
||||||
|
*/
|
||||||
|
@Column(name = "decoration_level")
|
||||||
|
private String decorationLevel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装修设计要求
|
||||||
|
*/
|
||||||
|
@Column(name = "decoration_requirement")
|
||||||
|
private String decorationRequirement;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 特殊情况说明
|
||||||
|
*/
|
||||||
|
@Column(name = "special_instruction")
|
||||||
|
private String specialInstruction;
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,7 @@ import lombok.Data;
|
|||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@@ -233,7 +234,20 @@ public class AddSignFranchiseRequest {
|
|||||||
@ApiModelProperty("合同使用年限")
|
@ApiModelProperty("合同使用年限")
|
||||||
private Integer contractServiceLife;
|
private Integer contractServiceLife;
|
||||||
|
|
||||||
|
@ApiModelProperty("鸡排价格")
|
||||||
|
private BigDecimal chickenAmount;
|
||||||
|
|
||||||
|
@ApiModelProperty("其他价格原因说明")
|
||||||
|
private String chickenInstruction;
|
||||||
|
|
||||||
|
@ApiModelProperty("装修等级,字典表decoration_level")
|
||||||
|
private String decorationLevel;
|
||||||
|
|
||||||
|
@ApiModelProperty("装修设计要求,字典表decoration_requirement")
|
||||||
|
private String decorationRequirement;
|
||||||
|
|
||||||
|
@ApiModelProperty("特殊情况说明")
|
||||||
|
private String specialInstruction;
|
||||||
|
|
||||||
|
|
||||||
public SignFranchiseDO toSignFranchiseDO() {
|
public SignFranchiseDO toSignFranchiseDO() {
|
||||||
|
|||||||
@@ -38,6 +38,14 @@ public class HqtBuildRequest {
|
|||||||
private Integer isPayDesignFee;
|
private Integer isPayDesignFee;
|
||||||
//加盟品牌
|
//加盟品牌
|
||||||
private Integer franchiseBrand;
|
private Integer franchiseBrand;
|
||||||
|
// 装修等级
|
||||||
|
private String decorationLevel;
|
||||||
|
// 装修设计要求
|
||||||
|
private String decorationRequirement;
|
||||||
|
// 特殊情况说明
|
||||||
|
private String specialInstruction;
|
||||||
|
// 门店类型
|
||||||
|
private Integer storeType;
|
||||||
|
|
||||||
//招商所属区域
|
//招商所属区域
|
||||||
private String investRegionName;
|
private String investRegionName;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.cool.store.request.hqt;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class HqtBuildAPIRequest {
|
public class HqtBuildAPIRequest {
|
||||||
@@ -114,6 +115,30 @@ public class HqtBuildAPIRequest {
|
|||||||
@JsonProperty("负责人邮箱")
|
@JsonProperty("负责人邮箱")
|
||||||
private String field191__c;
|
private String field191__c;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 特殊情况说明
|
||||||
|
*/
|
||||||
|
@JsonProperty("field195__c")
|
||||||
|
private String field195__c;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装修设计要求
|
||||||
|
*/
|
||||||
|
@JsonProperty("field194__c")
|
||||||
|
private Field8__c field194__c;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 装修等级
|
||||||
|
*/
|
||||||
|
@JsonProperty("field193__c")
|
||||||
|
private Field8__c field193__c;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 门店类型
|
||||||
|
*/
|
||||||
|
@JsonProperty("field192__c")
|
||||||
|
private Field8__c field192__c;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public static class Field124__c {
|
public static class Field124__c {
|
||||||
/**
|
/**
|
||||||
@@ -220,6 +245,7 @@ public class HqtBuildAPIRequest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
public static class Field8__c {
|
public static class Field8__c {
|
||||||
@JsonProperty("defaultItem")
|
@JsonProperty("defaultItem")
|
||||||
/**
|
/**
|
||||||
@@ -246,6 +272,12 @@ public class HqtBuildAPIRequest {
|
|||||||
*/
|
*/
|
||||||
@JsonProperty("name")
|
@JsonProperty("name")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
public Field8__c(String code, String label) {
|
||||||
|
this.id = code;
|
||||||
|
this.name = code;
|
||||||
|
this.label = label;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.response;
|
package com.cool.store.response;
|
||||||
|
|
||||||
|
import com.cool.store.annotation.DictField;
|
||||||
import com.cool.store.dto.PartnerBankInfoDTO;
|
import com.cool.store.dto.PartnerBankInfoDTO;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@@ -8,6 +9,7 @@ import lombok.Data;
|
|||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -332,4 +334,27 @@ public class AddSignFranchiseResponse {
|
|||||||
|
|
||||||
@Column(name = "contract_service_life")
|
@Column(name = "contract_service_life")
|
||||||
private Integer contractServiceLife;
|
private Integer contractServiceLife;
|
||||||
|
|
||||||
|
@ApiModelProperty("鸡排价格")
|
||||||
|
private BigDecimal chickenAmount;
|
||||||
|
|
||||||
|
@ApiModelProperty("其他价格原因说明")
|
||||||
|
private String chickenInstruction;
|
||||||
|
|
||||||
|
@ApiModelProperty("装修等级")
|
||||||
|
private String decorationLevel;
|
||||||
|
|
||||||
|
@ApiModelProperty("装修等级名称")
|
||||||
|
@DictField
|
||||||
|
private String decorationLevelName;
|
||||||
|
|
||||||
|
@ApiModelProperty("装修设计要求")
|
||||||
|
private String decorationRequirement;
|
||||||
|
|
||||||
|
@ApiModelProperty("装修设计要求名称")
|
||||||
|
@DictField
|
||||||
|
private String decorationRequirementName;
|
||||||
|
|
||||||
|
@ApiModelProperty("特殊情况说明")
|
||||||
|
private String specialInstruction;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ import com.cool.store.dto.HqtTokenDTO;
|
|||||||
import com.cool.store.entity.BigRegionDO;
|
import com.cool.store.entity.BigRegionDO;
|
||||||
import com.cool.store.entity.ShopInfoDO;
|
import com.cool.store.entity.ShopInfoDO;
|
||||||
import com.cool.store.enums.*;
|
import com.cool.store.enums.*;
|
||||||
import com.cool.store.enums.HqtEnum.HqtShopDecorationAttributesEnum;
|
import com.cool.store.enums.HqtEnum.*;
|
||||||
import com.cool.store.enums.HqtEnum.HqtSignFeeEnum;
|
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.request.ConfirmQuotationRequest;
|
import com.cool.store.request.ConfirmQuotationRequest;
|
||||||
import com.cool.store.request.HqtBuildRequest;
|
import com.cool.store.request.HqtBuildRequest;
|
||||||
@@ -16,12 +15,10 @@ import com.cool.store.request.HqtPartnerAcceptanceRequest;
|
|||||||
import com.cool.store.request.hqt.*;
|
import com.cool.store.request.hqt.*;
|
||||||
import com.cool.store.response.HqtAPIResponse;
|
import com.cool.store.response.HqtAPIResponse;
|
||||||
import com.cool.store.service.HqtAPIService;
|
import com.cool.store.service.HqtAPIService;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import okhttp3.*;
|
import okhttp3.*;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -29,6 +26,7 @@ import java.nio.charset.StandardCharsets;
|
|||||||
import java.util.Base64;
|
import java.util.Base64;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: WangShuo
|
* @Author: WangShuo
|
||||||
@@ -80,6 +78,23 @@ public class HqtAPIServiceImpl implements HqtAPIService {
|
|||||||
|
|
||||||
HqtBuildAPIRequest hqtBuildAPIRequest = new HqtBuildAPIRequest();
|
HqtBuildAPIRequest hqtBuildAPIRequest = new HqtBuildAPIRequest();
|
||||||
getHqtBuildAPIRequest(request, hqtBuildAPIRequest, field13__c, field124__c, field8__c, field123__c);
|
getHqtBuildAPIRequest(request, hqtBuildAPIRequest, field13__c, field124__c, field8__c, field123__c);
|
||||||
|
// 特殊情况说明
|
||||||
|
hqtBuildAPIRequest.setField195__c(request.getSpecialInstruction());
|
||||||
|
// 装修设计要求
|
||||||
|
HqtDecorationReqEnum decorationRequirement = HqtDecorationReqEnum.getByColumnCode(request.getDecorationRequirement());
|
||||||
|
if (Objects.nonNull(decorationRequirement)) {
|
||||||
|
hqtBuildAPIRequest.setField194__c(new HqtBuildAPIRequest.Field8__c(decorationRequirement.getCode(), decorationRequirement.getMsg()));
|
||||||
|
}
|
||||||
|
// 装修等级
|
||||||
|
HqtDecorationLevelEnum decorationLevel = HqtDecorationLevelEnum.getByColumnCode(request.getDecorationLevel());
|
||||||
|
if (Objects.nonNull(decorationLevel)) {
|
||||||
|
hqtBuildAPIRequest.setField193__c(new HqtBuildAPIRequest.Field8__c(decorationLevel.getCode(), decorationLevel.getMsg()));
|
||||||
|
}
|
||||||
|
// 门店类型
|
||||||
|
HqtStoreTypeEnum storeType = HqtStoreTypeEnum.getByStoreType(request.getStoreType());
|
||||||
|
if (Objects.nonNull(storeType)) {
|
||||||
|
hqtBuildAPIRequest.setField192__c(new HqtBuildAPIRequest.Field8__c(storeType.getCode(), storeType.getMsg()));
|
||||||
|
}
|
||||||
//资源服务URL
|
//资源服务URL
|
||||||
String url = hqtToken.getEndPoint();
|
String url = hqtToken.getEndPoint();
|
||||||
String requestUrl = url + "/v1/data/objects/project3X";
|
String requestUrl = url + "/v1/data/objects/project3X";
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import cn.hutool.core.convert.Convert;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.constants.RedisConstant;
|
import com.cool.store.constants.RedisConstant;
|
||||||
|
import com.cool.store.constants.DictConstants;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.ContractInformationDTO;
|
import com.cool.store.dto.ContractInformationDTO;
|
||||||
@@ -28,6 +29,7 @@ import com.cool.store.request.*;
|
|||||||
import com.cool.store.response.AddSignFranchiseResponse;
|
import com.cool.store.response.AddSignFranchiseResponse;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.*;
|
import com.cool.store.service.*;
|
||||||
|
import com.cool.store.service.dict.impl.DictService;
|
||||||
import com.cool.store.utils.GeoMapUtil;
|
import com.cool.store.utils.GeoMapUtil;
|
||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.utils.poi.DateUtils;
|
import com.cool.store.utils.poi.DateUtils;
|
||||||
@@ -153,6 +155,8 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
private SimpleMessageService simpleMessageService;
|
private SimpleMessageService simpleMessageService;
|
||||||
@Resource
|
@Resource
|
||||||
private OperationsConsultantAssignDAO operationsConsultantAssignDAO;
|
private OperationsConsultantAssignDAO operationsConsultantAssignDAO;
|
||||||
|
@Resource
|
||||||
|
private DictService dictService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -222,6 +226,8 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
if (Objects.nonNull(isExist) && Objects.isNull(request.getId())) {
|
if (Objects.nonNull(isExist) && Objects.isNull(request.getId())) {
|
||||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||||
}
|
}
|
||||||
|
// 正新鸡排校验字段
|
||||||
|
verifyParams(request);
|
||||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||||
PointInfoDO pointInfoById = pointInfoDAO.getPointInfoById(shopInfoDO.getPointId());
|
PointInfoDO pointInfoById = pointInfoDAO.getPointInfoById(shopInfoDO.getPointId());
|
||||||
String lockKey = "submitSignFranchise:" + request.getShopId();
|
String lockKey = "submitSignFranchise:" + request.getShopId();
|
||||||
@@ -292,6 +298,31 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void verifyParams(AddSignFranchiseRequest request) {
|
||||||
|
// 正新鸡排校验字段
|
||||||
|
if (String.valueOf(FranchiseBrandEnum.ZXJP.getCode()).equals(request.getFranchiseBrand())) {
|
||||||
|
if (Objects.isNull(request.getChickenAmount())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE, "鸡排价格不能为空");
|
||||||
|
}
|
||||||
|
if (BigDecimal.valueOf(10).compareTo(request.getChickenAmount()) != 0 && StringUtils.isBlank(request.getChickenInstruction())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.ZXJP_AMOUNT_INSTRUCTION_IS_BLANK);
|
||||||
|
}
|
||||||
|
if (Objects.isNull(request.getShopDecorationAttributes())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE, "门店装修属性不能为空");
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(request.getDecorationLevel())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE, "门店装修等级不能为空");
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(request.getDecorationRequirement())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE, "门店装修要求不能为空");
|
||||||
|
}
|
||||||
|
// 门店类型为‘普通门店’或装修设计要求不为‘统一装修设计’时,特殊情况说明必填
|
||||||
|
if (StringUtils.isBlank(request.getSpecialInstruction()) && (Integer.valueOf(2).equals(request.getStoreType()) || !DictConstants.DECORATION_REQUIREMENT_UNIFORM.equals(request.getDecorationRequirement()))) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.ERROR_MESSAGE, "特殊情况说明不能为空");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -307,6 +338,8 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
if (!feeCheck(request)){
|
if (!feeCheck(request)){
|
||||||
throw new ServiceException(ErrorCodeEnum.FEE_NOT_CONSISTENT);
|
throw new ServiceException(ErrorCodeEnum.FEE_NOT_CONSISTENT);
|
||||||
}
|
}
|
||||||
|
// 正新鸡排校验字段
|
||||||
|
verifyParams(request);
|
||||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||||
PointInfoDO pointInfoById = pointInfoDAO.getPointInfoById(shopInfoDO.getPointId());
|
PointInfoDO pointInfoById = pointInfoDAO.getPointInfoById(shopInfoDO.getPointId());
|
||||||
SignFranchiseDO signFranchiseDO = request.toSignFranchiseDO();
|
SignFranchiseDO signFranchiseDO = request.toSignFranchiseDO();
|
||||||
@@ -392,6 +425,11 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
shopInfoDO.setUpdateTime(new Date());
|
shopInfoDO.setUpdateTime(new Date());
|
||||||
shopInfoDO.setStoreType(request.getStoreType());
|
shopInfoDO.setStoreType(request.getStoreType());
|
||||||
shopInfoDO.setShopDecorationAttributes(request.getShopDecorationAttributes());
|
shopInfoDO.setShopDecorationAttributes(request.getShopDecorationAttributes());
|
||||||
|
shopInfoDO.setChickenAmount(request.getChickenAmount());
|
||||||
|
shopInfoDO.setChickenInstruction(request.getChickenInstruction());
|
||||||
|
shopInfoDO.setDecorationLevel(request.getDecorationLevel());
|
||||||
|
shopInfoDO.setDecorationRequirement(request.getDecorationRequirement());
|
||||||
|
shopInfoDO.setSpecialInstruction(request.getSpecialInstruction());
|
||||||
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
||||||
if (Objects.nonNull(pointInfoById)) {
|
if (Objects.nonNull(pointInfoById)) {
|
||||||
pointInfoById.setProvince(request.getProvince());
|
pointInfoById.setProvince(request.getProvince());
|
||||||
@@ -766,6 +804,10 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
request.setPartnershipSignatoryFirstMobile(lineInfoDO.getMobile());
|
request.setPartnershipSignatoryFirstMobile(lineInfoDO.getMobile());
|
||||||
request.setShopAddress(shopInfo.getDetailAddress());
|
request.setShopAddress(shopInfo.getDetailAddress());
|
||||||
request.setIsPayDesignFee(CommonConstants.ONE);
|
request.setIsPayDesignFee(CommonConstants.ONE);
|
||||||
|
request.setDecorationLevel(shopInfo.getDecorationLevel());
|
||||||
|
request.setDecorationRequirement(shopInfo.getDecorationRequirement());
|
||||||
|
request.setSpecialInstruction(shopInfo.getSpecialInstruction());
|
||||||
|
request.setStoreType(shopInfo.getStoreType());
|
||||||
if (StringUtils.isNotEmpty(shopInfo.getOperationsConsultant())){
|
if (StringUtils.isNotEmpty(shopInfo.getOperationsConsultant())){
|
||||||
String userName = enterpriseUserDAO.getUserName(shopInfo.getOperationsConsultant());
|
String userName = enterpriseUserDAO.getUserName(shopInfo.getOperationsConsultant());
|
||||||
request.setOperationsConsultant(userName);
|
request.setOperationsConsultant(userName);
|
||||||
@@ -874,6 +916,12 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
addSignFranchiseResponse.setShopCode(shopInfoDO.getShopCode());
|
addSignFranchiseResponse.setShopCode(shopInfoDO.getShopCode());
|
||||||
addSignFranchiseResponse.setFranchiseBrand(shopInfoDO.getFranchiseBrand());
|
addSignFranchiseResponse.setFranchiseBrand(shopInfoDO.getFranchiseBrand());
|
||||||
addSignFranchiseResponse.setJoinMode(shopInfoDO.getJoinMode());
|
addSignFranchiseResponse.setJoinMode(shopInfoDO.getJoinMode());
|
||||||
|
addSignFranchiseResponse.setChickenAmount(shopInfoDO.getChickenAmount());
|
||||||
|
addSignFranchiseResponse.setChickenInstruction(shopInfoDO.getChickenInstruction());
|
||||||
|
addSignFranchiseResponse.setDecorationLevel(shopInfoDO.getDecorationLevel());
|
||||||
|
addSignFranchiseResponse.setDecorationRequirement(shopInfoDO.getDecorationRequirement());
|
||||||
|
addSignFranchiseResponse.setSpecialInstruction(shopInfoDO.getSpecialInstruction());
|
||||||
|
dictService.fillDictField(addSignFranchiseResponse);
|
||||||
|
|
||||||
if (Objects.nonNull(regionInfo)) {
|
if (Objects.nonNull(regionInfo)) {
|
||||||
addSignFranchiseResponse.setRegionId(shopInfoDO.getRegionId());
|
addSignFranchiseResponse.setRegionId(shopInfoDO.getRegionId());
|
||||||
|
|||||||
Reference in New Issue
Block a user