Browse Source

no message

zhangchuanxing 3 months ago
parent
commit
ee7578af19
2 changed files with 3 additions and 1 deletions
  1. 2 0
      controllers/cygx/report_selection.go
  2. 1 1
      models/cygx/report_selection.go

+ 2 - 0
controllers/cygx/report_selection.go

@@ -674,6 +674,8 @@ func (this *ReportSelectionController) ListPeriods() {
 		br.ErrMsg = "获取失败,Err:" + err.Error()
 		return
 	}
+
+	condition += `	GROUP BY  periods `
 	list, err := cygx.GetReportSelectionListPeriods(condition, pars, startSize, pageSize)
 	if err != nil {
 		br.Msg = "获取失败"

+ 1 - 1
models/cygx/report_selection.go

@@ -310,7 +310,7 @@ func GetReportSelectionListPeriods(condition string, pars []interface{}, startSi
 	if condition != "" {
 		sql += condition
 	}
-	sql += ` ORDER BY  rs.periods  DESC    LIMIT ?,?`
+	sql += `  ORDER BY  rs.periods  DESC    LIMIT ?,?`
 	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
 	return
 }