diff --git a/api/proto/vas/proto/vas.go b/api/proto/vas/proto/vas.go index 41c1cfb7..c659122d 100644 --- a/api/proto/vas/proto/vas.go +++ b/api/proto/vas/proto/vas.go @@ -96,7 +96,9 @@ type WithdrawPageReq struct { } type WithdrawPageData struct { - WithdrawDiamonds int64 `json:"withdraw_diamonds"` // 可提现的钻石 + WithdrawDiamonds int64 `json:"withdraw_diamonds"` // 可提现的钻石 + Day7TotalDiamonds int64 `json:"day7_total_diamonds"` // 7天前0~24点总收益 + Day7TotalWithdrawDiamonds int64 `json:"day7_total_withdraw_diamonds"` // 7天前0~24点已结算总收益 } // 提现发送验证码 diff --git a/app/mix/dao/mysql.go b/app/mix/dao/mysql.go index ff7f05b3..a2497d7f 100644 --- a/app/mix/dao/mysql.go +++ b/app/mix/dao/mysql.go @@ -1158,3 +1158,44 @@ func (m *Mysql) CreateWithdrawDiamondsHis(ctx *gin.Context, tx *sqlx.Tx, h *dbst } return err } + +// 根据时间段获取收益钻石 +func (m *Mysql) GetIncomeList(ctx *gin.Context, tx *sqlx.Tx, mid, st, et int64) (list []*dbstruct.ConsumeHistory, err error) { + list = make([]*dbstruct.ConsumeHistory, 0) + tableName, err := m.ChTableName(&dbstruct.ConsumeHistory{Type: goproto.Int32(dbstruct.CHTypeIncome)}) + sqlStr := fmt.Sprintf("select order_id,`change` from %s where mid=? and ct>=? and ct