by Robin at 20240517
This commit is contained in:
parent
52e8d60715
commit
f0198e6e71
|
@ -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) {
|
func (m *Mysql) GetLastHourZoneRefund(ctx *gin.Context, tx *sqlx.Tx, st, et int64) (list []*dbstruct.ZoneProfit, err error) {
|
||||||
var sql strings.Builder
|
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))
|
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)
|
list = make([]*dbstruct.ZoneProfit, 0)
|
||||||
if tx != nil {
|
if tx != nil {
|
||||||
|
|
Loading…
Reference in New Issue