wangshan пре 2 година
родитељ
комит
2e2e291d22
3 измењених фајлова са 4 додато и 1 уклоњено
  1. 2 0
      entity/source.go
  2. 1 0
      entity/user.go
  3. 1 1
      service/workDesktop.go

+ 2 - 0
entity/source.go

@@ -2,6 +2,7 @@ package entity
 
 import (
 	"context"
+	"github.com/zeromicro/go-zero/core/logx"
 
 	powerCheck "bp.jydev.jianyu360.cn/BaseService/powerCheckCenter/rpc/pb"
 	resource "bp.jydev.jianyu360.cn/BaseService/resourceCenter/rpc/pb"
@@ -47,6 +48,7 @@ func (ui *UserInfoRpc) GetUserPowers() *powerCheck.CheckResp {
 		PositionType: ui.PositionType,
 		PositionId:   ui.PositionId,
 	}
+	logx.Info("--------req:-------------------------:", req)
 	checkResp, err := PowerCheck.Check(context.Background(), req)
 	if err == nil {
 		return checkResp

+ 1 - 0
entity/user.go

@@ -78,6 +78,7 @@ func (m *WorkDesktopMenu) AutoUserPowerInfo() map[string]int {
 		PositionId:   m.PositionId,
 		MgoUserId:    m.MgoUserId,
 	}
+	logx.Info("userInfoRpc-------------------------:", userInfoRpc)
 	//权益中台获取权益
 	userPowers := userInfoRpc.GetUserPowers()
 	if userPowers != nil {

+ 1 - 1
service/workDesktop.go

@@ -291,7 +291,7 @@ func GetWordDesktopMenuTree(in *WorkDesktopMenuInfoReq) ([]*pb.MenuList, error)
 	logx.Info("菜单树生成耗时:", time.Since(t1))
 	menuList, err = wdm.WorkMenuFormat()
 	logx.Info("菜单格式化耗时:", time.Since(t1))
-	if err == nil && len(menuList) > 0 && in.WorkStatus == 0 { //我的页面 菜单暂不存缓存
+	if err == nil && len(menuList) > 0 && in.WorkStatus == 0 { //我的页面in.WorkStatus == 2 菜单暂不存缓存
 		if menuBytes, err := json.Marshal(menuList); err == nil {
 			redisOutTime := entity.ConfigJson.RedisOutTime + rand.Intn(60)
 			if redis.PutBytes(entity.RedisCode, RedisMenuKey, &menuBytes, redisOutTime) != nil {