This commit is contained in:
苏尹岚
2021-01-04 10:57:55 +08:00
parent 8a4bf159f8
commit 2b9045b8f4

View File

@@ -280,7 +280,7 @@ func GetPayStatistics(db *DaoDB, userID string, pop int, cityCodes []int, mobile
sql2 += `) t1
LEFT JOIN (SELECT SUM(pay_price) member_income1, user_id FROM ` + "`order`" + ` WHERE type = ? AND status = ? `
sql2 += ` AND order_type = ?`
sqlParams2 = append(sqlParams2, model.OrderTpyeMember)
sqlParams2 = append(sqlParams2, model.OrderTypePay, model.OrderStatusFinished, model.OrderTpyeMember)
if fromTime != utils.ZeroTimeValue {
sql += ` AND created_at > ?`
sqlParams2 = append(sqlParams2, fromTime)
@@ -294,7 +294,7 @@ func GetPayStatistics(db *DaoDB, userID string, pop int, cityCodes []int, mobile
FROM user_bill b
LEFT JOIN bill_expend c ON c.bill_id = b.bill_id AND c.type = ?
`
sqlParams2 = append(sqlParams2, model.OrderTypePay, model.OrderStatusFinished, model.BillTypeMember)
sqlParams2 = append(sqlParams2, model.BillTypeMember)
if fromTime != utils.ZeroTimeValue {
sql2 += ` AND c.created_at > ?`
sqlParams2 = append(sqlParams2, fromTime)