Browse Source

更新

master
huangjiajun 3 months ago
parent
commit
c33b34dafc
2 changed files with 4 additions and 4 deletions
  1. +3
    -3
      app/svc/svc_data_center.go
  2. +1
    -1
      go.mod

+ 3
- 3
app/svc/svc_data_center.go View File

@@ -210,11 +210,11 @@ func comm(c *gin.Context, isTotal int, req md.DataCenterRecordReq) ([]map[string
} }
field := `*` field := `*`
start := (utils.StrToInt(req.Page) - 1) * utils.StrToInt(req.Limit) start := (utils.StrToInt(req.Page) - 1) * utils.StrToInt(req.Limit)
groupBy := ""
groupBy := " order by date desc,id desc"
if req.Page != "" { 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 { } else {
groupBy = " group by date order by date asc"
groupBy = " order by date asc,id asc"
} }


sql1 := fmt.Sprintf(sql, field, where, groupBy) sql1 := fmt.Sprintf(sql, field, where, groupBy)


+ 1
- 1
go.mod View File

@@ -6,7 +6,7 @@ go 1.18


// //
require ( 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/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5
github.com/boombuler/barcode v1.0.1 github.com/boombuler/barcode v1.0.1
github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5 github.com/dchest/uniuri v0.0.0-20200228104902-7aecb25e1fe5


Loading…
Cancel
Save