Merge branch 'cc_20250813_storeMaster' into 'master'

Cc 20250813 store master

See merge request hangzhou/java/custom_zxjp!154
This commit is contained in:
苏竹红
2025-08-21 09:10:08 +00:00
8 changed files with 352 additions and 83 deletions

View File

@@ -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,24 +267,34 @@ public class XxlJobHandler {
currentStoreSyncCount++;
}
// 发送消息
if (!pushList.isEmpty()) {
LicenseDTO licenseDTO = new LicenseDTO();
licenseDTO.setEnterpriseId(eid);
licenseDTO.setRequests(pushList);
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 (!pushList.isEmpty()) {
LicenseDTO licenseDTO = new LicenseDTO();
licenseDTO.setEnterpriseId(eid);
licenseDTO.setRequests(pushList);
log.info("licenseDTO:{}",JSONObject.toJSONString(licenseDTO));
simpleMessageService.send(JSONObject.toJSONString(licenseDTO), RocketMqTagEnum.PARTNER_LICENSE_SYNC_QUEUE);
}
//工商信息变更
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);

View File

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