diff --git a/app/mix/dao/mongo_vas.go b/app/mix/dao/mongo_vas.go index acd5bb86..c7acf19c 100644 --- a/app/mix/dao/mongo_vas.go +++ b/app/mix/dao/mongo_vas.go @@ -291,7 +291,7 @@ func (m *Mongo) AddWithdrawHis(ctx *gin.Context, doc *dbstruct.WithdrawHis) erro } // 用户退款表:查询主播审核列表 -func (m *Mongo) GetZoneRefundList(ctx *gin.Context, bMid int64, refundsStatusList []int64) ([]*dbstruct.RefundInfo, error) { +func (m *Mongo) GetZoneRefundList(ctx *gin.Context, bMid int64, refundsStatusList []int64, offset int, limit int) ([]*dbstruct.RefundInfo, error) { list := make([]*dbstruct.RefundInfo, 0) doc := m.GetZoneRefund() @@ -301,7 +301,7 @@ func (m *Mongo) GetZoneRefundList(ctx *gin.Context, bMid int64, refundsStatusLis "$in": refundsStatusList, }, } - err := doc.Find(ctx, query).All(&list) + err := doc.Find(ctx, query).Limit(int64(limit)).Skip(int64(offset)).All(&list) if errors.Is(err, qmgo.ErrNoSuchDocuments) { err = nil return nil, err diff --git a/app/mix/service/logic/vas_zone.go b/app/mix/service/logic/vas_zone.go index db4cb3ed..b3c4f4e0 100644 --- a/app/mix/service/logic/vas_zone.go +++ b/app/mix/service/logic/vas_zone.go @@ -1099,9 +1099,9 @@ func (v *Vas) ZoneRefundList(ctx *gin.Context, req *vasproto.ZoneRefundListReq) if req.AuditType == consts.UnAudited { refundsStatusList = append(refundsStatusList, dbstruct.RefundsAwaiting) } else if req.AuditType == consts.Audited { - refundsStatusList = append(refundsStatusList, dbstruct.RefundsApproved, dbstruct.RefundsRejected, dbstruct.RefundsOvertime) + refundsStatusList = append(refundsStatusList, dbstruct.RefundsApproved, dbstruct.RefundsAutomatic, dbstruct.RefundsRejected, dbstruct.RefundsOvertime) } - list, err = v.store.GetZoneRefundList(ctx, req.Mid, refundsStatusList) + list, err = v.store.GetZoneRefundList(ctx, req.Mid, refundsStatusList, req.Offset, req.Limit) if err != nil { logger.Error("ZoneRefundList GetZoneRefundList fail, mid: %v, audit_type: %v, err: %v", req.Mid, req.AuditType, err) return