1.修复历史查询汇总返回总数不准确的问题;
This commit is contained in:
parent
ff4b3a7b54
commit
dde900dfe5
|
@ -404,9 +404,7 @@ func (e MiGuDeployService) HistoricalSummaryList(c *gin.Context) {
|
||||||
NULLIF(COUNT(*), 0), 2), '%') AS new_user_unsub_on_day_rate`).
|
NULLIF(COUNT(*), 0), 2), '%') AS new_user_unsub_on_day_rate`).
|
||||||
Where("mg_order.subscribe_time >= ? AND mg_order.subscribe_time <= ?", startTime, endTime).
|
Where("mg_order.subscribe_time >= ? AND mg_order.subscribe_time <= ?", startTime, endTime).
|
||||||
Group("DATE(mg_order.subscribe_time), mg_order.product_id, mg_order.channel_code").
|
Group("DATE(mg_order.subscribe_time), mg_order.product_id, mg_order.channel_code").
|
||||||
Order("mg_order.product_id, mg_order.channel_code, mg_order.subscribe_time").
|
Order("mg_order.product_id, mg_order.channel_code, mg_order.subscribe_time")
|
||||||
Offset(pageNum * req.PageSize).
|
|
||||||
Limit(req.PageSize)
|
|
||||||
|
|
||||||
// 添加过滤条件
|
// 添加过滤条件
|
||||||
if req.SkuCode != 0 {
|
if req.SkuCode != 0 {
|
||||||
|
@ -425,7 +423,7 @@ func (e MiGuDeployService) HistoricalSummaryList(c *gin.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 执行查询
|
// 执行查询
|
||||||
err = qs.Find(&historicalSummaryList).Error
|
err = qs.Offset(pageNum * req.PageSize).Limit(req.PageSize).Find(&historicalSummaryList).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Errorf("HistoricalSummaryList query err: %#v", err)
|
logger.Errorf("HistoricalSummaryList query err: %#v", err)
|
||||||
response.Error(c, http.StatusInternalServerError, err, "查询失败")
|
response.Error(c, http.StatusInternalServerError, err, "查询失败")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user