aa
This commit is contained in:
@@ -177,3 +177,28 @@ func GetOrders(db *DaoDB, orderID, userID string, orderType int, cityCodes []int
|
||||
}
|
||||
return pagedInfo, err
|
||||
}
|
||||
|
||||
type GetPayStatisticsResult struct {
|
||||
TotalPay int `json:"totalPay"` //支付总额
|
||||
CanCash int `json:"canCash"` //可提现(未提现+申请提现)
|
||||
AccountBalance int `json:"accountBalance"` //未提现(含保证金)
|
||||
SubmitCash int `json:"submitCash"` //申请提现
|
||||
Cashed int `json:"cashed"` //已经体现
|
||||
TotalIncome int `json:"totalIncome"` //收益总额
|
||||
MemberIncome int `json:"memberIncome"` //会员收益
|
||||
CashIncome int `json:"cashIncome"` //提现收益
|
||||
}
|
||||
|
||||
func GetPayStatistics(db *DaoDB, userID string, pop int, cityCodes []int, mobile string, fromTime, toTime time.Time, consumeTypes []int) (getPayStatisticsResult *GetPayStatisticsResult, err error) {
|
||||
sqlParams := []interface{}{}
|
||||
sql := `
|
||||
SELECT a.*
|
||||
FROM user a
|
||||
WHERE 1 = 1
|
||||
`
|
||||
if userID != "" {
|
||||
sql += " AND a.user_id = ?"
|
||||
sqlParams = append(sqlParams, userID)
|
||||
}
|
||||
return getPayStatisticsResult, err
|
||||
}
|
||||
|
||||
@@ -175,11 +175,12 @@ func GetUsers2(db *DaoDB, keyword string, userID string, pop int, mobile string,
|
||||
WHERE a.status = 1 AND a.deleted_at = ?`
|
||||
sqlParams = append(sqlParams, utils.DefaultTimeValue)
|
||||
if userID != "" {
|
||||
sql += " AND a.user_id = ?"
|
||||
sqlParams = append(sqlParams, userID)
|
||||
if pop == 1 {
|
||||
sql += " AND a.pop_user = ?"
|
||||
sqlParams = append(sqlParams, userID)
|
||||
} else {
|
||||
sql += " AND a.user_id = ?"
|
||||
sqlParams = append(sqlParams, userID)
|
||||
}
|
||||
}
|
||||
if len(cityCodes) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user