huangjiajun vor 3 Monaten
Ursprung
Commit
c33b34dafc
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. +3
    -3
      app/svc/svc_data_center.go
  2. +1
    -1
      go.mod

+ 3
- 3
app/svc/svc_data_center.go Datei anzeigen

@@ -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)


+ 1
- 1
go.mod Datei anzeigen

@@ -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


Laden…
Abbrechen
Speichern