From 78bb668fad772eb5da1ca91e43ecf03fe9f86393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Mon, 4 Jan 2021 15:50:34 +0800 Subject: [PATCH] aa --- business/model/dao/dao_order.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/business/model/dao/dao_order.go b/business/model/dao/dao_order.go index 55c7563c8..c3b12fce5 100644 --- a/business/model/dao/dao_order.go +++ b/business/model/dao/dao_order.go @@ -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 }