diff --git a/modules/backend/models/db.go b/modules/backend/models/db.go index 9339dc4..a946863 100644 --- a/modules/backend/models/db.go +++ b/modules/backend/models/db.go @@ -1200,8 +1200,8 @@ func GetNewPayAmountBySqls(s, e int64, t common.CurrencyType, channel ...*int) i INNER JOIN (SELECT id from users where birth >= %d AND birth < %d) as u ON re.uid = u.id - WHERE event = %d AND status = %d and callback_time >= %d AND callback_time < %d and currency_type = %d`, - i, i+oneDay, common.CurrencyEventReCharge, common.StatusROrderPay, i, i+oneDay, t) + WHERE event in (%d,%d) AND status = %d and callback_time >= %d AND callback_time < %d and currency_type = %d`, + i, i+oneDay, common.CurrencyEventReCharge, common.CurrencyEventActivityWeekCard, common.StatusROrderPay, i, i+oneDay, t) if len(channel) > 0 { sql += PackChannels(channel...) } @@ -1257,8 +1257,8 @@ func GetOldPayCountBySqls(s, e int64, channel ...*int) int64 { INNER JOIN (SELECT id from users WHERE birth < %d)AS u ON re.uid = u.id - WHERE event = %d AND status = %d AND re.callback_time >= %d AND re.callback_time < %d AND event = %d`, - i, common.CurrencyEventReCharge, common.StatusROrderPay, i, i+oneDay, common.CurrencyEventReCharge) + WHERE event in (%d,%d) AND status = %d AND re.callback_time >= %d AND re.callback_time < %d AND event = %d`, + i, common.CurrencyEventReCharge, common.CurrencyEventActivityWeekCard, common.StatusROrderPay, i, i+oneDay, common.CurrencyEventReCharge) if len(channel) > 0 { sql += PackChannels(channel...) }