From aae1689fc310943e0299bb3fd4ecf6c239bce32c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 25 Nov 2019 17:40:05 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E7=BB=9F=E8=AE=A1=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/model/dao/report.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/business/model/dao/report.go b/business/model/dao/report.go index 901d1d6db..a668c5a4b 100644 --- a/business/model/dao/report.go +++ b/business/model/dao/report.go @@ -63,7 +63,7 @@ func GetStatisticsReportForOrders(db *DaoDB, storeIDs []int, fromDate time.Time, LEFT JOIN ( SELECT - a.store_id, + IF(a.jx_store_id <> 0,a.jx_store_id,store_id) store_id, COUNT(*) order_counts, SUM(sale_price) sale_price, SUM(actual_pay_price) actual_pay_price, @@ -92,7 +92,7 @@ func GetStatisticsReportForOrders(db *DaoDB, storeIDs []int, fromDate time.Time, sqlParams = append(sqlParams, storeIDs) } sql += ` - GROUP BY a.store_id + GROUP BY 1 )s ON s.store_id = c.id ` @@ -136,7 +136,7 @@ func GetGetStatisticsReportForAfsOrders(db *DaoDB, storeIDs []int, fromDate time LEFT JOIN ( SELECT - a.store_id, + IF(a.jx_store_id <> 0,a.jx_store_id,store_id) store_id, COUNT(*) order_counts, SUM(sale_price) sale_price, SUM(actual_pay_price) actual_pay_price, @@ -164,7 +164,7 @@ func GetGetStatisticsReportForAfsOrders(db *DaoDB, storeIDs []int, fromDate time sqlParams = append(sqlParams, storeIDs) } sql += ` - GROUP BY a.store_id + GROUP BY 1 )s ON s.store_id = c.id `