分店配置同步
This commit is contained in:
parent
0de787b742
commit
4080058400
|
|
@ -63,7 +63,8 @@ public class ShopConfigServiceImpl extends ServiceImpl<ShopConfigMapper, ShopCon
|
||||||
List<Long> extistList;
|
List<Long> extistList;
|
||||||
if (!shopIdList.isEmpty()) {
|
if (!shopIdList.isEmpty()) {
|
||||||
extistList = list(new QueryWrapper().in(ShopConfig::getId, shopIdList).select(ShopConfig::getId)).stream().map(ShopConfig::getId).toList();
|
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));
|
save(new ShopConfig().setId(id).setMainId(mainShopId).setIsEnableDiscount(0).setIsProductSuggest(0));
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue