diff --git a/code/makecode.go b/code/makecode.go index 9354c4b..0603be3 100644 --- a/code/makecode.go +++ b/code/makecode.go @@ -778,6 +778,9 @@ func (that *MakeCode) Search(table string, userData Map, req *http.Request, db * data[table+"."+searchItemName] = reqValue } + if sort["ORDER"] == nil { + sort["ORDER"] = table + ".id DESC" + } where := Map{} diff --git a/example/admin/init.go b/example/admin/init.go index 0a07c26..1fdddfb 100644 --- a/example/admin/init.go +++ b/example/admin/init.go @@ -5,7 +5,7 @@ import ( . "../../../hotime/common" ) -var ID = "9f282d751e499876df730d492e36d335" +var ID = "ede7cc05f2e6c63b4572883f4b9a9853" // Project 管理端项目 var Project = Proj{ diff --git a/example/bzyy.exe b/example/bzyy.exe index 3172af2..6a54c18 100644 Binary files a/example/bzyy.exe and b/example/bzyy.exe differ diff --git a/example/config/app.json b/example/config/app.json index 4e7bbbd..5287cbe 100644 --- a/example/config/app.json +++ b/example/config/app.json @@ -1,5 +1,5 @@ { - "id": "9f282d751e499876df730d492e36d335", + "id": "ede7cc05f2e6c63b4572883f4b9a9853", "label": "HoTime管理平台", "menus": [ { @@ -135,6 +135,11 @@ "sortable": true, "type": "number", "value": "name" + }, + { + "label": "手机号", + "name": "phone", + "type": "text" } ], "label": "人员管理",