Merge #115 into master from cc_20260507_smz
feat:AI店 不初始化门店 * cc_20260507_smz: (3 commits squashed) - feat:数据同步 名称新增MX 等前缀 - feat:上海魔盒未来食品有限公司 - feat:AI店 不初始化门店 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/115
This commit is contained in:
@@ -15,7 +15,7 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
public enum FranchiseBrandEnum {
|
public enum FranchiseBrandEnum {
|
||||||
ZXJP(1,"正新鸡排","option486","上海正新食品集团有限公司","海南正新多品牌管理有限公司"),
|
ZXJP(1,"正新鸡排","option486","上海正新食品集团有限公司","海南正新多品牌管理有限公司"),
|
||||||
ZXSMZ(2,"正新三明治","option622","上海小熊与树食品科技有限公司","上海小熊与树食品科技有限公司"),
|
ZXSMZ(2,"正新三明治","option622","上海魔盒未来食品有限公司","上海魔盒未来食品有限公司"),
|
||||||
ZJS(3,"正烧记","option488","上海正烧信息科技有限公司","上海正烧信息科技有限公司"),
|
ZJS(3,"正烧记","option488","上海正烧信息科技有限公司","上海正烧信息科技有限公司"),
|
||||||
DGMX(4,"大鼓米线","option624","",""),
|
DGMX(4,"大鼓米线","option624","",""),
|
||||||
CXM(5,"串小妹","option626","",""),
|
CXM(5,"串小妹","option626","",""),
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.entity.ShopInfoDO;
|
||||||
|
import com.cool.store.entity.SignFranchiseDO;
|
||||||
import com.cool.store.enums.DownSystemTypeEnum;
|
import com.cool.store.enums.DownSystemTypeEnum;
|
||||||
import com.cool.store.request.ZxjpApiRequest;
|
import com.cool.store.request.ZxjpApiRequest;
|
||||||
|
|
||||||
@@ -17,4 +19,6 @@ public interface SyncDataService {
|
|||||||
* @description: 获取组合数据
|
* @description: 获取组合数据
|
||||||
*/
|
*/
|
||||||
ZxjpApiRequest getData(Long shopId, DownSystemTypeEnum systemType);
|
ZxjpApiRequest getData(Long shopId, DownSystemTypeEnum systemType);
|
||||||
|
|
||||||
|
String getXgjShopName(ShopInfoDO shopInfoDO, SignFranchiseDO signFranchiseDO);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -158,8 +158,15 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
shopInfo.setUseStandardStore(lineInfo.getUseStandardStore());
|
shopInfo.setUseStandardStore(lineInfo.getUseStandardStore());
|
||||||
shopInfo.setInvestmentManager(lineInfo.getInvestmentManager());
|
shopInfo.setInvestmentManager(lineInfo.getInvestmentManager());
|
||||||
shopInfo.setInvestRegionId(lineInfo.getInvestRegionId());
|
shopInfo.setInvestRegionId(lineInfo.getInvestRegionId());
|
||||||
|
if (lineInfo.getUseStandardStore()!=null&&lineInfo.getUseStandardStore()==1){
|
||||||
|
//标准AI店 不初始化
|
||||||
|
continue;
|
||||||
|
}
|
||||||
addShopList.add(shopInfo);
|
addShopList.add(shopInfo);
|
||||||
}
|
}
|
||||||
|
if (CollectionUtils.isEmpty(addShopList)){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
shopInfoDAO.batchAddShop(addShopList);
|
shopInfoDAO.batchAddShop(addShopList);
|
||||||
List<Long> shopIds = addShopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
List<Long> shopIds = addShopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
||||||
Integer result = shopStageInfoDAO.initShopStageInfo(lineInfo, addShopList, true);
|
Integer result = shopStageInfoDAO.initShopStageInfo(lineInfo, addShopList, true);
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ public class SyncDataServiceImpl implements SyncDataService {
|
|||||||
request.setWqfAccount(shopInfo.getShopCode());
|
request.setWqfAccount(shopInfo.getShopCode());
|
||||||
request.setDownstreamSystemShopName(shopInfo.getShopName());
|
request.setDownstreamSystemShopName(shopInfo.getShopName());
|
||||||
if (DownSystemTypeEnum.XGJ.equals(systemType)) {
|
if (DownSystemTypeEnum.XGJ.equals(systemType)) {
|
||||||
request.setDownstreamSystemShopName(getXgjShopName(lineInfoDO, shopInfo,signFranchiseDO));
|
request.setDownstreamSystemShopName(getXgjShopName( shopInfo,signFranchiseDO));
|
||||||
}
|
}
|
||||||
if (DownSystemTypeEnum.POS.equals(systemType)) {
|
if (DownSystemTypeEnum.POS.equals(systemType)) {
|
||||||
if (buildInformationDO != null) {
|
if (buildInformationDO != null) {
|
||||||
@@ -288,7 +288,8 @@ public class SyncDataServiceImpl implements SyncDataService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getXgjShopName(LineInfoDO lineInfoDO, ShopInfoDO shopInfoDO,SignFranchiseDO signFranchiseDO) {
|
@Override
|
||||||
|
public String getXgjShopName( ShopInfoDO shopInfoDO,SignFranchiseDO signFranchiseDO) {
|
||||||
if (StringUtils.isBlank(shopInfoDO.getShopCode())||signFranchiseDO==null) {
|
if (StringUtils.isBlank(shopInfoDO.getShopCode())||signFranchiseDO==null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -297,7 +298,6 @@ public class SyncDataServiceImpl implements SyncDataService {
|
|||||||
log.info("合同阶段暂未完成");
|
log.info("合同阶段暂未完成");
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
Boolean partnershipSignatorySecondIsNull = StringUtils.isBlank(signFranchiseDO.getPartnershipSignatorySecond());
|
|
||||||
if (String.valueOf(FranchiseBrandEnum.ZXJP.getCode()).equals(shopInfoDO.getFranchiseBrand())) {
|
if (String.valueOf(FranchiseBrandEnum.ZXJP.getCode()).equals(shopInfoDO.getFranchiseBrand())) {
|
||||||
//M10001
|
//M10001
|
||||||
if (shopCode.matches("M\\d*")) {
|
if (shopCode.matches("M\\d*")) {
|
||||||
@@ -345,6 +345,11 @@ public class SyncDataServiceImpl implements SyncDataService {
|
|||||||
return FranchiseBrandEnum.ZJS.getDesc() + shopInfoDO.getShopName();
|
return FranchiseBrandEnum.ZJS.getDesc() + shopInfoDO.getShopName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
if (String.valueOf(FranchiseBrandEnum.ZXSMZ.getCode()).equals(shopInfoDO.getFranchiseBrand())) {
|
||||||
|
if (shopCode.matches("SJ\\d*")) {
|
||||||
|
return shopInfoDO.getShopName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return shopInfoDO.getShopName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.cool.store.enums.wallet.YztStoreModel;
|
|||||||
import com.cool.store.mq.producer.SimpleMessageService;
|
import com.cool.store.mq.producer.SimpleMessageService;
|
||||||
import com.cool.store.request.StoreMasterDTO;
|
import com.cool.store.request.StoreMasterDTO;
|
||||||
import com.cool.store.request.wallet.CreateStoreRequest;
|
import com.cool.store.request.wallet.CreateStoreRequest;
|
||||||
|
import com.cool.store.service.SyncDataService;
|
||||||
import com.cool.store.service.SyncMainSysServer;
|
import com.cool.store.service.SyncMainSysServer;
|
||||||
import com.cool.store.service.wallet.WalletApiService;
|
import com.cool.store.service.wallet.WalletApiService;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
@@ -72,6 +73,9 @@ public class SyncMainSysServerImpl implements SyncMainSysServer {
|
|||||||
@Resource
|
@Resource
|
||||||
StoreOrderDAO storeOrderDAO;
|
StoreOrderDAO storeOrderDAO;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
SyncDataService syncDataService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加门店
|
* 添加门店
|
||||||
* @param shopId
|
* @param shopId
|
||||||
@@ -91,7 +95,6 @@ public class SyncMainSysServerImpl implements SyncMainSysServer {
|
|||||||
storeMasterDTO.setEnterpriseId(eid);
|
storeMasterDTO.setEnterpriseId(eid);
|
||||||
storeMasterDTO.setStoreId(shopInfo.getStoreId());
|
storeMasterDTO.setStoreId(shopInfo.getStoreId());
|
||||||
storeMasterDTO.setStoreStatus("not_open");
|
storeMasterDTO.setStoreStatus("not_open");
|
||||||
storeMasterDTO.setStoreName(shopInfo.getShopName());
|
|
||||||
storeMasterDTO.setStoreNum(shopInfo.getShopCode());
|
storeMasterDTO.setStoreNum(shopInfo.getShopCode());
|
||||||
storeMasterDTO.setJoinBrand(StringUtils.isNotEmpty(shopInfo.getFranchiseBrand())?Integer.valueOf(shopInfo.getFranchiseBrand()):null);
|
storeMasterDTO.setJoinBrand(StringUtils.isNotEmpty(shopInfo.getFranchiseBrand())?Integer.valueOf(shopInfo.getFranchiseBrand()):null);
|
||||||
storeMasterDTO.setJoinModel(shopInfo.getJoinMode());
|
storeMasterDTO.setJoinModel(shopInfo.getJoinMode());
|
||||||
@@ -99,6 +102,7 @@ public class SyncMainSysServerImpl implements SyncMainSysServer {
|
|||||||
storeMasterDTO.setUseStandardStore(shopInfo.getUseStandardStore());
|
storeMasterDTO.setUseStandardStore(shopInfo.getUseStandardStore());
|
||||||
|
|
||||||
SignFranchiseDO signFranchiseDO = signFranchiseDAO.selectByShopId(shopId);
|
SignFranchiseDO signFranchiseDO = signFranchiseDAO.selectByShopId(shopId);
|
||||||
|
storeMasterDTO.setStoreName(syncDataService.getXgjShopName(shopInfo,signFranchiseDO));
|
||||||
storeMasterDTO.setManageModel(signFranchiseDO.getBusinessModel());
|
storeMasterDTO.setManageModel(signFranchiseDO.getBusinessModel());
|
||||||
storeMasterDTO.setSignType(signFranchiseDO.getSignType());
|
storeMasterDTO.setSignType(signFranchiseDO.getSignType());
|
||||||
storeMasterDTO.setProtectiveDistance(signFranchiseDO.getProtectiveDistance());
|
storeMasterDTO.setProtectiveDistance(signFranchiseDO.getProtectiveDistance());
|
||||||
|
|||||||
Reference in New Issue
Block a user