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:
正新
2026-01-19 07:05:42 +00:00
parent 159f112113
commit 0ad517dce6
12 changed files with 65 additions and 43 deletions

View File

@@ -58,9 +58,10 @@ public interface PointService {
/**
* 解绑铺位
* @param pointId
* @param closeStoreFlag 结束门店标识
* @return
*/
Integer pointUnbind(Long pointId);
Integer pointUnbind(Long pointId,Boolean closeStoreFlag);
/**
* 配置评估报告

View File

@@ -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());

View File

@@ -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) {

View File

@@ -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());
}

View File

@@ -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;
}

View File

@@ -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()));
}