|
@@ -17,8 +17,8 @@ var (
|
|
ctx, _ = context.WithTimeout(context.Background(), 2*time.Second)
|
|
ctx, _ = context.WithTimeout(context.Background(), 2*time.Second)
|
|
)
|
|
)
|
|
|
|
|
|
-//工作桌面菜单树 无缓存
|
|
|
|
-//go test -run=Test_WorkDesktopMenuTree
|
|
|
|
|
|
+// 工作桌面菜单树 无缓存
|
|
|
|
+// go test -run=Test_WorkDesktopMenuTree
|
|
func Test_WorkDesktopMenuTree(t *testing.T) {
|
|
func Test_WorkDesktopMenuTree(t *testing.T) {
|
|
tests := []struct {
|
|
tests := []struct {
|
|
name string //备注(表名)
|
|
name string //备注(表名)
|
|
@@ -65,7 +65,7 @@ func Test_WorkDesktopMenuTree(t *testing.T) {
|
|
}
|
|
}
|
|
for _, in := range tests {
|
|
for _, in := range tests {
|
|
t.Run(in.name, func(t *testing.T) {
|
|
t.Run(in.name, func(t *testing.T) {
|
|
- RedisMenuKey := fmt.Sprintf(entity.RedisMenuKey, in.args.AppId, in.args.Platform, entity.ConfigJson.MenuCacheKey, MC.If(in.args.PositionId != "", in.args.PositionId, in.args.UserId).(string))
|
|
|
|
|
|
+ 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)
|
|
redis.Del(entity.RedisCode, RedisMenuKey)
|
|
res, err := GetWordDesktopMenuTree(in.args)
|
|
res, err := GetWordDesktopMenuTree(in.args)
|
|
if len(res) == 0 || err != nil {
|
|
if len(res) == 0 || err != nil {
|
|
@@ -128,7 +128,7 @@ func Test_MenuMode(t *testing.T) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-//当前工作桌面菜单模式
|
|
|
|
|
|
+// 当前工作桌面菜单模式
|
|
// go test -v -run Test_WorkMenuMode
|
|
// go test -v -run Test_WorkMenuMode
|
|
func Test_WorkMenuMode(t *testing.T) {
|
|
func Test_WorkMenuMode(t *testing.T) {
|
|
var tests = []struct {
|
|
var tests = []struct {
|