This commit is contained in:
lwl0608 2024-07-01 17:07:38 +08:00
parent e19471c4bd
commit 8147201960
1 changed files with 2 additions and 2 deletions

View File

@ -1271,8 +1271,8 @@ func (m *Mysql) GetTodayIncome(ctx *gin.Context, tx *sqlx.Tx, mid int64) (int64,
var ( var (
err error err error
s = S{} s = S{}
et = util.GetTodayZeroTime().Unix() st = util.GetTodayZeroTime().Unix()
st = et - 86400 et = st + 86400
) )
sqlStr := fmt.Sprintf("select sum(`change`) as income from %s where mid=? and ct>=? and ct<?", TableConsumeHistoryIncome) sqlStr := fmt.Sprintf("select sum(`change`) as income from %s where mid=? and ct>=? and ct<?", TableConsumeHistoryIncome)
args := []any{mid, st, et} args := []any{mid, st, et}