aa
This commit is contained in:
@@ -242,7 +242,7 @@ func getFromSql(orderType, status int, alies string, userID string, pop int, cit
|
||||
|
||||
func GetPayStatistics(db *DaoDB, userID string, pop int, cityCodes []int, mobile string, fromTime, toTime time.Time, orderTypes []int) (getPayStatisticsResult *GetPayStatisticsResult, err error) {
|
||||
sqlParams := []interface{}{}
|
||||
sql := `SELECT t1.total_pay, t2.total_pay submit_cash, t3.total_pay cashed, t4.account_balance, t4.account_balance + t2.total_pay can_cash, t3.total_pay / 10 cash_income
|
||||
sql := `SELECT t1.total_pay, t2.total_pay submit_cash, t3.total_pay cashed, t4.account_balance, t4.account_balance + t2.total_pay can_cash
|
||||
FROM `
|
||||
rSQL1, rSQLParams1 := getFromSql(model.OrderTypePay, model.OrderStatusFinished, "t1", userID, pop, cityCodes, mobile, fromTime, toTime, orderTypes)
|
||||
sql += rSQL1 + ","
|
||||
@@ -333,6 +333,7 @@ func GetPayStatistics(db *DaoDB, userID string, pop int, cityCodes []int, mobile
|
||||
}
|
||||
err = GetRow(db, &getPayStatisticsResult1, sql2, sqlParams2)
|
||||
getPayStatisticsResult.MemberIncome = getPayStatisticsResult1.MemberIncome
|
||||
getPayStatisticsResult.CashIncome = getPayStatisticsResult.Cashed / 10
|
||||
getPayStatisticsResult.TotalIncome = getPayStatisticsResult.MemberIncome + getPayStatisticsResult.CashIncome
|
||||
return getPayStatisticsResult, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user