diff --git a/app/svc/svc_data_center.go b/app/svc/svc_data_center.go index 5dac969..343d55d 100644 --- a/app/svc/svc_data_center.go +++ b/app/svc/svc_data_center.go @@ -210,11 +210,11 @@ func comm(c *gin.Context, isTotal int, req md.DataCenterRecordReq) ([]map[string } field := `*` start := (utils.StrToInt(req.Page) - 1) * utils.StrToInt(req.Limit) - groupBy := "" + groupBy := " order by date desc,id desc" if req.Page != "" { - groupBy = " group by date,app_id,slot_id order by date desc,id desc limit " + utils.IntToStr(start) + "," + req.Limit + groupBy += " limit " + utils.IntToStr(start) + "," + req.Limit } else { - groupBy = " group by date order by date asc" + groupBy = " order by date asc,id asc" } sql1 := fmt.Sprintf(sql, field, where, groupBy) diff --git a/go.mod b/go.mod index 99f0493..c1970e2 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ go 1.18 // require ( - code.fnuoos.com/zhimeng/model.git v0.0.3-0.20240831024508-c37ec92bfc03 + code.fnuoos.com/zhimeng/model.git v0.0.3-0.20240831030801-8c60631f7b95 github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 github.com/boombuler/barcode v1.0.1 github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5