Merge pull request 'by Robin at 20240517' (#453) from feat-IRONFANS-120-Robin into main

Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/453
This commit is contained in:
chenhao 2024-05-17 18:58:13 +08:00
commit 3bbbeee0ab
1 changed files with 1 additions and 1 deletions

View File

@ -542,7 +542,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 {