This commit is contained in:
Leufolium 2024-07-05 16:59:39 +08:00
parent cdcf23db57
commit 518b494873
2 changed files with 7 additions and 3 deletions

View File

@ -51,6 +51,7 @@ type OpUpdateResp struct {
type OpListReq struct {
base.BaseRequest
Status *int64 `json:"status"`
ApproveStatus *int64 `json:"approve_status"`
Offset int `json:"offset"`
Limit int `json:"limit"`
}

View File

@ -2516,6 +2516,9 @@ func (m *Mongo) GetStreamerAuthApprovalDetailsList(ctx *gin.Context, req *stream
if req.Status != nil {
query["status"] = util.DerefInt64(req.Status)
}
if req.ApproveStatus != nil {
query["approve_status"] = util.DerefInt64(req.ApproveStatus)
}
err := col.Find(ctx, query).Sort("-ct").Skip(int64(req.Offset)).Limit(int64(req.Limit)).All(&list)
if err == qmgo.ErrNoSuchDocuments {
err = nil