Accept Merge Request #37: (yonghui -> mark)

Merge Request: 统计订单查询bug修改
Created By: @苏尹岚
Accepted By: @苏尹岚
URL: https://rosydev.coding.net/p/jx-callback/d/jx-callback/git/merge/37
This commit is contained in:
苏尹岚
2019-11-25 17:40:58 +08:00

View File

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