Merge remote-tracking branch 'origin/master'

This commit is contained in:
Tankaikai 2025-04-12 16:44:02 +08:00
commit f26965704b
2 changed files with 212 additions and 43 deletions

View File

@ -428,7 +428,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
.eq(Product::getId, id)
.eq(Product::getShopId, shopId)
.update();
prodGroupRelationMapper.deleteByQuery(query().eq(ProdGroupRelation::getProductId, id).eq(ProdGroup::getShopId, shopId));
prodGroupRelationMapper.deleteByQuery(query().eq(ProdGroupRelation::getProductId, id));
}
@Override

View File

@ -196,17 +196,18 @@ public class ShopSyncServiceImpl implements ShopSyncService {
public Map<Long, Long> syncUnit(Long sourceShopId, Long pointShopId, List<Map<String, Object>> mainMapList) {
Map<Long, Long> unitMap = new HashMap<>();
Map<Long, ShopProdUnit> unitEntityMap = new HashMap<>();
List<Long> pointShopUnits = new ArrayList<>();
List<ShopProdUnit> pointUnits = unitService.queryChain()
.eq(ShopProdUnit::getShopId, pointShopId)
.isNotNull(ShopProdUnit::getSyncId)
.list();
pointUnits.stream().forEach(tbShopUnit -> {
unitMap.put(tbShopUnit.getSyncId(), tbShopUnit.getId());
pointShopUnits.add(tbShopUnit.getSyncId());
unitEntityMap.put(tbShopUnit.getSyncId(), tbShopUnit);
});
List<ShopProdUnit> list = unitService.queryChain().eq(ShopProdUnit::getShopId, sourceShopId).list();
list.forEach(tbShopUnit -> {
for (ShopProdUnit tbShopUnit : list) {
if (CollUtil.isEmpty(pointShopUnits) || !pointShopUnits.contains(tbShopUnit.getId())) {
ShopProdUnit unitNew = BeanUtil.copyProperties(tbShopUnit, ShopProdUnit.class);
unitNew.setId(null);
@ -214,9 +215,21 @@ public class ShopSyncServiceImpl implements ShopSyncService {
unitNew.setShopId(pointShopId);
unitService.save(unitNew);
unitMap.put(tbShopUnit.getId(), unitNew.getId());
} else {
ShopProdUnit unit = unitEntityMap.get(tbShopUnit.getId());
if (unit == null) {
continue;
}
unit.setUnitType(tbShopUnit.getUnitType());
unit.setName(tbShopUnit.getName());
unit.setStatus(tbShopUnit.getStatus());
unitService.updateById(unit, false);
unitMap.put(unit.getSyncId(), unit.getId());
}
});
buildNotice(mainMapList, "单位同步", unitMap.size() - pointShopUnits.size(), null, null);
}
;
buildNotice(mainMapList, "单位同步", pointShopUnits.size(), null, null);
buildNotice(mainMapList, "单位新增", unitMap.size() - pointShopUnits.size(), null, null);
log.info("单位同步,源{}个,已有{}个,同步{}个", list.size(), pointShopUnits.size(), unitMap.size() - pointShopUnits.size());
return unitMap;
}
@ -262,28 +275,63 @@ public class ShopSyncServiceImpl implements ShopSyncService {
//规格
public Map<Long, Long> syncSpec(Long sourceShopId, Long pointShopId, List<Map<String, Object>> mainMapList) {
Map<Long, Long> specMap = new HashMap<>();
Map<Long, ShopProdSpec> specEntityMap = new HashMap<>();
List<Long> pointShopSpecs = new ArrayList<>();
List<ShopProdSpec> newPointList = new ArrayList<>();
List<ShopProdSpec> pointList = specService.queryChain()
.eq(ShopProdSpec::getShopId, pointShopId)
.isNotNull(ShopProdSpec::getSyncId)
.list();
for (ShopProdSpec shopProdSpec : pointList) {
pointShopSpecs.add(shopProdSpec.getSyncId());
specMap.put(shopProdSpec.getSyncId(), shopProdSpec.getId());
specEntityMap.put(shopProdSpec.getSyncId(), shopProdSpec);
}
List<ShopProdSpec> list = specService.queryChain().eq(ShopProdSpec::getShopId, sourceShopId.toString()).list();
list.forEach(spec -> {
for (ShopProdSpec spec : list) {
if (CollUtil.isEmpty(pointShopSpecs) || !pointShopSpecs.contains(spec.getId())) {
ShopProdSpec newSpec = BeanUtil.copyProperties(spec, ShopProdSpec.class);
newSpec.setId(null);
newSpec.setSyncId(spec.getId());
newSpec.setShopId(pointShopId);
specService.save(newSpec);
newPointList.add(newSpec);
specMap.put(spec.getId(), newSpec.getId());
} else {
ShopProdSpec newSpec = specEntityMap.get(spec.getId());
if (newSpec == null) {
continue;
}
newSpec.setPid(spec.getPid());
newSpec.setPids(spec.getPids());
newSpec.setName(spec.getName());
newSpec.setFullName(spec.getFullName());
newSpec.setLevel(spec.getLevel());
newSpec.setSort(spec.getSort());
newSpec.setStatus(spec.getStatus());
specService.updateById(newSpec, false);
specMap.put(spec.getId(), newSpec.getId());
newPointList.add(newSpec);
}
});
}
for (ShopProdSpec shopProdSpec : newPointList) {
if (shopProdSpec.getPid() != null && !shopProdSpec.getPid().equals(0L)) {
shopProdSpec.setPid(specMap.get(shopProdSpec.getPid()));
String[] split = shopProdSpec.getPids().split(",");
for (String pid : split) {
if ("0".equals(pid)) {
shopProdSpec.setPids("0,");
} else {
if (!"null".equals(pid) && specMap.containsKey(Long.valueOf(pid))) {
shopProdSpec.setPids(shopProdSpec.getPids() + specMap.get(Long.valueOf(pid)) + ",");
}
}
}
specService.updateById(shopProdSpec);
}
}
log.info("规格同步,源{}个,已有{}个,同步{}个", list.size(), pointShopSpecs.size(), specMap.size() - pointShopSpecs.size());
buildNotice(mainMapList, "规格同步", specMap.size() - pointShopSpecs.size(), null, null);
buildNotice(mainMapList, "规格同步", pointShopSpecs.size(), null, null);
buildNotice(mainMapList, "规格新增", specMap.size() - pointShopSpecs.size(), null, null);
return specMap;
}
@ -328,14 +376,16 @@ public class ShopSyncServiceImpl implements ShopSyncService {
// 分类
public Map<Long, Long> syncCategory(Long sourceShopId, Long pointShopId, List<Map<String, Object>> mainMapList) {
Map<Long, Long> categoryMap = new HashMap<>();
Map<Long, ShopProdCategory> categoryEntityMap = new HashMap<>();
List<Long> pointShopCateGory = new ArrayList<>();
List<ShopProdCategory> newPointShopCateGory = new ArrayList<>();
List<ShopProdCategory> pointList = categoryService.queryChain()
.eq(ShopProdCategory::getShopId, pointShopId)
.isNotNull(ShopProdCategory::getSyncId)
.list();
for (ShopProdCategory shopProdCategory : pointList) {
pointShopCateGory.add(shopProdCategory.getSyncId());
categoryMap.put(shopProdCategory.getSyncId(), shopProdCategory.getId());
categoryEntityMap.put(shopProdCategory.getSyncId(), shopProdCategory);
}
List<ShopProdCategory> tbShopCategories = categoryService.queryChain()
.eq(ShopProdCategory::getShopId, sourceShopId)
@ -351,10 +401,25 @@ public class ShopSyncServiceImpl implements ShopSyncService {
tbShopCategoryNew.setSyncId(shopProdCategory.getId());
categoryService.save(tbShopCategoryNew);
categoryMap.put(shopProdCategory.getId(), tbShopCategoryNew.getId());
newPointShopCateGory.add(tbShopCategoryNew);
} else {
ShopProdCategory tbShopCategoryNew = categoryEntityMap.get(shopProdCategory.getId());
if (tbShopCategoryNew == null) {
continue;
}
tbShopCategoryNew.setName(shopProdCategory.getName());
tbShopCategoryNew.setShortName(shopProdCategory.getShortName());
tbShopCategoryNew.setPic(shopProdCategory.getPic());
tbShopCategoryNew.setDetail(shopProdCategory.getDetail());
tbShopCategoryNew.setSort(shopProdCategory.getSort());
tbShopCategoryNew.setKeyWord(shopProdCategory.getKeyWord());
tbShopCategoryNew.setStatus(shopProdCategory.getStatus());
categoryService.updateById(tbShopCategoryNew, false);
categoryMap.put(shopProdCategory.getId(), tbShopCategoryNew.getId());
newPointShopCateGory.add(tbShopCategoryNew);
}
}
int childrenSize = 0;
int syncSize = categoryMap.size();
if (CollectionUtil.isNotEmpty(treeIds)) {
List<ShopProdCategory> children = categoryService.queryChain()
.eq(ShopProdCategory::getShopId, sourceShopId)
@ -370,12 +435,28 @@ public class ShopSyncServiceImpl implements ShopSyncService {
tbShopCategoryNew.setPid(categoryMap.get(child.getPid()));
categoryService.save(tbShopCategoryNew);
categoryMap.put(child.getId(), tbShopCategoryNew.getId());
newPointShopCateGory.add(tbShopCategoryNew);
} else {
ShopProdCategory tbShopCategoryNew = categoryEntityMap.get(child.getId());
tbShopCategoryNew.setName(child.getName());
tbShopCategoryNew.setShortName(child.getShortName());
tbShopCategoryNew.setPic(child.getPic());
tbShopCategoryNew.setDetail(child.getDetail());
tbShopCategoryNew.setSort(child.getSort());
tbShopCategoryNew.setKeyWord(child.getKeyWord());
tbShopCategoryNew.setStatus(child.getStatus());
categoryService.updateById(tbShopCategoryNew, false);
categoryMap.put(child.getId(), tbShopCategoryNew.getId());
newPointShopCateGory.add(tbShopCategoryNew);
}
}
}
log.info("分类同步,源 父类分类{}个,同步{}个", tbShopCategories.size(), syncSize);
log.info("分类同步,源 子类分类{}个,同步{}个", childrenSize, categoryMap.size() - syncSize);
buildNotice(mainMapList, "分类同步", categoryMap.size(), null, null);
// for (ShopProdCategory shopProdCategory : newPointShopCateGory) {
// shopProdCategory.getPid()
// }
log.info("分类同步,同步{}个", categoryMap.size());
buildNotice(mainMapList, "分类同步", tbShopCategories.size() + childrenSize - pointShopCateGory.size(), null, null);
buildNotice(mainMapList, "分类新增", categoryMap.size() - pointShopCateGory.size(), null, null);
return categoryMap;
}
@ -427,6 +508,7 @@ public class ShopSyncServiceImpl implements ShopSyncService {
public Map<Long, Long> syncProduct(Long sourceShopId, Long pointShopId, Map<Long, Long> unitMap,
Map<Long, Long> specMap, Map<Long, Long> cateGoryMap, List<Map<String, Object>> mainMapList) {
Map<Long, Long> proMap = new HashMap<>();
Map<Long, Product> pointMap = new HashMap<>();
List<Long> pointProducts = new ArrayList<>();
List<Product> pointList = productService.queryChain()
.eq(Product::getShopId, pointShopId)
@ -434,7 +516,7 @@ public class ShopSyncServiceImpl implements ShopSyncService {
.list();
for (Product product : pointList) {
pointProducts.add(product.getSyncId());
proMap.put(product.getSyncId(), product.getId());
pointMap.put(product.getSyncId(), product);
}
List<Product> products = productService.queryChain().eq(Product::getShopId, sourceShopId).list();
if (CollectionUtil.isNotEmpty(products)) {
@ -456,11 +538,35 @@ public class ShopSyncServiceImpl implements ShopSyncService {
}
productService.save(tbProductNew);
proMap.put(tbProduct.getId(), tbProductNew.getId());
} else {
Product tbProductNew = pointMap.get(tbProduct.getId());
if (tbProductNew == null) {
continue;
}
tbProductNew.setCategoryId(tbProduct.getCategoryId() != null ? cateGoryMap.get(tbProduct.getCategoryId()) : null);
tbProductNew.setSpecId(tbProduct.getSpecId() != null ? specMap.get(tbProduct.getSpecId()) : null);
tbProductNew.setUnitId(tbProduct.getUnitId() != null ? unitMap.get(tbProduct.getUnitId()) : null);
tbProductNew.setName(tbProduct.getName());
tbProductNew.setShortTitle(tbProduct.getShortTitle());
tbProductNew.setType(tbProduct.getType());
tbProductNew.setGroupType(tbProduct.getGroupType());
tbProductNew.setPackFee(tbProduct.getPackFee());
tbProductNew.setCoverImg(tbProduct.getCoverImg());
tbProductNew.setImages(tbProduct.getImages());
tbProductNew.setWarnLine(tbProduct.getWarnLine());
tbProductNew.setWeight(tbProduct.getWeight());
tbProductNew.setSelectSpecInfo(tbProduct.getSelectSpecInfo());
tbProductNew.setSort(tbProduct.getSort());
tbProductNew.setIsDel(tbProduct.getIsDel());
tbProductNew.setGroupSnap(tbProduct.getGroupSnap());
productService.updateById(tbProductNew, false);
proMap.put(tbProductNew.getSyncId(), tbProductNew.getId());
}
}
}
log.info("商品同步,源{}个,已有{}个,同步{}个", products.size(), pointProducts.size(), proMap.size() - pointProducts.size());
buildNotice(mainMapList, "商品同步", proMap.size() - pointProducts.size(), null, null);
buildNotice(mainMapList, "商品同步", pointProducts.size(), null, null);
buildNotice(mainMapList, "商品新增", proMap.size() - pointProducts.size(), null, null);
return proMap;
}
@ -751,10 +857,16 @@ public class ShopSyncServiceImpl implements ShopSyncService {
//分组
public Map<Long, Long> syncSku(Long sourceShopId, Long pointShopId, Map<Long, Long> prods) {
Map<Long, Long> skuMap = new HashMap<>();
List<Long> pointSkus = skuService.queryChain().select(ProdSku::getSyncId)
Map<Long, ProdSku> pointSkuMap = new HashMap<>();
List<Long> pointSkus = new ArrayList<>();
List<ProdSku> skus = skuService.queryChain()
.eq(ProdSku::getShopId, pointShopId)
.isNotNull(ProdSku::getSyncId)
.listAs(Long.class);
.list();
skus.forEach(tbShopSku -> {
pointSkus.add(tbShopSku.getSyncId());
pointSkuMap.put(tbShopSku.getSyncId(), tbShopSku);
});
List<ProdSku> list = skuService.queryChain().eq(ProdSku::getShopId, sourceShopId).list();
for (ProdSku prodSku : list) {
if (prods.containsKey(prodSku.getProductId()) && (CollUtil.isEmpty(pointSkus) || !pointSkus.contains(prodSku.getId()))) {
@ -765,6 +877,24 @@ public class ShopSyncServiceImpl implements ShopSyncService {
newSku.setSyncId(prodSku.getId());
skuService.save(newSku);
skuMap.put(prodSku.getId(), newSku.getId());
} else {
ProdSku newSku = pointSkuMap.get(prodSku.getId());
if (newSku == null) {
continue;
}
newSku.setSpecInfo(prodSku.getSpecInfo());
newSku.setCoverImg(prodSku.getCoverImg());
newSku.setIsDel(prodSku.getIsDel());
newSku.setBarCode(prodSku.getBarCode());
newSku.setOriginPrice(prodSku.getOriginPrice());
newSku.setCostPrice(prodSku.getCostPrice());
newSku.setMemberPrice(prodSku.getMemberPrice());
newSku.setSalePrice(prodSku.getSalePrice());
newSku.setSuitNum(prodSku.getSuitNum());
newSku.setWeight(prodSku.getWeight());
skuService.updateById(newSku, false);
skuMap.put(prodSku.getId(), newSku.getId());
}
}
log.info("商品SKU同步,源{}个,已有{}个,同步{}个", list.size(), pointSkus.size(), skuMap.size());
@ -805,6 +935,7 @@ public class ShopSyncServiceImpl implements ShopSyncService {
public Map<Long, Long> syncConsGroup(Long sourceShopId, Long pointShopId, List<Map<String, Object>> mainMapList) {
Map<Long, Long> consGroupMap = new HashMap<>();
Map<Long, ConsGroup> pointConsGroupMap = new HashMap<>();
List<Long> pointConsGroup = new ArrayList<>();
List<ConsGroup> consGroupList = consGroupService.queryChain()
.eq(ConsGroup::getShopId, pointShopId)
@ -812,7 +943,7 @@ public class ShopSyncServiceImpl implements ShopSyncService {
.list();
for (ConsGroup consGroup : consGroupList) {
pointConsGroup.add(consGroup.getSyncId());
consGroupMap.put(consGroup.getSyncId(), consGroup.getId());
pointConsGroupMap.put(consGroup.getSyncId(), consGroup);
}
List<ConsGroup> list = consGroupService.queryChain().eq(ConsGroup::getShopId, sourceShopId).list();
for (ConsGroup consGroup : list) {
@ -823,10 +954,20 @@ public class ShopSyncServiceImpl implements ShopSyncService {
newConsGroup.setShopId(pointShopId);
consGroupService.save(newConsGroup);
consGroupMap.put(consGroup.getId(), newConsGroup.getId());
} else {
ConsGroup newConsGroup = pointConsGroupMap.get(consGroup.getId());
if (newConsGroup == null) {
continue;
}
newConsGroup.setName(consGroup.getName());
newConsGroup.setStatus(consGroup.getStatus());
consGroupService.updateById(newConsGroup, false);
consGroupMap.put(consGroup.getId(), newConsGroup.getId());
}
}
log.info("耗材分组同步,源{}个,已有{}个,同步{}个", list.size(), pointConsGroup.size(), consGroupMap.size() - pointConsGroup.size());
buildNotice(mainMapList, "耗材分组同步", consGroupMap.size() - pointConsGroup.size(), null, null);
buildNotice(mainMapList, "耗材分组同步", pointConsGroup.size(), null, null);
buildNotice(mainMapList, "耗材分组新增", consGroupMap.size() - pointConsGroup.size(), null, null);
return consGroupMap;
}
@ -870,6 +1011,7 @@ public class ShopSyncServiceImpl implements ShopSyncService {
// 耗材
public Map<Long, Long> syncConsInfo(Long sourceShopId, Long pointShopId, Map<Long, Long> consGroupMap, List<Map<String, Object>> mainMapList) {
Map<Long, Long> consMap = new HashMap<>();
Map<Long, ConsInfo> pointConsMap = new HashMap<>();
List<Long> pointConsInfo = new ArrayList<>();
List<ConsInfo> pointList = consInfoService.queryChain()
.eq(ConsInfo::getShopId, pointShopId)
@ -877,7 +1019,7 @@ public class ShopSyncServiceImpl implements ShopSyncService {
.list();
for (ConsInfo consInfo : pointList) {
pointConsInfo.add(consInfo.getSyncId());
consMap.put(consInfo.getSyncId(), consInfo.getId());
pointConsMap.put(consInfo.getSyncId(), consInfo);
}
List<ConsInfo> list = consInfoService.queryChain().eq(ConsInfo::getShopId, sourceShopId).list();
for (ConsInfo cons : list) {
@ -890,10 +1032,28 @@ public class ShopSyncServiceImpl implements ShopSyncService {
conInfo.setStockNumber(BigDecimal.ZERO);
consInfoService.save(conInfo);
consMap.put(cons.getId(), conInfo.getId());
} else {
ConsInfo conInfo = pointConsMap.get(cons.getId());
if (conInfo == null) {
continue;
}
conInfo.setConsGroupId(consGroupMap.get(conInfo.getConsGroupId()));
conInfo.setConName(cons.getConName());
conInfo.setPrice(cons.getPrice());
conInfo.setStatus(cons.getStatus());
conInfo.setConUnit(cons.getConUnit());
conInfo.setConWarning(cons.getConWarning());
conInfo.setIsStock(cons.getIsStock());
conInfo.setConUnitTwo(cons.getConUnitTwo());
conInfo.setConUnitTwoConvert(cons.getConUnitTwoConvert());
conInfo.setDefaultUnit(cons.getDefaultUnit());
consInfoService.updateById(conInfo, false);
consMap.put(cons.getId(), conInfo.getId());
}
}
log.info("耗材同步,源{}个,已有{}个,同步{}个", list.size(), pointConsInfo.size(), consMap.size() - pointConsInfo.size());
buildNotice(mainMapList, "耗材信息同步", consMap.size() - pointConsInfo.size(), null, null);
buildNotice(mainMapList, "耗材信息同步", pointConsInfo.size(), null, null);
buildNotice(mainMapList, "耗材信息新增", consMap.size() - pointConsInfo.size(), null, null);
return consMap;
}
@ -942,8 +1102,8 @@ public class ShopSyncServiceImpl implements ShopSyncService {
}
public void syncConsPro(Long sourceShopId, Long pointShopId, Map<Long, Long> consMap, Map<Long, Long> proMap) {
prodConsRelationService.remove(QueryWrapper.create().eq(ProdConsRelation::getShopId, pointShopId));
List<ProdConsRelation> list = prodConsRelationService.queryChain().eq(ProdConsRelation::getShopId, sourceShopId).list();
List<ProdConsRelation> upList = new ArrayList<>();
List<ProdConsRelation> addList = new ArrayList<>();
for (ProdConsRelation prodConsRelation : list) {
prodConsRelation.setShopId(pointShopId);
@ -953,24 +1113,11 @@ public class ShopSyncServiceImpl implements ShopSyncService {
log.info("关联关系同步失败 商品ID:{}或耗材ID:{}不存在", prodConsRelation.getProductId(), prodConsRelation.getConsInfoId());
continue;
}
ProdConsRelation oldRelation = prodConsRelationService.queryChain()
.eq(ProdConsRelation::getShopId, pointShopId)
.eq(ProdConsRelation::getProductId, prodConsRelation.getProductId())
.eq(ProdConsRelation::getConsInfoId, prodConsRelation.getConsInfoId()).one();
if (oldRelation == null) {
addList.add(prodConsRelation);
} else {
if (oldRelation.getSurplusStock().compareTo(prodConsRelation.getSurplusStock()) != 0) {
upList.add(prodConsRelation);
}
}
addList.add(prodConsRelation);
}
if (CollUtil.isNotEmpty(addList)) {
prodConsRelationService.saveBatch(addList, 100);
}
if (CollUtil.isNotEmpty(upList)) {
prodConsRelationService.updateBatch(addList, 100);
}
log.info("耗材与商品关联关系,同步{}个", list.size());
}
@ -1028,13 +1175,18 @@ public class ShopSyncServiceImpl implements ShopSyncService {
public Map<Long, Long> syncVendor(Long sourceShopId, Long pointShopId, List<Map<String, Object>> mainMapList) {
Map<Long, Long> vendorMap = new HashMap<>();
List<Long> pointShopVendor = vendorService.queryChain().select(ShopVendor::getSyncId)
Map<Long, ShopVendor> pointVendorMap = new HashMap<>();
List<Long> pointShopVendor = new ArrayList<>();
List<ShopVendor> pointShopVendorList = vendorService.queryChain()
.eq(ShopVendor::getShopId, pointShopId)
.isNotNull(ShopVendor::getSyncId)
.listAs(Long.class);
.list();
for (ShopVendor shopVendor : pointShopVendorList) {
pointShopVendor.add(shopVendor.getSyncId());
pointVendorMap.put(shopVendor.getSyncId(), shopVendor);
}
List<ShopVendor> list = vendorService.queryChain().eq(ShopVendor::getShopId, sourceShopId).list();
list.forEach(vendor -> {
for (ShopVendor vendor : list) {
if (CollUtil.isEmpty(pointShopVendor) || !pointShopVendor.contains(vendor.getId())) {
ShopVendor vendorNew = BeanUtil.copyProperties(vendor, ShopVendor.class);
vendorNew.setId(null);
@ -1042,9 +1194,26 @@ public class ShopSyncServiceImpl implements ShopSyncService {
vendorNew.setShopId(pointShopId);
vendorService.save(vendorNew);
vendorMap.put(vendor.getId(), vendorNew.getId());
} else {
ShopVendor vendorNew = pointVendorMap.get(vendor.getId());
if (vendorNew == null) {
continue;
}
vendorNew.setSort(vendor.getSort());
vendorNew.setName(vendor.getName());
vendorNew.setContactName(vendor.getContactName());
vendorNew.setTelephone(vendor.getTelephone());
vendorNew.setAddress(vendor.getAddress());
vendorNew.setPeriod(vendor.getPeriod());
vendorNew.setTip(vendor.getTip());
vendorNew.setRemark(vendor.getRemark());
vendorNew.setIsDel(vendor.getIsDel());
vendorService.updateById(vendorNew, false);
vendorMap.put(vendor.getId(), vendorNew.getId());
}
});
buildNotice(mainMapList, "单位同步", vendorMap.size(), null, null);
}
buildNotice(mainMapList, "供应商同步", pointShopVendor.size(), null, null);
buildNotice(mainMapList, "供应商新增", vendorMap.size() - pointShopVendor.size(), null, null);
log.info("供应商同步,源{}个,已有{}个,同步{}个", list.size(), pointShopVendor.size(), vendorMap.size());
return vendorMap;
}