From 8cc83fc70c124d920f399536234a17027be290d3 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Fri, 29 Mar 2024 22:55:58 +0800 Subject: [PATCH] by Robin at 20240329 --- .../proto/moment_audit_task_op.go | 15 ++++++++------- app/mix/dao/mongo.go | 4 ++++ app/mix/service/apiservice.go | 2 +- app/mix/service/service.go | 1 + 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/api/proto/moment_audit_task/proto/moment_audit_task_op.go b/api/proto/moment_audit_task/proto/moment_audit_task_op.go index 962204d0..b4a10cd5 100644 --- a/api/proto/moment_audit_task/proto/moment_audit_task_op.go +++ b/api/proto/moment_audit_task/proto/moment_audit_task_op.go @@ -50,13 +50,14 @@ type OpUpdateResp struct { // op 列表 type OpListReq struct { base.BaseRequest - AssociativeTableId *int64 `json:"associative_table_id"` - BatchId *string `json:"batch_id"` - ImageAuditTaskId *string `json:"image_audit_task_id"` - TextAuditTaskId *string `json:"text_audit_task_id"` - Status *int64 `json:"status"` - Offset int `json:"offset"` - Limit int `json:"limit"` + AssociativeTableId *int64 `json:"associative_table_id"` + BatchId *string `json:"batch_id"` + ImageAuditTaskId *string `json:"image_audit_task_id"` + TextAuditTaskId *string `json:"text_audit_task_id"` + Status *int64 `json:"status"` + ManuallyReviewStatus *int64 `json:"manually_review_status"` + Offset int `json:"offset"` + Limit int `json:"limit"` } type OpListData struct { diff --git a/app/mix/dao/mongo.go b/app/mix/dao/mongo.go index 9587638a..18c13217 100644 --- a/app/mix/dao/mongo.go +++ b/app/mix/dao/mongo.go @@ -3221,6 +3221,9 @@ func (m *Mongo) GetMomentAuditTaskList(ctx *gin.Context, req *moment_audit_taskp if req.TextAuditTaskId != nil { query["text_audit_task_id"] = util.DerefString(req.TextAuditTaskId) } + if req.ManuallyReviewStatus != nil { + query["manually_review_status"] = util.DerefInt64(req.ManuallyReviewStatus) + } if req.Status != nil { // 若是审核通过,则图像和文字审核均必须通过 // 若是人工审核通过,则图像和文字审核中至少要有一个人工审核通过,且剩下的均为通过或者人工审核通过 @@ -3268,6 +3271,7 @@ func (m *Mongo) GetMomentAuditTaskListWaitingForManuallyReview(ctx *gin.Context, list := make([]*dbstruct.MomentAuditTask, 0) col := m.getColMomentAuditTask() query := qmgo.M{ + "manually_review_status": consts.MomentManuallyReview_Waiting, "image_audit_task_status": qmgo.M{ "$ne": consts.ImageAudit_Created, }, diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index 38ba4f7d..c749a8c7 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -1897,7 +1897,7 @@ func (s *Service) ApiGetMomentListByMid(ctx *gin.Context, req *momentproto.ApiLi req.Mid = goproto.Int64(req.BaseRequest.Mid) } // 用户查别人,只查公开 - if util.DerefInt64(req.Mid) == req.BaseRequest.Mid { + if util.DerefInt64(req.Mid) != req.BaseRequest.Mid { req.Status = goproto.Int64(consts.Moment_Public) } diff --git a/app/mix/service/service.go b/app/mix/service/service.go index d7b65903..75626f39 100644 --- a/app/mix/service/service.go +++ b/app/mix/service/service.go @@ -2772,6 +2772,7 @@ func (s *Service) OpGetMomentAuditTaskList(ctx *gin.Context, req *moment_audit_t return } + req.ManuallyReviewStatus = goproto.Int64(consts.MomentManuallyReview_Waiting) list, err := _DefaultMomentAuditTask.OpList(ctx, req) if err != nil { logger.Error("OpGetMomentAuditTaskList fail, req: %v, err: %v", util.ToJson(req), err)