jyc 3 ヶ月 前
コミット
16ac4f9b0a

+ 2 - 2
alien-store/src/main/java/shop/alien/store/service/impl/StoreInfoServiceImpl.java

@@ -1589,7 +1589,7 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         // 构建查询优惠券的条件对象
         LambdaUpdateWrapper<LifeCoupon> quanWrapper = new LambdaUpdateWrapper<>();
         // 添加门店ID筛选条件
-        quanWrapper.in(LifeCoupon::getStoreId, storeIds)
+        quanWrapper.in(ObjectUtils.isNotEmpty(storeIds),LifeCoupon::getStoreId, storeIds)
                 // 添加优惠券状态筛选条件
                 .eq(LifeCoupon::getStatus, CouponStatusEnum.ONGOING.getCode())
                 // 按照创建时间降序排序
@@ -1599,7 +1599,7 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         // 构建查询团购套餐条件对象
         LambdaUpdateWrapper<LifeGroupBuyMain> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
         // 添加门店ID筛选条件
-        lambdaUpdateWrapper.in(LifeGroupBuyMain::getStoreId, storeIds)
+        lambdaUpdateWrapper.in(ObjectUtils.isNotEmpty(storeIds),LifeGroupBuyMain::getStoreId, storeIds)
                 // 添加团购套餐状态筛选条件
                 .eq(LifeGroupBuyMain::getStatus, 5)
                 .orderByDesc(LifeGroupBuyMain::getCreatedTime);