同步 关联关联问题

This commit is contained in:
2025-04-12 16:51:24 +08:00
parent eb885016f5
commit 6838854209

View File

@@ -1125,6 +1125,8 @@ public class ShopSyncServiceImpl implements ShopSyncService {
@Override
@Transactional(rollbackFor = Exception.class)
public void syncConsProBySourceShop(Long sourceShopId, Long sourceProdId, Long sysUserId) {
try {
log.info("同步商品耗材关系开始");
assertAutoSync(sourceShopId);
AssertUtil.isNull(sourceProdId, "{}不能为空", "商品ID");
Set<Long> shopIds = checkSourceShopInfo(sourceShopId, 2);
@@ -1171,6 +1173,10 @@ public class ShopSyncServiceImpl implements ShopSyncService {
if (CollUtil.isNotEmpty(newSaveList)) {
prodConsRelationService.saveBatch(newSaveList, 100);
}
log.info("同步商品耗材关系结束");
} catch (Exception e) {
log.error("同步商品耗材关系异常", e);
}
}
public Map<Long, Long> syncVendor(Long sourceShopId, Long pointShopId, List<Map<String, Object>> mainMapList) {