From c33b34dafc3fbbad39503ab2c5aa5c491fddc56b Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Mon, 2 Sep 2024 16:04:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/svc/svc_data_center.go | 6 +++--- go.mod | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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