refactor🎨 添加默认字段排序
This commit is contained in:
1 parent
b82c3d9f99
commit
20e7f79f4f
2 files changed
+6
-1
No files matched your search
@@ -17,6 +17,11 @@ type SysApiSearch struct {
|
|||||||
Path string `form:"path" search:"type:exact;column:path;table:sys_api" comment:"地址"`
|
Path string `form:"path" search:"type:exact;column:path;table:sys_api" comment:"地址"`
|
||||||
Action string `form:"action" search:"type:exact;column:action;table:sys_api" comment:"类型"`
|
Action string `form:"action" search:"type:exact;column:action;table:sys_api" comment:"类型"`
|
||||||
ParentId string `form:"parentId" search:"type:exact;column:parent_id;table:sys_api" comment:"按钮id"`
|
ParentId string `form:"parentId" search:"type:exact;column:parent_id;table:sys_api" comment:"按钮id"`
|
||||||
|
SysApiOrder
|
||||||
|
}
|
||||||
|
|
||||||
|
type SysApiOrder struct {
|
||||||
|
HandleOrder string `search:"type:order;column:handle;table:sys_api" form:"handle_order"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *SysApiSearch) GetNeedSearch() interface{} {
|
func (m *SysApiSearch) GetNeedSearch() interface{} {
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ func (e *SysApi) GetSysApiPage(c *dto.SysApiSearch, p *actions.DataPermission, l
|
|||||||
var err error
|
var err error
|
||||||
var data models.SysApi
|
var data models.SysApi
|
||||||
|
|
||||||
err = e.Orm.Model(&data).
|
err = e.Orm.Debug().Model(&data).
|
||||||
Scopes(
|
Scopes(
|
||||||
cDto.MakeCondition(c.GetNeedSearch()),
|
cDto.MakeCondition(c.GetNeedSearch()),
|
||||||
cDto.Paginate(c.GetPageSize(), c.GetPageIndex()),
|
cDto.Paginate(c.GetPageSize(), c.GetPageIndex()),
|
||||||
|
|||||||
Reference in new issue
Block a user