作者 yangfu

P0 优化

... ... @@ -3,11 +3,13 @@ Host: 0.0.0.0
Port: 8080
Verbose: true
HostName: http://sumifcc-bchart-dev.sumifcc.com
Timeout: 30000
Log:
Mode: file
Encoding: plain
Level: debug # info
MaxContentLength: 5120 # 5KB
JwtAuth:
AccessSecret: digital-platform
... ...
... ... @@ -3,6 +3,7 @@ Host: 0.0.0.0
Port: 8081
Verbose: true
HostName: http://sumifcc-bchart-dev.sumifcc.com
Timeout: 30000
Log:
#Mode: file
... ... @@ -10,6 +11,7 @@ Log:
Level: debug # info
MaxSize: 1 # 2MB
TimeFormat: 2006-01-02 15:04:05.000
MaxContentLength: 5120 # 5KB
JwtAuth:
AccessSecret: digital-platform
... ...
... ... @@ -32,7 +32,7 @@ func (l *SearchTableByModuleLogic) SearchTableByModule(req *types.SearchTableByM
list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{
Token: req.Token,
TableTypes: []string{bytelib.MainTable, bytelib.SubTable, bytelib.SideTable},
Module: bytelib.ModuleDigitalCenter,
Module: bytelib.ModuleDigitalCenter | bytelib.ModuleChartTemplate, // TODO:字库更新完改为只查 bytelib.ModuleChartTemplate
})
if err != nil {
batchError.Add(err)
... ... @@ -52,7 +52,7 @@ func (l *SearchTableByModuleLogic) SearchTableByModule(req *types.SearchTableByM
}, func() {
list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{
Token: req.Token,
TableTypes: []string{bytelib.CalculateItem, bytelib.CalculateSet},
TableTypes: []string{bytelib.CalculateItem},
Module: bytelib.ModuleCalculateCenter,
ReturnGroupItem: true,
ExcludeTables: []int{0},
... ... @@ -60,7 +60,19 @@ func (l *SearchTableByModuleLogic) SearchTableByModule(req *types.SearchTableByM
if err != nil {
batchError.Add(err)
}
result["计算模块"] = newList(list)
result["计算项"] = newList(list)
}, func() {
list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{
Token: req.Token,
TableTypes: []string{bytelib.CalculateSet},
Module: bytelib.ModuleCalculateCenter,
ReturnGroupItem: true,
ExcludeTables: []int{0},
})
if err != nil {
batchError.Add(err)
}
result["计算集"] = newList(list)
})
if err = batchError.Err(); err != nil {
logx.Error(err)
... ...
... ... @@ -153,6 +153,13 @@ type Title struct {
type TableAbility struct {
FilterSwitch bool `json:"filterSwitch,optional"` // 表筛选功能开关
DimensionList []Dimension `json:"dimensionList,optional"` // 维度列表
CardSwitch bool `json:"cardSwitch,optional"` // 顺序标识开关
CardIndent string `json:"cardIndent,optional"` // 顺序标识
CardOrderList []CardOrderItem `json:"cardOrderList,optional"` // 卡片列表顺序
}
type CardOrderItem struct {
CardId string `json:"cardId,optional"`
}
type Series struct {
... ...
... ... @@ -63,6 +63,13 @@ type Title struct {
type TableAbility struct {
FilterSwitch bool `json:"filterSwitch,optional"` // 表筛选功能开关
DimensionList []Dimension `json:"dimensionList,optional"` // 维度列表
CardSwitch bool `json:"cardSwitch,optional"` // 顺序标识开关
CardIndent string `json:"cardIndent,optional"` // 顺序标识
CardOrderList []CardOrderItem `json:"cardOrderList,optional"` // 卡片列表顺序
}
type CardOrderItem struct {
CardId string `json:"cardId,optional"`
}
type Series struct {
... ...
... ... @@ -12,10 +12,11 @@ var (
)
const (
ModuleAll = ModuleDigitalCenter | ModuleQuerySetCenter | ModuleCalculateCenter
ModuleAll = ModuleDigitalCenter | ModuleQuerySetCenter | ModuleCalculateCenter | ModuleChartTemplate
ModuleDigitalCenter = 1
ModuleQuerySetCenter = 2
ModuleCalculateCenter = 4
ModuleChartTemplate = 8
)
const (
... ...
... ... @@ -190,6 +190,12 @@ type(
TableAbility struct {
FilterSwitch bool `json:"filterSwitch,optional"` // 表筛选功能开关
DimensionList []Dimension `json:"dimensionList,optional"` // 维度列表
CardSwitch bool `json:"cardSwitch,optional"` // 顺序标识开关
CardIndent string `json:"cardIndent,optional"` // 顺序标识
CardOrderList []CardOrderItem `json:"cardOrderList,optional"` // 卡片列表顺序
}
CardOrderItem struct {
CardId string `json:"cardId,optional"`
}
Series struct {// 图表类型 (记录型表格:RecordTable-1 总体指标:MetricsCard-1 容器卡片:ContainerCard-1 四分图:QuarterChart-1)
Name string `json:"name"` // 名称 (例如 指标1、指标2)
... ...