From dde900dfe58e65bcd6fba2f0caf9530b3d7b70b6 Mon Sep 17 00:00:00 2001 From: chenlin Date: Thu, 24 Oct 2024 09:52:51 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E5=A4=8D=E5=8E=86=E5=8F=B2=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=B1=87=E6=80=BB=E8=BF=94=E5=9B=9E=E6=80=BB=E6=95=B0?= =?UTF-8?q?=E4=B8=8D=E5=87=86=E7=A1=AE=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/admin/apis/migumanage/migu_admin.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/admin/apis/migumanage/migu_admin.go b/app/admin/apis/migumanage/migu_admin.go index f8e8e5e..cc479db 100644 --- a/app/admin/apis/migumanage/migu_admin.go +++ b/app/admin/apis/migumanage/migu_admin.go @@ -404,9 +404,7 @@ func (e MiGuDeployService) HistoricalSummaryList(c *gin.Context) { NULLIF(COUNT(*), 0), 2), '%') AS new_user_unsub_on_day_rate`). 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"). - Order("mg_order.product_id, mg_order.channel_code, mg_order.subscribe_time"). - Offset(pageNum * req.PageSize). - Limit(req.PageSize) + Order("mg_order.product_id, mg_order.channel_code, mg_order.subscribe_time") // 添加过滤条件 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 { logger.Errorf("HistoricalSummaryList query err: %#v", err) response.Error(c, http.StatusInternalServerError, err, "查询失败")