优化资产管理、我的资产页面排序
This commit is contained in:
1 parent
39a0678bb9
commit
76baf3e41e
3 files changed
+25
-6
No files matched your search
@@ -99,9 +99,13 @@ func (r assetRepository) Find(c context.Context, pageIndex, pageSize int, name,
|
||||
order = "desc"
|
||||
}
|
||||
|
||||
if field == "name" {
|
||||
field = "name"
|
||||
} else {
|
||||
switch field {
|
||||
case "name":
|
||||
case "protocol":
|
||||
case "ip":
|
||||
case "active":
|
||||
|
||||
default:
|
||||
field = "created"
|
||||
}
|
||||
|
||||
@@ -319,9 +323,13 @@ func (r assetRepository) FindMyAssets(c context.Context, pageIndex, pageSize int
|
||||
order = "desc"
|
||||
}
|
||||
|
||||
if field == "name" {
|
||||
field = "name"
|
||||
} else {
|
||||
switch field {
|
||||
case "name":
|
||||
case "protocol":
|
||||
case "ip":
|
||||
case "active":
|
||||
|
||||
default:
|
||||
field = "created"
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user