店铺按子类查询

This commit is contained in:
liyj 2025-09-27 19:18:41 +08:00
parent 6f186ea197
commit bde21f33c7

View File

@ -790,9 +790,15 @@ public class ShopStoreBaseServiceImpl extends BaseServiceImpl<ShopStoreBaseMappe
store_category_ids.add(storeCategory.getStore_category_id());
}
if (store_category_ids.size() > 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);
}