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