@@ -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 = "获取失败"
@@ -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)