正在显示
7 个修改的文件
包含
14 行增加
和
11 行删除
| @@ -37,7 +37,7 @@ func (l *SearchTableByModuleLogic) SearchTableByModule(req *types.SearchTableByM | @@ -37,7 +37,7 @@ func (l *SearchTableByModuleLogic) SearchTableByModule(req *types.SearchTableByM | ||
| 37 | list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{ | 37 | list, err := l.svcCtx.ByteMetadataService.ObjectTableSearch(l.ctx, bytelib.ObjectTableSearchRequest{ |
| 38 | Token: req.Token, | 38 | Token: req.Token, |
| 39 | TableTypes: []string{bytelib.MainTable, bytelib.SubTable, bytelib.SideTable}, | 39 | TableTypes: []string{bytelib.MainTable, bytelib.SubTable, bytelib.SideTable}, |
| 40 | - Module: bytelib.ModuleDigitalCenter | bytelib.ModuleChartTemplate, // TODO:字库更新完改为只查 bytelib.ModuleChartTemplate | 40 | + Module: bytelib.ModuleChartTemplate, // TODO:字库更新完改为只查 bytelib.ModuleChartTemplate |
| 41 | }) | 41 | }) |
| 42 | if err != nil { | 42 | if err != nil { |
| 43 | batchError.Add(err) | 43 | batchError.Add(err) |
| @@ -39,9 +39,10 @@ func NewAppPageItem(appPage *domain.AppPage, charts []*domain.Chart) AppPageItem | @@ -39,9 +39,10 @@ func NewAppPageItem(appPage *domain.AppPage, charts []*domain.Chart) AppPageItem | ||
| 39 | return item.Id, item | 39 | return item.Id, item |
| 40 | }) | 40 | }) |
| 41 | item := AppPageItem{ | 41 | item := AppPageItem{ |
| 42 | - Id: appPage.Id, | ||
| 43 | - Name: appPage.Name, | ||
| 44 | - Cover: appPage.Cover, | 42 | + Id: appPage.Id, |
| 43 | + Name: appPage.Name, | ||
| 44 | + Cover: appPage.Cover, | ||
| 45 | + UpdatedAt: appPage.UpdatedAt, | ||
| 45 | } | 46 | } |
| 46 | for _, id := range appPage.Charts { | 47 | for _, id := range appPage.Charts { |
| 47 | if v, ok := chartsMap[id]; ok { | 48 | if v, ok := chartsMap[id]; ok { |
| @@ -312,10 +312,11 @@ type AppPageSearchResponse struct { | @@ -312,10 +312,11 @@ type AppPageSearchResponse struct { | ||
| 312 | } | 312 | } |
| 313 | 313 | ||
| 314 | type AppPageItem struct { | 314 | type AppPageItem struct { |
| 315 | - Id int64 `json:"id,optional"` // 唯一标识 | ||
| 316 | - Name string `json:"name,optional"` // 名称 | ||
| 317 | - Cover string `json:"cover,optional"` // 封面 | ||
| 318 | - Charts []AppPageChartItem `json:"charts,optional"` // 图表 | 315 | + Id int64 `json:"id,optional"` // 唯一标识 |
| 316 | + Name string `json:"name,optional"` // 名称 | ||
| 317 | + Cover string `json:"cover,optional"` // 封面 | ||
| 318 | + Charts []AppPageChartItem `json:"charts,optional"` // 图表 | ||
| 319 | + UpdatedAt int64 `json:"updatedAt,optional"` //更新时间 | ||
| 319 | } | 320 | } |
| 320 | 321 | ||
| 321 | type AppPageChartItem struct { | 322 | type AppPageChartItem struct { |
| @@ -162,7 +162,7 @@ func (repository *AppPageRepository) Find(ctx context.Context, conn transaction. | @@ -162,7 +162,7 @@ func (repository *AppPageRepository) Find(ctx context.Context, conn transaction. | ||
| 162 | total int64 | 162 | total int64 |
| 163 | ) | 163 | ) |
| 164 | queryFunc := func() (interface{}, error) { | 164 | queryFunc := func() (interface{}, error) { |
| 165 | - tx = tx.Model(&ms).Order("id desc") | 165 | + tx = tx.Model(&ms).Order("updated_at desc") |
| 166 | if v, ok := queryOptions["tenantId"]; ok { | 166 | if v, ok := queryOptions["tenantId"]; ok { |
| 167 | tx.Where("tenant_id = ?", v) | 167 | tx.Where("tenant_id = ?", v) |
| 168 | } | 168 | } |
| @@ -119,7 +119,7 @@ func (repository *ChartRepository) Find(ctx context.Context, conn transaction.Co | @@ -119,7 +119,7 @@ func (repository *ChartRepository) Find(ctx context.Context, conn transaction.Co | ||
| 119 | total int64 | 119 | total int64 |
| 120 | ) | 120 | ) |
| 121 | queryFunc := func() (interface{}, error) { | 121 | queryFunc := func() (interface{}, error) { |
| 122 | - tx = tx.Model(&ms).Order("id desc") //.Order("pid asc").Order("sort asc") | 122 | + tx = tx.Model(&ms).Order("updated_at desc") //.Order("pid asc").Order("sort asc") |
| 123 | if v, ok := queryOptions["ids"]; ok { | 123 | if v, ok := queryOptions["ids"]; ok { |
| 124 | tx.Where("id in (?)", v) | 124 | tx.Where("id in (?)", v) |
| 125 | } | 125 | } |
| @@ -75,7 +75,7 @@ type TableData struct { | @@ -75,7 +75,7 @@ type TableData struct { | ||
| 75 | //数据 | 75 | //数据 |
| 76 | Grid *TableDataGrid `json:"grid,optional"` | 76 | Grid *TableDataGrid `json:"grid,optional"` |
| 77 | //字段 | 77 | //字段 |
| 78 | - Fields []*Field `json:"fields"` | 78 | + Fields []*Field `json:"fields,optional"` |
| 79 | } | 79 | } |
| 80 | 80 | ||
| 81 | type TableDataGrid struct { | 81 | type TableDataGrid struct { |
| @@ -94,6 +94,7 @@ type ( | @@ -94,6 +94,7 @@ type ( | ||
| 94 | Name string `json:"name,optional"` // 名称 | 94 | Name string `json:"name,optional"` // 名称 |
| 95 | Cover string `json:"cover,optional"` // 封面 | 95 | Cover string `json:"cover,optional"` // 封面 |
| 96 | Charts []AppPageChartItem `json:"charts,optional"`// 图表 | 96 | Charts []AppPageChartItem `json:"charts,optional"`// 图表 |
| 97 | + UpdatedAt int64 `json:"updatedAt,optional"` //更新时间 | ||
| 97 | } | 98 | } |
| 98 | AppPageChartItem struct{ | 99 | AppPageChartItem struct{ |
| 99 | ChartId int64 `json:"chartId"` // 图表ID | 100 | ChartId int64 `json:"chartId"` // 图表ID |
-
请 注册 或 登录 后发表评论