diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index 0edc0d25..cfafedb5 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -1612,17 +1612,23 @@ func (s *Service) ApiCreateMoment(ctx *gin.Context, req *momentproto.ApiCreateRe // 封装动态审核任务 momentAuditTask := &dbstruct.MomentAuditTask{ - AssociativeTableId: goproto.String(fmt.Sprint(util.DerefInt64(req.Moment.Id))), - ImageAuditTaskStatus: goproto.Int64(consts.MomentAudit_Created), - TextAuditTaskStatus: goproto.Int64(consts.MomentAudit_Created), - AuditedMedia: req.Moment.MediaComp, - AuditedText: req.Moment.Text, + AssociativeTableId: goproto.String(fmt.Sprint(util.DerefInt64(req.Moment.Id))), + //ImageAuditTaskStatus: goproto.Int64(consts.MomentAudit_Created), + //TextAuditTaskStatus: goproto.Int64(consts.MomentAudit_Created), + AuditedMedia: req.Moment.MediaComp, + AuditedText: req.Moment.Text, } if len(imageaudittasks) > 0 { momentAuditTask.ImageAuditTaskId = imageaudittasks[0].Id + momentAuditTask.ImageAuditTaskStatus = goproto.Int64(consts.MomentAudit_Created) + } else { + momentAuditTask.ImageAuditTaskStatus = goproto.Int64(consts.MomentAudit_Passed) } if len(textaudittasks) > 0 { momentAuditTask.TextAuditTaskId = textaudittasks[0].Id + momentAuditTask.TextAuditTaskStatus = goproto.Int64(consts.MomentAudit_Created) + } else { + momentAuditTask.TextAuditTaskStatus = goproto.Int64(consts.MomentAudit_Passed) } if err := _DefaultMomentAuditTask.OpCreate(ctx, &moment_audit_taskproto.OpCreateReq{ MomentAuditTask: momentAuditTask, @@ -1677,17 +1683,23 @@ func (s *Service) ApiUpdateMoment(ctx *gin.Context, req *momentproto.ApiUpdateRe // 封装动态审核任务 momentAuditTask := &dbstruct.MomentAuditTask{ - AssociativeTableId: goproto.String(fmt.Sprint(util.DerefInt64(req.Moment.Id))), - ImageAuditTaskStatus: goproto.Int64(consts.MomentAudit_Created), - TextAuditTaskStatus: goproto.Int64(consts.MomentAudit_Created), + AssociativeTableId: goproto.String(fmt.Sprint(util.DerefInt64(req.Moment.Id))), + //ImageAuditTaskStatus: goproto.Int64(consts.MomentAudit_Created), + //TextAuditTaskStatus: goproto.Int64(consts.MomentAudit_Created), } if len(imageaudittasks) > 0 { momentAuditTask.AuditedMedia = imageaudittasks[0].AuditedMedia momentAuditTask.ImageAuditTaskId = imageaudittasks[0].Id + momentAuditTask.ImageAuditTaskStatus = goproto.Int64(consts.MomentAudit_Created) + } else { + momentAuditTask.ImageAuditTaskStatus = goproto.Int64(consts.MomentAudit_Passed) } if len(textaudittasks) > 0 { momentAuditTask.AuditedText = textaudittasks[0].AuditedText momentAuditTask.TextAuditTaskId = textaudittasks[0].Id + momentAuditTask.TextAuditTaskStatus = goproto.Int64(consts.MomentAudit_Created) + } else { + momentAuditTask.TextAuditTaskStatus = goproto.Int64(consts.MomentAudit_Passed) } if err := _DefaultMomentAuditTask.OpCreate(ctx, &moment_audit_taskproto.OpCreateReq{ MomentAuditTask: momentAuditTask, diff --git a/library/contentaudit/imageaudit/imageaudit.go b/library/contentaudit/imageaudit/imageaudit.go index 1bfa5caa..30555b37 100644 --- a/library/contentaudit/imageaudit/imageaudit.go +++ b/library/contentaudit/imageaudit/imageaudit.go @@ -61,7 +61,6 @@ func Run(batchId string) (successNum int, failNum int, err error) { ConnectTimeout: tea.Int(30000), } _result, err := defaultImageAuditClient.ScanImageAdvance(req, runtime) - logger.Info("Receive the response from ScanImageAdvance: %v", _result.String()) if err != nil { if _t, ok := err.(*tea.SDKError); ok { logger.Error("ScanImageAdvance fail, errinfo : %v", util.DerefString(_t.Data)) @@ -70,6 +69,7 @@ func Run(batchId string) (successNum int, failNum int, err error) { failNum = len(imageaudittasks) return } + logger.Info("Receive the response from ScanImageAdvance: %v", _result.String()) // 4.处理应答 err = handleScanImageResponse(ctrlBlock, _result)