管理员分类页面优化

This commit is contained in:
liyj 2025-11-28 16:12:08 +08:00
parent ceccc58be9
commit 92b94fc3fa

View File

@ -231,11 +231,12 @@ public class ShopBaseProductCategoryServiceImpl extends BaseServiceImpl<ShopBase
public List<Map> getCategoryTree() {
QueryWrapper<ShopBaseProductCategory> 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<Map> cateTree = Convert.toList(Map.class, redisService.get(redisKey));
if (CollUtil.isNotEmpty(cateTree)) {
return cateTree;