正在显示
1 个修改的文件
包含
70 行增加
和
53 行删除
@@ -31,69 +31,85 @@ func (l *SearchTableByModuleLogic) SearchTableByModule(req *types.SearchTableByM | @@ -31,69 +31,85 @@ func (l *SearchTableByModuleLogic) SearchTableByModule(req *types.SearchTableByM | ||
31 | var batchError errorx.BatchError | 31 | var batchError errorx.BatchError |
32 | fx.Parallel(func() { | 32 | fx.Parallel(func() { |
33 | mResp, err := l.getTableByLocal([]string{bytelib.MainTable, bytelib.SubTable, bytelib.SideTable}) | 33 | mResp, err := l.getTableByLocal([]string{bytelib.MainTable, bytelib.SubTable, bytelib.SideTable}) |
34 | - if err == nil { | ||
35 | - result["导入模块"] = mResp | ||
36 | - } else { | ||
37 | - list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{ | ||
38 | - Token: req.Token, | ||
39 | - TableTypes: []string{bytelib.MainTable, bytelib.SubTable, bytelib.SideTable}, | ||
40 | - Module: bytelib.ModuleChartTemplate, // TODO:字库更新完改为只查 bytelib.ModuleChartTemplate | ||
41 | - }) | ||
42 | - if err != nil { | ||
43 | - batchError.Add(err) | ||
44 | - } | ||
45 | - result["导入模块"] = newList(list) | 34 | + if err != nil { |
35 | + batchError.Add(err) | ||
46 | } | 36 | } |
37 | + result["导入模块"] = mResp | ||
38 | + //if err == nil { | ||
39 | + // result["导入模块"] = mResp | ||
40 | + //} else { | ||
41 | + // list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{ | ||
42 | + // Token: req.Token, | ||
43 | + // TableTypes: []string{bytelib.MainTable, bytelib.SubTable, bytelib.SideTable}, | ||
44 | + // Module: bytelib.ModuleChartTemplate, // TODO:字库更新完改为只查 bytelib.ModuleChartTemplate | ||
45 | + // }) | ||
46 | + // if err != nil { | ||
47 | + // batchError.Add(err) | ||
48 | + // } | ||
49 | + // result["导入模块"] = newList(list) | ||
50 | + //} | ||
47 | }, func() { | 51 | }, func() { |
48 | mResp, err := l.getTableByLocal([]string{bytelib.SchemaTable}) | 52 | mResp, err := l.getTableByLocal([]string{bytelib.SchemaTable}) |
49 | - if err == nil { | ||
50 | - result["拆解模块"] = mResp | ||
51 | - } else { | ||
52 | - list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{ | ||
53 | - Token: req.Token, | ||
54 | - TableTypes: []string{bytelib.SchemaTable}, | ||
55 | - Module: bytelib.ModuleQuerySetCenter, | ||
56 | - ReturnGroupItem: true, | ||
57 | - }) | ||
58 | - if err != nil { | ||
59 | - batchError.Add(err) | ||
60 | - } | ||
61 | - result["拆解模块"] = newList(list) | 53 | + if err != nil { |
54 | + batchError.Add(err) | ||
62 | } | 55 | } |
56 | + result["拆解模块"] = mResp | ||
57 | + //if err == nil { | ||
58 | + // result["拆解模块"] = mResp | ||
59 | + //} else { | ||
60 | + // list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{ | ||
61 | + // Token: req.Token, | ||
62 | + // TableTypes: []string{bytelib.SchemaTable}, | ||
63 | + // Module: bytelib.ModuleQuerySetCenter, | ||
64 | + // ReturnGroupItem: true, | ||
65 | + // }) | ||
66 | + // if err != nil { | ||
67 | + // batchError.Add(err) | ||
68 | + // } | ||
69 | + // result["拆解模块"] = newList(list) | ||
70 | + //} | ||
63 | }, func() { | 71 | }, func() { |
64 | mResp, err := l.getTableByLocal([]string{bytelib.CalculateItem}) | 72 | mResp, err := l.getTableByLocal([]string{bytelib.CalculateItem}) |
65 | - if err == nil { | ||
66 | - result["计算项"] = mResp | ||
67 | - } else { | ||
68 | - list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{ | ||
69 | - Token: req.Token, | ||
70 | - TableTypes: []string{bytelib.CalculateItem}, | ||
71 | - Module: bytelib.ModuleCalculateCenter, | ||
72 | - ReturnGroupItem: true, | ||
73 | - ExcludeTables: []int{0}, | ||
74 | - }) | ||
75 | - if err != nil { | ||
76 | - batchError.Add(err) | ||
77 | - } | ||
78 | - result["计算项"] = newList(list) | 73 | + if err != nil { |
74 | + batchError.Add(err) | ||
79 | } | 75 | } |
76 | + result["计算项"] = mResp | ||
77 | + //if err == nil { | ||
78 | + // result["计算项"] = mResp | ||
79 | + //} else { | ||
80 | + // list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{ | ||
81 | + // Token: req.Token, | ||
82 | + // TableTypes: []string{bytelib.CalculateItem}, | ||
83 | + // Module: bytelib.ModuleCalculateCenter, | ||
84 | + // ReturnGroupItem: true, | ||
85 | + // ExcludeTables: []int{0}, | ||
86 | + // }) | ||
87 | + // if err != nil { | ||
88 | + // batchError.Add(err) | ||
89 | + // } | ||
90 | + // result["计算项"] = newList(list) | ||
91 | + //} | ||
80 | }, func() { | 92 | }, func() { |
81 | mResp, err := l.getTableByLocal([]string{bytelib.CalculateSet}) | 93 | mResp, err := l.getTableByLocal([]string{bytelib.CalculateSet}) |
82 | - if err == nil { | ||
83 | - result["计算集"] = mResp | ||
84 | - } else { | ||
85 | - list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{ | ||
86 | - Token: req.Token, | ||
87 | - TableTypes: []string{bytelib.CalculateSet}, | ||
88 | - Module: bytelib.ModuleCalculateCenter, | ||
89 | - ReturnGroupItem: true, | ||
90 | - ExcludeTables: []int{0}, | ||
91 | - }) | ||
92 | - if err != nil { | ||
93 | - batchError.Add(err) | ||
94 | - } | ||
95 | - result["计算集"] = newList(list) | 94 | + if err != nil { |
95 | + batchError.Add(err) | ||
96 | } | 96 | } |
97 | + result["计算集"] = mResp | ||
98 | + //if err == nil { | ||
99 | + // result["计算集"] = mResp | ||
100 | + //} else { | ||
101 | + // list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{ | ||
102 | + // Token: req.Token, | ||
103 | + // TableTypes: []string{bytelib.CalculateSet}, | ||
104 | + // Module: bytelib.ModuleCalculateCenter, | ||
105 | + // ReturnGroupItem: true, | ||
106 | + // ExcludeTables: []int{0}, | ||
107 | + // }) | ||
108 | + // if err != nil { | ||
109 | + // batchError.Add(err) | ||
110 | + // } | ||
111 | + // result["计算集"] = newList(list) | ||
112 | + //} | ||
97 | }) | 113 | }) |
98 | if err = batchError.Err(); err != nil { | 114 | if err = batchError.Err(); err != nil { |
99 | logx.Error(err) | 115 | logx.Error(err) |
@@ -132,6 +148,7 @@ func (l *SearchTableByModuleLogic) getTableByLocal(modules []string) (types.Sear | @@ -132,6 +148,7 @@ func (l *SearchTableByModuleLogic) getTableByLocal(modules []string) (types.Sear | ||
132 | Name: item.Name, | 148 | Name: item.Name, |
133 | ParentId: item.ParentId, | 149 | ParentId: item.ParentId, |
134 | Flag: item.Flag, | 150 | Flag: item.Flag, |
151 | + IsLocal: item.IsLocal, | ||
135 | }) | 152 | }) |
136 | } | 153 | } |
137 | return response, nil | 154 | return response, nil |
-
请 注册 或 登录 后发表评论