From 92b94fc3fa9bf6483611a5ac7ca7af94f1abd178 Mon Sep 17 00:00:00 2001 From: liyj <1617420630@qq.com> Date: Fri, 28 Nov 2025 16:12:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ShopBaseProductCategoryServiceImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/base/service/impl/ShopBaseProductCategoryServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/base/service/impl/ShopBaseProductCategoryServiceImpl.java index 651162e3..63a0691a 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/base/service/impl/ShopBaseProductCategoryServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/base/service/impl/ShopBaseProductCategoryServiceImpl.java @@ -231,11 +231,12 @@ public class ShopBaseProductCategoryServiceImpl extends BaseServiceImpl getCategoryTree() { QueryWrapper queryWrapper = new QueryWrapper<>(); String redisKey = RedisConstant.Product_Cate_Key; + Integer store_id =0; if (getCurrentUser().isStore()) { - Integer store_id = Convert.toInt(getCurrentUser().getStore_id()); - queryWrapper.eq("store_id", store_id); - redisKey = RedisConstant.Product_Cate_Key + ":" + store_id; + store_id = Convert.toInt(getCurrentUser().getStore_id()); } + queryWrapper.eq("store_id", store_id); + redisKey = RedisConstant.Product_Cate_Key + ":" + store_id; List cateTree = Convert.toList(Map.class, redisService.get(redisKey)); if (CollUtil.isNotEmpty(cateTree)) { return cateTree;