by Robin at 20240329

This commit is contained in:
Leufolium 2024-03-29 22:55:58 +08:00
parent f08bd346c9
commit 8cc83fc70c
4 changed files with 14 additions and 8 deletions

View File

@ -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 {

View File

@ -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,
},

View File

@ -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)
}

View File

@ -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)