aa
This commit is contained in:
@@ -50,7 +50,7 @@ type PriceReferSnapshotExt struct {
|
||||
}
|
||||
|
||||
//查询统计订单信息
|
||||
func GetStatisticsReportForOrders(db *DaoDB, storeIDs, vendorIDs []int, fromDate time.Time, toDate time.Time) (statisticsReportForOrdersList []*StatisticsReportForOrdersList, err error) {
|
||||
func GetStatisticsReportForOrders(db *DaoDB, storeIDs, vendorIDs []int, fromDate time.Time, toDate time.Time, marketPhone, jdPhone, mtPhone, ebaiPhone string) (statisticsReportForOrdersList []*StatisticsReportForOrdersList, err error) {
|
||||
sql := `
|
||||
SELECT
|
||||
c.id store_id,
|
||||
@@ -136,6 +136,22 @@ func GetStatisticsReportForOrders(db *DaoDB, storeIDs, vendorIDs []int, fromDate
|
||||
sql += ` WHERE c.id IN (` + GenQuestionMarks(len(storeIDs)) + `)`
|
||||
sqlParams = append(sqlParams, storeIDs)
|
||||
}
|
||||
if marketPhone != "" {
|
||||
sql += ` WHERE c.market_man_phone = ?`
|
||||
sqlParams = append(sqlParams, marketPhone)
|
||||
}
|
||||
if jdPhone != "" {
|
||||
sql += ` WHERE c.operator_phone = ?`
|
||||
sqlParams = append(sqlParams, marketPhone)
|
||||
}
|
||||
if mtPhone != "" {
|
||||
sql += ` WHERE c.operator_phone2 = ?`
|
||||
sqlParams = append(sqlParams, marketPhone)
|
||||
}
|
||||
if ebaiPhone != "" {
|
||||
sql += ` WHERE c.operator_phone3 = ?`
|
||||
sqlParams = append(sqlParams, marketPhone)
|
||||
}
|
||||
if err = GetRows(db, &statisticsReportForOrdersList, sql, sqlParams...); err == nil {
|
||||
return statisticsReportForOrdersList, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user