分店配置同步

This commit is contained in:
张松 2025-11-07 15:38:44 +08:00
parent 0de787b742
commit 4080058400
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,8 @@ public class ShopConfigServiceImpl extends ServiceImpl<ShopConfigMapper, ShopCon
List<Long> extistList;
if (!shopIdList.isEmpty()) {
extistList = list(new QueryWrapper().in(ShopConfig::getId, shopIdList).select(ShopConfig::getId)).stream().map(ShopConfig::getId).toList();
shopIdList.stream().filter(id -> !extistList.contains(id)).forEach(id -> {
List<Long> finalShopIdList2 = shopIdList;
extistList.stream().filter(id -> !finalShopIdList2.contains(id)).forEach(id -> {
save(new ShopConfig().setId(id).setMainId(mainShopId).setIsEnableDiscount(0).setIsProductSuggest(0));
});
} else {