作者 庄敏学

排序

... ... @@ -58,6 +58,7 @@ func (l *SearchTableDataLogic) SearchTableData(req *types.SearchTableDataRequest
break
}
}
if orderField != "" && orderBy != "" {
sort.Slice(response.Grid.List, func(i, j int) bool {
if _, ok := response.Grid.List[i][orderField]; ok {
if _, ok := response.Grid.List[j][orderField]; ok {
... ... @@ -70,6 +71,7 @@ func (l *SearchTableDataLogic) SearchTableData(req *types.SearchTableDataRequest
}
return true
})
}
resp = map[string]interface{}{
"objectId": response.ObjectId,
"fields": removeIdField(response.Fields),
... ...