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

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

View File

@@ -88,7 +88,7 @@ func GetStatisticsReportForOrders(db *DaoDB, storeIDs []int, fromDate time.Time,
sqlParams = append(sqlParams, fromDate, toDate)
}
if len(storeIDs) > 0 {
sql += ` AND a.store_id IN(` + GenQuestionMarks(len(storeIDs)) + `)`
sql += ` AND IF(a.jx_store_id != 0, a.jx_store_id, a.store_id) IN(` + GenQuestionMarks(len(storeIDs)) + `)`
sqlParams = append(sqlParams, storeIDs)
}
sql += `
@@ -160,7 +160,7 @@ func GetGetStatisticsReportForAfsOrders(db *DaoDB, storeIDs []int, fromDate time
sqlParams = append(sqlParams, fromDate, toDate)
}
if len(storeIDs) > 0 {
sql += ` AND a.store_id IN(` + GenQuestionMarks(len(storeIDs)) + `)`
sql += ` AND IF(a.jx_store_id != 0, a.jx_store_id, a.store_id) IN(` + GenQuestionMarks(len(storeIDs)) + `)`
sqlParams = append(sqlParams, storeIDs)
}
sql += `