优化资产管理、我的资产页面排序
This commit is contained in:
@ -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