|
@@ -63,16 +63,12 @@ func Test_WorkDesktopMenuTree(t *testing.T) {
|
|
|
want: "",
|
|
|
},
|
|
|
}
|
|
|
- var redisMap = map[string]bool{}
|
|
|
for _, in := range tests {
|
|
|
t.Run(in.name, func(t *testing.T) {
|
|
|
- if !redisMap[in.args.Platform] {
|
|
|
- RedisMenuKey := fmt.Sprintf(entity.RedisMenuKey, in.args.AppId, in.args.Platform, MC.If(in.args.PositionId != "", in.args.PositionId, in.args.UserId).(string))
|
|
|
- redis.Del(entity.RedisCode, RedisMenuKey)
|
|
|
- }
|
|
|
+ RedisMenuKey := fmt.Sprintf(entity.RedisMenuKey, in.args.AppId, entity.ConfigJson.MenuCacheKey, MC.If(in.args.PositionId != "", in.args.PositionId, in.args.UserId).(string))
|
|
|
+ redis.Del(entity.RedisCode, RedisMenuKey)
|
|
|
res, err := GetWordDesktopMenuTree(in.args)
|
|
|
- log.Println("err:", err, "---res:", res)
|
|
|
- if len(res) == 0 {
|
|
|
+ if len(res) == 0 || err != nil {
|
|
|
log.Println(in.args.Platform, "异常:")
|
|
|
}
|
|
|
})
|