Merge #28 into master from cc_20260114_fix
feat:红圈通邮箱 * cc_20260114_fix: (8 commits squashed) - feat:加盟公司自有店-开放推送红圈通 - feat:加盟公司自有店-开放推送红圈通 2、结束门店解绑铺位 3、红圈通新增招商所属大区 运营顾问字段 - feat:红圈通新增推送邮箱 - fix:大区取值 - fix:测试 - feat:推送人员名称 - feat:结束跟进 目前是任何时候都可以,单独解绑铺位 需要在加盟签约合同之前 - feat:红圈通邮箱 Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/28
This commit is contained in:
@@ -290,6 +290,8 @@ public class RedisConstant {
|
||||
|
||||
public static final String HUO_MA_TOKEN= "huo_ma_token:{0}";
|
||||
|
||||
public static final String BIG_REGION_EMAIL = "big_region_email";
|
||||
|
||||
/**
|
||||
* 钱包开通失败/打标失败原因 wallet_open_fail:storeId:1/2 1平安/2网商
|
||||
*/
|
||||
|
||||
@@ -332,6 +332,7 @@ public enum ErrorCodeEnum {
|
||||
WALLET_WITH_DRAWER_FAIL(1620002,"提现失败",null),
|
||||
WALLET_API_ERROR(1620003,"{0}",null),
|
||||
MINI_PROGRAM_VERSION_TOO_LOW(1620004,"小程序版本过低,请刷新小程序再操作!",null),
|
||||
CONTRACT_SIGNED(600002, "操作失败,合同签约已完成", null),
|
||||
|
||||
// 171闭店
|
||||
CLOSE_STORE_SUB_STAGE_ERROR(171002, "当前流程状态异常", null),
|
||||
|
||||
@@ -39,6 +39,15 @@ public class HqtBuildRequest {
|
||||
//加盟品牌
|
||||
private Integer franchiseBrand;
|
||||
|
||||
//招商所属区域
|
||||
private String investRegionName;
|
||||
|
||||
//运营顾问
|
||||
private String operationsConsultant;
|
||||
|
||||
//负责人邮箱
|
||||
private String email;
|
||||
|
||||
public Boolean check(){
|
||||
if (StringUtils.isAnyBlank(shopName,hqtRegionCode,hqtRegionName,supervisorName,
|
||||
partnershipSignatoryFirst,partnershipSignatoryFirstMobile,shopAddress)){
|
||||
|
||||
@@ -105,6 +105,15 @@ public class HqtBuildAPIRequest {
|
||||
@JsonProperty("field180__c")
|
||||
private String field180__c = "crm";
|
||||
|
||||
@JsonProperty("运营顾问")
|
||||
private String field190__c;
|
||||
|
||||
@JsonProperty("招商所属大区")
|
||||
private String field188__c;
|
||||
|
||||
@JsonProperty("负责人邮箱")
|
||||
private String field191__c;
|
||||
|
||||
@Data
|
||||
public static class Field124__c {
|
||||
/**
|
||||
|
||||
@@ -58,9 +58,10 @@ public interface PointService {
|
||||
/**
|
||||
* 解绑铺位
|
||||
* @param pointId
|
||||
* @param closeStoreFlag 结束门店标识
|
||||
* @return
|
||||
*/
|
||||
Integer pointUnbind(Long pointId);
|
||||
Integer pointUnbind(Long pointId,Boolean closeStoreFlag);
|
||||
|
||||
/**
|
||||
* 配置评估报告
|
||||
|
||||
@@ -176,7 +176,8 @@ public class DecorationHandleServiceImpl implements DecorationHandleService {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
//配置的系统是红圈通 且不是加盟公司自有店 则推送数据 也就是配置了crm或者是加盟公司自有店 走crm流程
|
||||
if (teamInfo.getUseSystem().equals(DecorationUseSystemEnum.HQT.getCode())&&!shopInfoDO.getJoinMode().equals(JoinModeEnum.OWN_STORE.getCode())){
|
||||
//2026开始 自有店也开始走红圈通
|
||||
if (teamInfo.getUseSystem().equals(DecorationUseSystemEnum.HQT.getCode())){
|
||||
hqtAPIService.pushHqtBuild(signFranchiseService.getHqtBuildRequest(shopInfoDO.getId()));
|
||||
}
|
||||
shopDecorationAssign.setDecorationDescStatus(DecorationDescStatus.ASSIGNED.getCode());
|
||||
|
||||
@@ -64,12 +64,6 @@ public class HqtAPIServiceImpl implements HqtAPIService {
|
||||
//@Async
|
||||
public void pushHqtBuild(HqtBuildRequest request) {
|
||||
log.info("开始推送门店信息request:{}",JSONObject.toJSONString(request));
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
//,加盟公司自有店->加盟公司建店 不推送数据 再crm中完成
|
||||
if ( shopInfo.getJoinMode().equals(JoinModeEnum.OWN_STORE.getCode())){
|
||||
log.info("加盟公司自有店->加盟公司建店 不推送数据 再crm中完成");
|
||||
return;
|
||||
}
|
||||
Boolean check = request.check();
|
||||
if (!check) {
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_PARAMS_ERROR);
|
||||
@@ -212,6 +206,9 @@ public class HqtAPIServiceImpl implements HqtAPIService {
|
||||
hqtBuildAPIRequest.setField8__c(field8__c);
|
||||
hqtBuildAPIRequest.setField123__c(field123__c);
|
||||
hqtBuildAPIRequest.setField4__c(request.getSupervisorMobile());
|
||||
hqtBuildAPIRequest.setField190__c(request.getOperationsConsultant());
|
||||
hqtBuildAPIRequest.setField188__c(request.getInvestRegionName());
|
||||
hqtBuildAPIRequest.setField191__c(request.getEmail());
|
||||
}
|
||||
|
||||
private HqtBuildAPIRequest.Field123__c getField123__c(HqtBuildRequest request) {
|
||||
|
||||
@@ -291,15 +291,18 @@ public class PointServiceImpl implements PointService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Integer pointUnbind(Long pointId) {
|
||||
public Integer pointUnbind(Long pointId,Boolean closeStoreFlag) {
|
||||
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(pointId);
|
||||
if (Objects.isNull(pointInfo)) {
|
||||
log.error("铺位基本信息不存在");
|
||||
throw new ServiceException(ErrorCodeEnum.POINT_NOT_EXIST);
|
||||
}
|
||||
if (PointStatusEnum.POINT_STATUS_6.getCode().equals(pointInfo.getPointStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.POINT_SIGNED);
|
||||
//如果是结束跟进 直接解绑铺位,不需要校验是否签合同(fix 目前来说不合理,合同签约之后应该不支持结束跟进),如果是单独解绑 需要校验是否在加盟合同签约完成之前。
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(pointInfo.getShopId(), ShopSubStageEnum.SHOP_STAGE_8);
|
||||
if (!closeStoreFlag&&ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_85.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){
|
||||
throw new ServiceException(ErrorCodeEnum.CONTRACT_SIGNED);
|
||||
}
|
||||
|
||||
if (SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())) {
|
||||
rollbackSelectPoint(pointInfo.getShopId(), pointInfo.getId());
|
||||
}
|
||||
|
||||
@@ -506,7 +506,11 @@ public class ShopServiceImpl implements ShopService {
|
||||
return shopInfoDAO.updateShopInfo(shopInfo);
|
||||
}
|
||||
|
||||
@Resource
|
||||
PointService pointService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean shopClose(Long shopId) {
|
||||
log.info("shopClose shopId:{}", shopId);
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
@@ -519,6 +523,11 @@ public class ShopServiceImpl implements ShopService {
|
||||
}
|
||||
shopInfo.setShopStatus(ShopStatusEnum.ABANDON.getCode());
|
||||
shopInfoDAO.updateShopInfo(shopInfo);
|
||||
//放弃之后解绑铺位
|
||||
if (shopInfo.getPointId()!=null){
|
||||
//解绑铺位
|
||||
pointService.pointUnbind(shopInfo.getPointId(),Boolean.TRUE);
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.service.impl;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.constants.RedisConstant;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.ContractInformationDTO;
|
||||
@@ -34,6 +35,7 @@ import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.protobuf.StringValue;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
@@ -681,6 +683,11 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
bigRegionDO = hqtAPIService.pushHqtRegion(bigRegionDO);
|
||||
}
|
||||
HqtBuildRequest request = new HqtBuildRequest();
|
||||
//新增邮箱
|
||||
String email = redisUtilPool.hashGet(RedisConstant.BIG_REGION_EMAIL, String.valueOf(shopInfo.getRegionId()));
|
||||
if (StringUtils.isNotEmpty(email)){
|
||||
request.setEmail(email);
|
||||
}
|
||||
request.setShopId(shopId);
|
||||
request.setShopCode(shopInfo.getShopCode());
|
||||
request.setShopName(shopInfo.getShopName());
|
||||
@@ -693,6 +700,16 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
request.setPartnershipSignatoryFirstMobile(lineInfoDO.getMobile());
|
||||
request.setShopAddress(shopInfo.getDetailAddress());
|
||||
request.setIsPayDesignFee(CommonConstants.ONE);
|
||||
if (StringUtils.isNotEmpty(shopInfo.getOperationsConsultant())){
|
||||
String userName = enterpriseUserDAO.getUserName(shopInfo.getOperationsConsultant());
|
||||
request.setOperationsConsultant(userName);
|
||||
}
|
||||
if (shopInfo.getInvestRegionId()!=null){
|
||||
RegionDO region = regionDao.getRegionById(shopInfo.getInvestRegionId());
|
||||
if (region!=null){
|
||||
request.setInvestRegionName(region.getName());
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfo.getFranchiseBrand())) {
|
||||
request.setFranchiseBrand(Integer.valueOf(shopInfo.getFranchiseBrand()));
|
||||
}
|
||||
|
||||
@@ -611,11 +611,13 @@ public class PCTestController {
|
||||
return ApiResponse.success(decorationDesignInfoService.decorationAcceptance(request));
|
||||
}
|
||||
|
||||
@Resource
|
||||
SignFranchiseService signFranchiseService;
|
||||
|
||||
@ApiOperation("测试红圈通建店")
|
||||
@GetMapping("/testHqtBuild")
|
||||
public ApiResponse<Boolean> testHqtBuild(@RequestParam("shopId")Long shopId) {
|
||||
HqtBuildRequest hqtBuildRequest = getHqtBuildRequest(shopId);
|
||||
hqtAPIService.pushHqtBuild(hqtBuildRequest);
|
||||
hqtAPIService.pushHqtBuild(signFranchiseService.getHqtBuildRequest(shopId));
|
||||
return ApiResponse.success(true);
|
||||
}
|
||||
|
||||
@@ -627,35 +629,6 @@ public class PCTestController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public HqtBuildRequest getHqtBuildRequest(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
EnterpriseUserDO userInfoById = enterpriseUserDAO.getUserInfoById(shopInfo.getInvestmentManager());
|
||||
BigRegionDO bigRegionDO = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
|
||||
HqtBuildRequest request = new HqtBuildRequest();
|
||||
request.setShopId(shopId);
|
||||
request.setShopCode(shopInfo.getShopCode());
|
||||
request.setShopName(shopInfo.getShopName());
|
||||
request.setShopDecorationAttributes(shopInfo.getShopDecorationAttributes());
|
||||
request.setHqtRegionCode(bigRegionDO.getHqtRegionCode());
|
||||
request.setHqtRegionName(bigRegionDO.getHqtRegionName());
|
||||
request.setSupervisorName(userInfoById.getName());
|
||||
request.setSupervisorMobile(userInfoById.getMobile());
|
||||
request.setPartnershipSignatoryFirst(lineInfoDO.getUsername());
|
||||
request.setPartnershipSignatoryFirstMobile(lineInfoDO.getMobile());
|
||||
request.setShopAddress(shopInfo.getDetailAddress());
|
||||
request.setIsPayDesignFee(CommonConstants.ONE);
|
||||
if (StringUtils.isNotBlank(shopInfo.getFranchiseBrand())) {
|
||||
request.setFranchiseBrand(Integer.valueOf(shopInfo.getFranchiseBrand()));
|
||||
}
|
||||
return request;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/testWxNotice", produces = "application/xml;charset=UTF-8")
|
||||
@ApiOperation("testWxNotice")
|
||||
public String handleWechatMessage(
|
||||
|
||||
@@ -70,7 +70,7 @@ public class PointController {
|
||||
@ApiOperation("铺位解绑")
|
||||
@PostMapping("/unbind")
|
||||
public ResponseResult<Integer> pointUnbind(@RequestBody PointIdRequest request) {
|
||||
return ResponseResult.success(pointService.pointUnbind(request.getPointId()));
|
||||
return ResponseResult.success(pointService.pointUnbind(request.getPointId(),Boolean.FALSE));
|
||||
}
|
||||
|
||||
@ApiOperation("配置高德评估报告")
|
||||
|
||||
Reference in New Issue
Block a user