mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-08-28 00:51:13 +08:00
优化默认角色数据,增加表格多字段排序例子
This commit is contained in:
@@ -97,7 +97,8 @@ func (s *sSysTable) List(ctx context.Context, in *sysin.TableListInp) (list []*s
|
||||
return
|
||||
}
|
||||
|
||||
if err = mod.Fields(sysin.TableListModel{}).Page(in.Page, in.PerPage).OrderAsc(cols.Sort).OrderDesc(cols.Id).Scan(&list); err != nil {
|
||||
// .OrderAsc(cols.Sort).OrderDesc(cols.Id)
|
||||
if err = mod.Fields(sysin.TableListModel{}).Page(in.Page, in.PerPage).Handler(handler.Sorter(in)).Scan(&list); err != nil {
|
||||
err = gerror.Wrap(err, "获取表格列表失败,请稍后重试!")
|
||||
return
|
||||
}
|
||||
|
@@ -75,6 +75,7 @@ type TableViewModel struct {
|
||||
// TableListInp 获取列表
|
||||
type TableListInp struct {
|
||||
form.PageReq
|
||||
form.Sorters
|
||||
Id int64 `json:"id" description:""`
|
||||
Flag *gjson.Json `json:"flag" description:"标签"`
|
||||
Title string `json:"title" description:"标题"`
|
||||
|
Reference in New Issue
Block a user