|
|
@@ -79,12 +79,15 @@ public class GoodsDonController {
|
|
|
yhsId = yhShopFrontService.getYhsIdByCustomId(customId);
|
|
|
}
|
|
|
String key = RedisService.key.YH_HOME_PAGHE_CACHE.getEnvName() + "category";
|
|
|
+ if (yhsId != null) {
|
|
|
+ key += ":yhShop:" + yhsId;
|
|
|
+ }
|
|
|
Object o = redisService.get(key);
|
|
|
List<GoodsDonCategoryFrontView> list;
|
|
|
MapBuilder mapBuilder = MapUtils.flatBuilder(request.getParameterMap());
|
|
|
String condition = " and (select count(*) from goods_don_category_relate gcr inner join goods_don g on g.id = gcr.goods_id %s where gcr.category = gc.id) > 0";
|
|
|
if (yhsId != null) {
|
|
|
- condition = String.format(condition, String.format(" inner join yh_shop_goods_sku ys on ys.goods_id = g.id and ys.status is true and ys.deleted is true and g.is_distribute is true and yhs_id = %s", yhsId));
|
|
|
+ condition = String.format(condition, String.format(" and (select count(*) from yh_shop_goods_sku ys where ys.goods_id = g.id and ys.status is true and ys.deleted is true and g.is_distribute is true and ys.yhs_id = %s) > 0", yhsId));
|
|
|
} else {
|
|
|
condition = String.format(condition, StrUtil.EMPTY);
|
|
|
}
|