by Robin at 20240517

This commit is contained in:
Leufolium 2024-05-17 18:57:41 +08:00
parent 52e8d60715
commit f0198e6e71
1 changed files with 1 additions and 1 deletions

View File

@ -521,7 +521,7 @@ func (m *Mysql) GetLastHourZoneProfit(ctx *gin.Context, tx *sqlx.Tx, st, et int6
func (m *Mysql) GetLastHourZoneRefund(ctx *gin.Context, tx *sqlx.Tx, st, et int64) (list []*dbstruct.ZoneProfit, err error) {
var sql strings.Builder
sql.WriteString(fmt.Sprintf("t1.uid as mid, t1.oid1 as zid, count(1) as num, sum(t1.pay_amount) as amount from %s t1 join %s t2 on t1.id = t2.order_id", TableOrder, TableVasZoneRefundHis))
sql.WriteString(fmt.Sprintf("select t1.uid as mid, t1.oid1 as zid, count(1) as num, sum(t1.pay_amount) as amount from %s t1 join %s t2 on t1.id = t2.order_id", TableOrder, TableVasZoneRefundHis))
sql.WriteString(fmt.Sprintf(" where t2.ct >=%d and t2.ct<=%d and t1.ct <%d group by t1.uid, t1.oid1", st, et, st))
list = make([]*dbstruct.ZoneProfit, 0)
if tx != nil {