|
@@ -3,6 +3,7 @@ package service
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
"fmt"
|
|
|
+ "math/rand"
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
"time"
|
|
@@ -294,14 +295,14 @@ func GetWordDesktopMenuTree(in *WorkDesktopMenuInfoReq) ([]*pb.MenuList, error)
|
|
|
menuList, err = wdm.WorkMenuFormat()
|
|
|
logx.Info("菜单格式化耗时:", time.Since(t1))
|
|
|
if err == nil && len(menuList) > 0 && in.WorkStatus == 0 { //我的页面in.WorkStatus == 2 菜单暂不存缓存
|
|
|
- /*if menuBytes, err := json.Marshal(menuList); err == nil {
|
|
|
+ if menuBytes, err := json.Marshal(menuList); err == nil {
|
|
|
redisOutTime := entity.ConfigJson.RedisOutTime + rand.Intn(60)
|
|
|
if redis.PutBytes(entity.RedisCode, RedisMenuKey, &menuBytes, redisOutTime) != nil {
|
|
|
logx.Info("工作桌面菜单 redis缓存异常")
|
|
|
}
|
|
|
} else {
|
|
|
logx.Info("菜单数据序列化异常")
|
|
|
- }*/
|
|
|
+ }
|
|
|
}
|
|
|
logx.Info("整体耗时:", time.Since(t1))
|
|
|
return menuList, err
|