Merge branch 'cc_20250813_storeMaster' into 'master'
Cc 20250813 store master See merge request hangzhou/java/custom_zxjp!154
This commit is contained in:
@@ -16,7 +16,8 @@ public enum RocketMqTagEnum {
|
||||
DEPT_EVENT("dept_event","部门事件"),
|
||||
STORE_DING_QUEUE("store_ding_queue", "微应用钉钉消息发送"),
|
||||
ZXJP_CREATE_STORE("zxjp_create_store", "正新鸡排招商创建门店"),
|
||||
PARTNER_LICENSE_SYNC_QUEUE("partner_license_sync_queue", "招商证照信息同步");
|
||||
PARTNER_LICENSE_SYNC_QUEUE("partner_license_sync_queue", "招商证照信息同步"),
|
||||
BUSINESS_SYNC("business_sync", "工商食安信息同步"),
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -11,17 +11,19 @@ import java.util.Objects;
|
||||
public enum PaymentMethodEnum {
|
||||
|
||||
//1.月付 2.季付 3.半年付 4.年付
|
||||
PAYMENT_METHOD_1(1, "月付"),
|
||||
PAYMENT_METHOD_2(2, "季付"),
|
||||
PAYMENT_METHOD_3(3, "半年付"),
|
||||
PAYMENT_METHOD_4(4, "年付"),
|
||||
PAYMENT_METHOD_1(1, "月付",1),
|
||||
PAYMENT_METHOD_2(2, "季付",3),
|
||||
PAYMENT_METHOD_3(3, "半年付",6),
|
||||
PAYMENT_METHOD_4(4, "年付",12),
|
||||
;
|
||||
|
||||
private Integer code;
|
||||
|
||||
private String desc;
|
||||
|
||||
PaymentMethodEnum(Integer code, String desc) {
|
||||
private Integer totalMonth;
|
||||
|
||||
PaymentMethodEnum(Integer code, String desc,Integer totalMonth) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
@@ -34,6 +36,9 @@ public enum PaymentMethodEnum {
|
||||
return desc;
|
||||
}
|
||||
|
||||
public Integer getTotalMonth() {
|
||||
return totalMonth;
|
||||
}
|
||||
|
||||
public static PaymentMethodEnum getByCode(Integer code) {
|
||||
if(Objects.isNull(code)){
|
||||
|
||||
@@ -34,4 +34,8 @@ public class SignFranchiseDAO {
|
||||
}
|
||||
return signFranchiseMapper.getSignType(shopIds);
|
||||
}
|
||||
|
||||
public SignFranchiseDO selectByShopId(Long shopId){
|
||||
return signFranchiseMapper.selectByShopId(shopId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.cool.store.dto;
|
||||
|
||||
import com.cool.store.entity.LicenseTransactDO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/8/13 15:49
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class BusinessDTO {
|
||||
|
||||
private String enterpriseId;
|
||||
|
||||
List<LicenseTransactDO> requests;
|
||||
|
||||
Map<Long, String> transactMap;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.aliyun.ons20190214.models.OnsMessageTraceRequest;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/8/13 13:41
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class StoreMasterDTO {
|
||||
|
||||
private String enterpriseId;
|
||||
|
||||
@ApiModelProperty("门店名称(加盟签约)")
|
||||
private String storeName;
|
||||
@ApiModelProperty("门店名称(小程序点单)")
|
||||
private String miniProgramOrderStoreName;
|
||||
@ApiModelProperty("门店编码")
|
||||
private String storeNum;
|
||||
@ApiModelProperty("加盟品牌")
|
||||
private Integer joinBrand;
|
||||
@ApiModelProperty("加盟模式")
|
||||
private Integer joinModel;
|
||||
@ApiModelProperty("门店类型")
|
||||
private Integer storeType;
|
||||
@ApiModelProperty("经营模式")
|
||||
private Integer manageModel;
|
||||
@ApiModelProperty("签约类型")
|
||||
private Integer signType;
|
||||
@ApiModelProperty("门店状态")
|
||||
private String storeStatus;
|
||||
@ApiModelProperty("门店带宽")
|
||||
private Integer storeBandwidth;
|
||||
|
||||
@ApiModelProperty("所属加盟集团")
|
||||
private String bloc;
|
||||
@ApiModelProperty("所属大区")
|
||||
private Long branch;
|
||||
@ApiModelProperty("加盟督导-人")
|
||||
private String joinSupervision;
|
||||
@ApiModelProperty("管理督导-组织")
|
||||
private Long regionId;
|
||||
|
||||
@ApiModelProperty("省市区")
|
||||
private String area;
|
||||
@ApiModelProperty("乡镇")
|
||||
private String town;
|
||||
@ApiModelProperty("门店地址")
|
||||
private String storeAddress;
|
||||
@ApiModelProperty("点位编码")
|
||||
private String pointCode;
|
||||
@ApiModelProperty("高德定位 暂时没有")
|
||||
private String locationScreenshot;
|
||||
@ApiModelProperty("定位地址")
|
||||
private String locationAddress;
|
||||
@ApiModelProperty("经度")
|
||||
private String longitude;
|
||||
@ApiModelProperty("纬度")
|
||||
private String latitude;
|
||||
@ApiModelProperty("保护距离")
|
||||
private Integer protectiveDistance;
|
||||
|
||||
@ApiModelProperty("月租金")
|
||||
private BigDecimal monthlyRent;
|
||||
|
||||
@ApiModelProperty("收件人")
|
||||
private String addresseeName;
|
||||
@ApiModelProperty("手机号")
|
||||
private String addresseeMobile;
|
||||
@ApiModelProperty("收件省市区")
|
||||
private String addresseeArea;
|
||||
@ApiModelProperty("收件详细地址")
|
||||
private String addresseeAddress;
|
||||
@ApiModelProperty("报货物流仓库(编码)")
|
||||
private String declareGoodsLogisticsWarehouse;
|
||||
@ApiModelProperty("报货类型 0-按周报货 1-按月报货 2-自提 3-按2周/次投货 4-按3周/次投货")
|
||||
private Integer declareGoodsType;
|
||||
@ApiModelProperty("报送货日期 数组格式\"[{\"declareGoods\": \"\",\"deliverGoods\":\"\"}]\"")
|
||||
private String declareGoodsDate;
|
||||
|
||||
@ApiModelProperty("营业时间")
|
||||
private String businessHours;
|
||||
|
||||
@ApiModelProperty("门头照 暂时没有")
|
||||
private String avatar;
|
||||
@ApiModelProperty("门店内景照 暂时没有")
|
||||
private String interiorPhotos;
|
||||
|
||||
private SignerInfo signerInfo;
|
||||
|
||||
private SettlerInfo settlerInfo;
|
||||
|
||||
@Data
|
||||
public static class SignerInfo {
|
||||
@ApiModelProperty("签约人1姓名")
|
||||
private String Signer1Name;
|
||||
@ApiModelProperty("签约人1姓名")
|
||||
private String Signer1Mobile;
|
||||
@ApiModelProperty("签约人1姓名")
|
||||
private String Signer1IdCard;
|
||||
@ApiModelProperty("签约人1姓名")
|
||||
private String Signer1IdCardPhoto;
|
||||
@ApiModelProperty("签约人1姓名")
|
||||
private String Signer1IdCardPhotoBack;
|
||||
@ApiModelProperty("角色")
|
||||
private Long partnerRoleId;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class SettlerInfo{
|
||||
@ApiModelProperty("结算人姓名")
|
||||
private String settlerName;
|
||||
|
||||
@ApiModelProperty("结算人身份证号(加密)")
|
||||
private String settlerIdCardNo;
|
||||
|
||||
@ApiModelProperty("结算人身份证正面路径")
|
||||
private String settlerIdCardFront;
|
||||
|
||||
@ApiModelProperty("结算人身份证反面路径")
|
||||
private String settlerIdCardReverse;
|
||||
|
||||
@ApiModelProperty("结算人手持身份证正面照片路径")
|
||||
private String settlerInHandFrontPicture;
|
||||
|
||||
@ApiModelProperty("结算人手持身份证反面照片路径")
|
||||
private String settlerInHandBackPicture;
|
||||
|
||||
@ApiModelProperty("结算人银行卡号(加密)")
|
||||
private String settlerBankNumber;
|
||||
|
||||
@ApiModelProperty("结算人银行卡预留手机号")
|
||||
private String settlerBankMobile;
|
||||
|
||||
@ApiModelProperty("结算开户银行")
|
||||
private String settlerBankName;
|
||||
|
||||
@ApiModelProperty("结算开户银行支行")
|
||||
private String settlerBankBranchName;
|
||||
|
||||
@ApiModelProperty("结算人银行卡照片路径")
|
||||
private String settlerBankPhotoUrl;
|
||||
|
||||
@ApiModelProperty("门店POS收款银行卡反面路径")
|
||||
private String settlerBankBackPhotoUrl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -5,10 +5,12 @@ import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.enums.point.PaymentMethodEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.FranchiseFeeMapper;
|
||||
import com.cool.store.mapper.SignFranchiseMapper;
|
||||
import com.cool.store.mq.producer.SimpleMessageService;
|
||||
import com.cool.store.request.StoreMasterDTO;
|
||||
import com.cool.store.request.StoreRequestBody;
|
||||
import com.cool.store.service.OperationLogService;
|
||||
import com.cool.store.service.SyncMainSysServer;
|
||||
@@ -20,6 +22,7 @@ import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.HashMap;
|
||||
@@ -72,46 +75,55 @@ public class SyncMainSysServerImpl implements SyncMainSysServer {
|
||||
private String eid;
|
||||
@Resource
|
||||
private StoreDao storeDao;
|
||||
@Resource
|
||||
SignFranchiseDAO signFranchiseDAO;
|
||||
@Resource
|
||||
PointDetailInfoDAO pointDetailDAO;
|
||||
@Resource
|
||||
QualificationsInfoDAO qualificationsInfoDAO;
|
||||
|
||||
@Override
|
||||
@Async
|
||||
public void syncStore(Long shopId) {
|
||||
StoreRequestBody requestBody = new StoreRequestBody();
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
StoreDO storeDO = storeDao.getByStoreNum(shopInfo.getShopCode());
|
||||
if (Objects.nonNull(storeDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.STORE_IS_EXIST);
|
||||
log.info("开始同步门店 syncStore:{}", shopId);
|
||||
addStore(shopId);
|
||||
}
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
PointInfoDO pointInfoDO = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
|
||||
BuildInformationDO buildInformationDO = buildInformationDAO.selectOneByShopId(shopId);
|
||||
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
||||
|
||||
requestBody.setStore_name(shopInfo.getShopName());
|
||||
requestBody.setStore_num(shopInfo.getShopCode());
|
||||
requestBody.setProvince(shopInfo.getProvince());
|
||||
requestBody.setCity(shopInfo.getCity());
|
||||
requestBody.setCounty(shopInfo.getDistrict());
|
||||
requestBody.setLocation_address(shopInfo.getDetailAddress());
|
||||
requestBody.setStore_address(shopInfo.getDetailAddress());
|
||||
if (shopInfo.getManagerRegionId() == null) {
|
||||
BigRegionDO byRegionId = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
|
||||
if (byRegionId != null) {
|
||||
requestBody.setStore_area(byRegionId.getStoreManageRegionId() == null
|
||||
? shopInfo.getRegionId().toString() : byRegionId.getStoreManageRegionId().toString());
|
||||
} else {
|
||||
requestBody.setStore_area(shopInfo.getRegionId().toString());
|
||||
|
||||
/**
|
||||
* 添加门店
|
||||
* @param shopId
|
||||
*/
|
||||
public void addStore(Long shopId) {
|
||||
try {
|
||||
StoreMasterDTO storeMasterDTO = new StoreMasterDTO();
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
if (shopInfo == null){
|
||||
log.info("门店不存在:{}", shopId);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
requestBody.setStore_area(shopInfo.getManagerRegionId().toString());
|
||||
}
|
||||
//未开业
|
||||
requestBody.setStore_status("not_open");
|
||||
if (pointInfoDO != null) {
|
||||
requestBody.setStore_acreage(pointInfoDO.getPointArea());
|
||||
requestBody.setLongitude_latitude(pointInfoDO.getLongitude() + "," + pointInfoDO.getLatitude());
|
||||
}
|
||||
requestBody.setTelephone(buildInformationDO.getBusinessMobile());
|
||||
storeMasterDTO.setEnterpriseId(eid);
|
||||
storeMasterDTO.setStoreStatus("not_open");
|
||||
storeMasterDTO.setStoreName(shopInfo.getShopName());
|
||||
storeMasterDTO.setStoreNum(shopInfo.getShopCode());
|
||||
storeMasterDTO.setJoinBrand(StringUtils.isNotEmpty(shopInfo.getFranchiseBrand())?Integer.valueOf(shopInfo.getFranchiseBrand()):null);
|
||||
storeMasterDTO.setJoinModel(shopInfo.getJoinMode());
|
||||
storeMasterDTO.setStoreType(shopInfo.getStoreType());
|
||||
|
||||
SignFranchiseDO signFranchiseDO = signFranchiseDAO.selectByShopId(shopId);
|
||||
storeMasterDTO.setManageModel(signFranchiseDO.getBusinessModel());
|
||||
storeMasterDTO.setSignType(signFranchiseDO.getSignType());
|
||||
storeMasterDTO.setProtectiveDistance(signFranchiseDO.getProtectiveDistance());
|
||||
|
||||
BigRegionDO region = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
|
||||
storeMasterDTO.setBloc(region.getGroupName());
|
||||
storeMasterDTO.setBranch(region.getRegionId());
|
||||
storeMasterDTO.setRegionId(shopInfo.getManagerRegionId());
|
||||
storeMasterDTO.setJoinSupervision(shopInfo.getInvestmentManager());
|
||||
|
||||
BuildInformationDO buildInformationDO = buildInformationDAO.selectOneByShopId(shopId);
|
||||
if (buildInformationDO != null){
|
||||
storeMasterDTO.setMiniProgramOrderStoreName(buildInformationDO.getCShopName());
|
||||
if (StringUtils.isNotBlank(buildInformationDO.getBusinessHours())) {
|
||||
try {
|
||||
String[] times = buildInformationDO.getBusinessHours().split("~");
|
||||
@@ -120,28 +132,80 @@ public class SyncMainSysServerImpl implements SyncMainSysServer {
|
||||
LocalTime endTime = LocalTime.parse(times[1], formatter);
|
||||
String startMillis = String.valueOf(startTime.toSecondOfDay() * 1000L);
|
||||
String endMillis = String.valueOf(endTime.toSecondOfDay() * 1000L);
|
||||
requestBody.setBusiness_hours(startMillis + "," + endMillis);
|
||||
storeMasterDTO.setBusinessHours(startMillis + "," + endMillis);
|
||||
} catch (Exception e) {
|
||||
log.info("时间转换异常:{},shopId:{},time:{}", e.getMessage(), shopId.toString(), buildInformationDO.getBusinessHours());
|
||||
}
|
||||
}
|
||||
Map<String, ExtendFieldTypeEnum> configMapByActive = ExtendFieldTypeEnum.getConfigMapByActive(active);
|
||||
Map<String, String> extendField = new HashMap<>();
|
||||
extendField.put(configMapByActive.get(ONLINE_STORE_MANAGER_MOBILE.getMsg()).getKey(), "");
|
||||
extendField.put(configMapByActive.get(ONLINE_SIGNATORY_NAME_1.getMsg()).getKey(), signFranchiseDO.getPartnershipSignatoryFirst());
|
||||
extendField.put(configMapByActive.get(ONLINE_SIGNATORY_MOBILE_1.getMsg()).getKey(), lineInfoDO.getMobile());
|
||||
extendField.put(configMapByActive.get(ONLINE_SIGNATORY_NAME_2.getMsg()).getKey(), signFranchiseDO.getPartnershipSignatorySecond());
|
||||
extendField.put(configMapByActive.get(ONLINE_SIGNATORY_MOBILE_2.getMsg()).getKey(), signFranchiseDO.getPartnershipSignatorySecondMobile());
|
||||
extendField.put(configMapByActive.get(ONLINE_ORDER_NAME.getMsg()).getKey(), buildInformationDO.getCShopName());
|
||||
extendField.put(configMapByActive.get(ONLINE_JOIN_MODE.getMsg()).getKey(), JoinModeEnum.getByCode(shopInfo.getJoinMode()));
|
||||
extendField.put(configMapByActive.get(ONLINE_STORE_TYPE.getMsg()).getKey(), StoreTypeEnum.getMessage(shopInfo.getStoreType()));
|
||||
extendField.put(configMapByActive.get(ONLINE_BRAND.getMsg()).getKey(), FranchiseBrandEnum.getDescByCode(shopInfo.getFranchiseBrand()));
|
||||
requestBody.setExtend_field(JSONObject.toJSONString(extendField));
|
||||
requestBody.setEid(eid);
|
||||
requestBody.setPartnerName(lineInfoDO.getUsername());
|
||||
requestBody.setPartnerMobile(lineInfoDO.getMobile());
|
||||
requestBody.setPartnerRoleId(UserRoleEnum.FRANCHISEES.getCode());
|
||||
simpleMessageService.send(JSONObject.toJSONString(requestBody), RocketMqTagEnum.ZXJP_CREATE_STORE);
|
||||
|
||||
StoreMasterDTO.SettlerInfo settlerInfo = new StoreMasterDTO.SettlerInfo();
|
||||
settlerInfo.setSettlerName(buildInformationDO.getSettlerName());
|
||||
settlerInfo.setSettlerIdCardNo(buildInformationDO.getSettlerIdCardNo());
|
||||
settlerInfo.setSettlerIdCardFront(buildInformationDO.getSettlerIdCardFront());
|
||||
settlerInfo.setSettlerIdCardReverse(buildInformationDO.getSettlerIdCardReverse());
|
||||
settlerInfo.setSettlerInHandFrontPicture(buildInformationDO.getSettlerInHandFrontPicture());
|
||||
settlerInfo.setSettlerInHandBackPicture(buildInformationDO.getSettlerInHandBackPicture());
|
||||
settlerInfo.setSettlerBankName(buildInformationDO.getSettlerBankName());
|
||||
settlerInfo.setSettlerBankBranchName(buildInformationDO.getSettlerBankName());
|
||||
settlerInfo.setSettlerBankNumber(buildInformationDO.getSettlerBankNumber());
|
||||
settlerInfo.setSettlerBankMobile(buildInformationDO.getSettlerBankMobile());
|
||||
settlerInfo.setSettlerBankPhotoUrl(buildInformationDO.getSettlerBankPhotoUrl());
|
||||
settlerInfo.setSettlerBankBackPhotoUrl(buildInformationDO.getSettlerBankBackPhotoUrl());
|
||||
storeMasterDTO.setSettlerInfo(settlerInfo);
|
||||
}
|
||||
|
||||
|
||||
if (shopInfo.getPointId()!=null){
|
||||
PointInfoDO info = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
|
||||
PointDetailInfoDO pointDetail = pointDetailDAO.getPointDetailInfoByPointId(shopInfo.getPointId());
|
||||
if (info != null){
|
||||
storeMasterDTO.setArea(info.getProvince()+info.getCity()+info.getDistrict());
|
||||
storeMasterDTO.setTown(info.getTownship());
|
||||
storeMasterDTO.setStoreAddress(info.getAddress());
|
||||
storeMasterDTO.setLocationAddress(info.getAddress());
|
||||
storeMasterDTO.setPointCode(info.getPointCode());
|
||||
storeMasterDTO.setLongitude(info.getLongitude());
|
||||
storeMasterDTO.setLatitude(info.getLatitude());
|
||||
try {
|
||||
if (StringUtils.isNotEmpty(pointDetail.getMonthRent())&&pointDetail.getPaymentMethod()!=null){
|
||||
//获取支付方式
|
||||
PaymentMethodEnum paymentMethodEnum = PaymentMethodEnum.getByCode(pointDetail.getPaymentMethod());
|
||||
BigDecimal monthlyRent = new BigDecimal(pointDetail.getMonthRent()).divide(new BigDecimal(paymentMethodEnum.getTotalMonth()));
|
||||
storeMasterDTO.setMonthlyRent(monthlyRent);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.info("月租转换异常:{},shopId:{},time:{}", e.getMessage(), shopId.toString(), pointDetail.getMonthRent());
|
||||
}
|
||||
}
|
||||
}
|
||||
OrderSysInfoDO orderSysInfoDO = orderSysInfoDAO.selectByShopId(shopId);
|
||||
if (orderSysInfoDO != null){
|
||||
storeMasterDTO.setAddresseeName(orderSysInfoDO.getAddresseeName());
|
||||
storeMasterDTO.setAddresseeMobile(orderSysInfoDO.getAddresseeMobile());
|
||||
storeMasterDTO.setAddresseeArea(orderSysInfoDO.getAddresseeProvince()+orderSysInfoDO.getAddresseeCity()+orderSysInfoDO.getAddresseeDistrict());
|
||||
storeMasterDTO.setAddresseeAddress(orderSysInfoDO.getAddresseeAddress());
|
||||
storeMasterDTO.setDeclareGoodsLogisticsWarehouse(orderSysInfoDO.getDeclareGoodsLogisticsWarehouse());
|
||||
storeMasterDTO.setDeclareGoodsType(Integer.valueOf(orderSysInfoDO.getDeclareGoodsType()));
|
||||
storeMasterDTO.setDeclareGoodsDate(orderSysInfoDO.getDeclareGoodsDate());
|
||||
}
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
StoreMasterDTO.SignerInfo signerInfo = new StoreMasterDTO.SignerInfo();
|
||||
if (lineInfoDO != null){
|
||||
signerInfo.setSigner1Name(lineInfoDO.getUsername());
|
||||
signerInfo.setSigner1Mobile(lineInfoDO.getMobile());
|
||||
signerInfo.setPartnerRoleId(UserRoleEnum.FRANCHISEES.getCode());
|
||||
}
|
||||
QualificationsInfoDO infoDO = qualificationsInfoDAO.getByLineId(shopInfo.getLineId());
|
||||
if (infoDO != null){
|
||||
signerInfo.setSigner1IdCard(infoDO.getIdCardNo());
|
||||
signerInfo.setSigner1IdCardPhoto(infoDO.getFrontOfIdCard());
|
||||
signerInfo.setSigner1IdCardPhotoBack(infoDO.getBackOfIdCard());
|
||||
}
|
||||
storeMasterDTO.setSignerInfo(signerInfo);
|
||||
simpleMessageService.send(JSONObject.toJSONString(storeMasterDTO), RocketMqTagEnum.ZXJP_CREATE_STORE);
|
||||
} catch (Exception e) {
|
||||
log.info("asdStore_error:{},shopId:{}", e.getMessage(), shopId.toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -239,6 +239,7 @@ public class XxlJobHandler {
|
||||
}
|
||||
Map<Long, LicenseTransactDO> transactDOMap = licenseTransactDOS.stream().collect(Collectors.toMap(LicenseTransactDO::getShopId, x -> x));
|
||||
List<LicenseSyncInfoDTO> pushList = new ArrayList<>();
|
||||
List<LicenseTransactDO> pushBusinessList = new ArrayList<>();
|
||||
infoDOS.forEach(x -> {
|
||||
LicenseTransactDO licenseTransactDO = transactDOMap.get(x.getShopId());
|
||||
Integer currentStoreSyncCount = 0;
|
||||
@@ -248,6 +249,7 @@ public class XxlJobHandler {
|
||||
pushList.add(createLicenseSyncInfoDTO(x.getStoreId(), CommonConstants.ONE,
|
||||
licenseTransactDO.getCreditUrl(), licenseTransactDO.getIssueTime(), licenseTransactDO.getValidity()));
|
||||
currentStoreSyncCount++;
|
||||
pushBusinessList.add(licenseTransactDO);
|
||||
}
|
||||
|
||||
// 同步食品经营许可证
|
||||
@@ -265,6 +267,12 @@ public class XxlJobHandler {
|
||||
currentStoreSyncCount++;
|
||||
}
|
||||
|
||||
if (currentStoreSyncCount == CommonConstants.TWO) {
|
||||
updateSyncList.add(licenseTransactDO.getId());
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
// 发送消息
|
||||
if (!pushList.isEmpty()) {
|
||||
LicenseDTO licenseDTO = new LicenseDTO();
|
||||
@@ -273,16 +281,20 @@ public class XxlJobHandler {
|
||||
log.info("licenseDTO:{}",JSONObject.toJSONString(licenseDTO));
|
||||
simpleMessageService.send(JSONObject.toJSONString(licenseDTO), RocketMqTagEnum.PARTNER_LICENSE_SYNC_QUEUE);
|
||||
}
|
||||
if (currentStoreSyncCount == CommonConstants.TWO) {
|
||||
updateSyncList.add(licenseTransactDO.getId());
|
||||
//工商信息变更
|
||||
if (!pushBusinessList.isEmpty()){
|
||||
Map<Long, String> transactMap = infoDOS.stream().collect(Collectors.toMap(LicenseSyncDTO::getShopId, LicenseSyncDTO::getStoreId));
|
||||
BusinessDTO businessDTO = new BusinessDTO();
|
||||
businessDTO.setEnterpriseId(eid);
|
||||
businessDTO.setTransactMap(transactMap);
|
||||
businessDTO.setRequests(pushBusinessList);
|
||||
simpleMessageService.send(JSONObject.toJSONString(businessDTO), RocketMqTagEnum.BUSINESS_SYNC);
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
hasNext = licenseTransactDOS.size() >= pageSize;
|
||||
pageNum++;
|
||||
}
|
||||
|
||||
log.info("licenseDTO:{}",JSONObject.toJSONString(updateSyncList));
|
||||
if (CollectionUtils.isNotEmpty(updateSyncList)) {
|
||||
applyLicenseMapper.updateSyncFlagByIds(updateSyncList);
|
||||
|
||||
@@ -58,10 +58,10 @@ signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
fixMobileOpenid=HSAY5531DA7
|
||||
#xxljob配置
|
||||
#xxljob配置
|
||||
xxl.job.admin.addresses = http://10.7.53.224:10001/xxl-job-admin
|
||||
xxl.job.admin.addresses = http://10.6.48.226:10001/xxl-job-admin
|
||||
xxl.job.executor.appname = ${spring.application.name}
|
||||
xxl.job.executor.ip =
|
||||
xxl.job.executor.port = 40001
|
||||
xxl.job.executor.port = 40301
|
||||
xxl.job.executor.logpath = logs/xxl-job/jobhandler
|
||||
xxl.job.executor.logretentiondays = 30
|
||||
xxl.job.accessToken = 25365115eed84e9ba5e0040abb255a09
|
||||
|
||||
Reference in New Issue
Block a user