huangjiajun před 2 týdny
rodič
revize
c33b34dafc
2 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. +3
    -3
      app/svc/svc_data_center.go
  2. +1
    -1
      go.mod

+ 3
- 3
app/svc/svc_data_center.go Zobrazit soubor

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

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


Načítá se…
Zrušit
Uložit