diff --git a/api/proto/imageaudittask/proto/imageaudittask_op.go b/api/proto/imageaudittask/proto/imageaudittask_op.go index 05b3377f..6ebd5023 100644 --- a/api/proto/imageaudittask/proto/imageaudittask_op.go +++ b/api/proto/imageaudittask/proto/imageaudittask_op.go @@ -60,7 +60,7 @@ type OpListReq struct { Offset int `json:"offset"` Limit int `json:"limit"` Sort string - IsAligned *int64 + NotAlignedOpt int } type OpListData struct { diff --git a/api/proto/textaudittask/proto/textaudittask_op.go b/api/proto/textaudittask/proto/textaudittask_op.go index 97347f9f..1ddc2c07 100644 --- a/api/proto/textaudittask/proto/textaudittask_op.go +++ b/api/proto/textaudittask/proto/textaudittask_op.go @@ -60,7 +60,7 @@ type OpListReq struct { Offset int `json:"offset"` Limit int `json:"limit"` Sort string - IsAligned *int64 + NotAlignedOpt int64 } type OpListData struct { diff --git a/app/mix/dao/mongo.go b/app/mix/dao/mongo.go index d2f2dd87..f94155eb 100644 --- a/app/mix/dao/mongo.go +++ b/app/mix/dao/mongo.go @@ -2512,8 +2512,10 @@ func (m *Mongo) GetImageAuditTaskList(ctx *gin.Context, req *imageaudittaskproto if req.Status != nil { query["status"] = util.DerefInt64(req.Status) } - if req.IsAligned != nil { - query["is_aligned"] = util.DerefInt64(req.IsAligned) + if req.NotAlignedOpt != 0 { + query["is_aligned"] = qmgo.M{ + "$ne": consts.ImageAuditIsAligned_Yes, + } } sortClause := "-ct" if req.Sort != "" { @@ -2746,8 +2748,10 @@ func (m *Mongo) GetTextAuditTaskList(ctx *gin.Context, req *textaudittaskproto.O if req.Status != nil { query["status"] = util.DerefInt64(req.Status) } - if req.IsAligned != nil { - query["is_aligned"] = util.DerefInt64(req.IsAligned) + if req.NotAlignedOpt != 0 { + query["is_aligned"] = qmgo.M{ + "$ne": consts.TextAuditIsAligned_Yes, + } } sortClause := "-ct" if req.Sort != "" { diff --git a/app/mix/service/service.go b/app/mix/service/service.go index bb3e791a..7cfc54d2 100644 --- a/app/mix/service/service.go +++ b/app/mix/service/service.go @@ -2480,6 +2480,9 @@ func (s *Service) OpGetImageAuditTaskVOList(ctx *gin.Context, req *imageaudittas return } + // 仅查询未对齐的任务 + req.NotAlignedOpt = 1 + list, err := _DefaultImageAuditTask.OpList(ctx, req) if err != nil { logger.Error("OpGetImageAuditTaskListByMid fail, req: %v, err: %v", util.ToJson(req), err) @@ -2547,6 +2550,9 @@ func (s *Service) OpGetTextAuditTaskVOList(ctx *gin.Context, req *textaudittaskp return } + // 仅查询未对齐的任务 + req.NotAlignedOpt = 1 + list, err := _DefaultTextAuditTask.OpList(ctx, req) if err != nil { logger.Error("OpGetTextAuditTaskListByMid fail, req: %v, err: %v", util.ToJson(req), err) diff --git a/etc/mix/mix-prod.yaml b/etc/mix/mix-prod.yaml index dcde8188..4540a5d0 100644 --- a/etc/mix/mix-prod.yaml +++ b/etc/mix/mix-prod.yaml @@ -82,7 +82,8 @@ imageaudit: access_key_id: "LTAI5tD2Mg5mPUDQLPZZriPJ" access_key_secret: "IseIbk7fMbwy0eL33J2ro4Y55mWkn4" #scenes: "porn terrorism ad live logo" - scenes: "porn terrorism live logo" + #scenes: "porn terrorism live logo" + scenes: "porn terrorism live" task_buffer_size: 100 task_packet_size: 100 diff --git a/etc/mix/mix-test.yaml b/etc/mix/mix-test.yaml index 5f227eb6..5d24408e 100644 --- a/etc/mix/mix-test.yaml +++ b/etc/mix/mix-test.yaml @@ -81,7 +81,8 @@ imageaudit: access_key_id: "LTAI5tD2Mg5mPUDQLPZZriPJ" access_key_secret: "IseIbk7fMbwy0eL33J2ro4Y55mWkn4" #scenes: "porn terrorism ad live logo" - scenes: "porn terrorism live logo" + #scenes: "porn terrorism live logo" + scenes: "porn terrorism live" task_buffer_size: 100 task_packet_size: 100