消费返现
This commit is contained in:
@@ -55,6 +55,9 @@ public class ShopConfigServiceImpl extends ServiceImpl<ShopConfigMapper, ShopCon
|
|||||||
shopConfig.setId(mainShopId);
|
shopConfig.setId(mainShopId);
|
||||||
save(shopConfig);
|
save(shopConfig);
|
||||||
}
|
}
|
||||||
|
if (shopIdList == null) {
|
||||||
|
shopIdList = new ArrayList<>();
|
||||||
|
}
|
||||||
// 防止报错
|
// 防止报错
|
||||||
shopIdList.add(-9999L);
|
shopIdList.add(-9999L);
|
||||||
List<Long> extistList;
|
List<Long> extistList;
|
||||||
@@ -68,17 +71,19 @@ public class ShopConfigServiceImpl extends ServiceImpl<ShopConfigMapper, ShopCon
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isEnable == 0 && !onyUpValid) {
|
if (isEnable == 0 && !onyUpValid) {
|
||||||
|
List<Long> finalShopIdList = shopIdList;
|
||||||
updateChain().or(or -> {
|
updateChain().or(or -> {
|
||||||
or.eq(ShopConfig::getId, mainShopId);
|
or.eq(ShopConfig::getId, mainShopId);
|
||||||
}).or(or -> {
|
}).or(or -> {
|
||||||
or.in(ShopConfig::getId, shopIdList);
|
or.in(ShopConfig::getId, finalShopIdList);
|
||||||
}).set(property, 0).update();
|
}).set(property, 0).update();
|
||||||
}else {
|
}else {
|
||||||
if ("all".equals(useShopType)) {
|
if ("all".equals(useShopType)) {
|
||||||
|
List<Long> finalShopIdList1 = shopIdList;
|
||||||
updateChain().or(or -> {
|
updateChain().or(or -> {
|
||||||
or.eq(ShopConfig::getId, mainShopId);
|
or.eq(ShopConfig::getId, mainShopId);
|
||||||
}).or(or -> {
|
}).or(or -> {
|
||||||
or.in(ShopConfig::getId, shopIdList);
|
or.in(ShopConfig::getId, finalShopIdList1);
|
||||||
}).set(property, 1).update();
|
}).set(property, 1).update();
|
||||||
}else {
|
}else {
|
||||||
if (shopIdList.isEmpty()) {
|
if (shopIdList.isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user