|
|
@@ -288,10 +288,14 @@ func (this *TableHeaderController) Deletebyid() {
|
|
|
// @Success 200 {object}
|
|
|
// @router /listgoodtableheader [get]
|
|
|
func (this *TableHeaderController) ListGoodTableHeader() {
|
|
|
-
|
|
|
+ ShowSort := this.GetString("sort")
|
|
|
svc := tableheader.GetTableHeaderService(utils.DBE) //获得数据库引擎
|
|
|
var list []map[string]string
|
|
|
- sql := "select Name as label,Code as prop,'270' as width,'true' as sort,IsManuf as IsManuf from " + BaseTableHeader + " where " + "1=1 and CategoryCode='01' order by SortCode asc, Id asc"
|
|
|
+ sql := "select Name as label,Code as prop,'270' as width,'true' as sort,IsManuf as IsManuf from " + BaseTableHeader + " where " + "1=1 and CategoryCode='01' order by ShowSort asc"
|
|
|
+ if ShowSort != "" {
|
|
|
+ sql = "select Name as label,Code as prop,'270' as width,'true' as sort,IsManuf as IsManuf from " + BaseTableHeader + " where " + "1=1 and CategoryCode='01' order by SortCode asc, Id asc"
|
|
|
+ }
|
|
|
+
|
|
|
list, _ = svc.DBE.QueryString(sql)
|
|
|
fmt.Println(list)
|
|
|
var datainfo DataInfo
|