管理员分类页面优化
This commit is contained in:
parent
62239d4dec
commit
e7d8a126fc
@ -231,11 +231,12 @@ public class ShopBaseProductCategoryServiceImpl extends BaseServiceImpl<ShopBase
|
|||||||
public List<Map> getCategoryTree() {
|
public List<Map> getCategoryTree() {
|
||||||
QueryWrapper<ShopBaseProductCategory> queryWrapper = new QueryWrapper<>();
|
QueryWrapper<ShopBaseProductCategory> queryWrapper = new QueryWrapper<>();
|
||||||
String redisKey = RedisConstant.Product_Cate_Key;
|
String redisKey = RedisConstant.Product_Cate_Key;
|
||||||
|
Integer store_id =0;
|
||||||
if (getCurrentUser().isStore()) {
|
if (getCurrentUser().isStore()) {
|
||||||
Integer store_id = Convert.toInt(getCurrentUser().getStore_id());
|
store_id = Convert.toInt(getCurrentUser().getStore_id());
|
||||||
queryWrapper.eq("store_id", store_id);
|
|
||||||
redisKey = RedisConstant.Product_Cate_Key + ":" + store_id;
|
|
||||||
}
|
}
|
||||||
|
queryWrapper.eq("store_id", store_id);
|
||||||
|
redisKey = RedisConstant.Product_Cate_Key + ":" + store_id;
|
||||||
List<Map> cateTree = Convert.toList(Map.class, redisService.get(redisKey));
|
List<Map> cateTree = Convert.toList(Map.class, redisService.get(redisKey));
|
||||||
if (CollUtil.isNotEmpty(cateTree)) {
|
if (CollUtil.isNotEmpty(cateTree)) {
|
||||||
return cateTree;
|
return cateTree;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user