aa
This commit is contained in:
@@ -50,7 +50,7 @@ type PriceReferSnapshotExt struct {
|
||||
}
|
||||
|
||||
//查询统计订单信息
|
||||
func GetStatisticsReportForOrders(db *DaoDB, storeIDs []int, fromDate time.Time, toDate time.Time) (statisticsReportForOrdersList []*StatisticsReportForOrdersList, err error) {
|
||||
func GetStatisticsReportForOrders(db *DaoDB, storeIDs, vendorIDs []int, fromDate time.Time, toDate time.Time) (statisticsReportForOrdersList []*StatisticsReportForOrdersList, err error) {
|
||||
sql := `
|
||||
SELECT
|
||||
c.id store_id,
|
||||
@@ -113,6 +113,10 @@ func GetStatisticsReportForOrders(db *DaoDB, storeIDs []int, fromDate time.Time,
|
||||
sql += ` AND IF(a.jx_store_id != 0, a.jx_store_id, a.store_id) IN(` + GenQuestionMarks(len(storeIDs)) + `)`
|
||||
sqlParams = append(sqlParams, storeIDs)
|
||||
}
|
||||
if len(vendorIDs) > 0 {
|
||||
sql += ` AND a.vendor_id IN(` + GenQuestionMarks(len(vendorIDs)) + `)`
|
||||
sqlParams = append(sqlParams, vendorIDs)
|
||||
}
|
||||
sql += `
|
||||
GROUP BY 1
|
||||
)s
|
||||
|
||||
Reference in New Issue
Block a user