This commit is contained in:
Leufolium 2024-07-20 10:21:45 +08:00
parent 3b8ed9a4e1
commit 4df038ad9e
1 changed files with 6 additions and 0 deletions

View File

@ -232,6 +232,12 @@ func finalizeTask(action *TextAuditAction) (err error) {
func copyScanResultInfo(textaudit *dbstruct.TextAudit, elements *textaudit.ScanTextResponseBodyDataElements) (pass bool, err error) {
pass = true
if len(elements.Results) == 0 {
pass = false
textaudit.Status = goproto.Int64(consts.TextAudit_ServiceFailed)
textaudit.NotPassScenes = append(textaudit.NotPassScenes, "机审失败")
return
}
for _, result := range elements.Results {
textaudit.Suggestion = result.Suggestion
textaudit.Label = result.Label