diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreBaseServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreBaseServiceImpl.java index 6250405a..53d8eb7a 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreBaseServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/store/service/impl/ShopStoreBaseServiceImpl.java @@ -790,9 +790,15 @@ public class ShopStoreBaseServiceImpl extends BaseServiceImpl 1) { - queryWrapper.in("store_category_id", store_category_ids); + queryWrapper.and(q->{ + q.in("store_category_id",store_category_ids); + q.or().in("store_2nd_category_id",store_category_ids); + }); } else { - queryWrapper.eq("store_category_id", store_category_id); + queryWrapper.or(q->{ + q.eq("store_category_id",store_category_ids); + q.or().eq("store_2nd_category_id",store_category_ids); + }); } params.put("store_category_id", store_category_id); }