From 42f56872b970367d14ed99425526195f7a50a929 Mon Sep 17 00:00:00 2001 From: Leufolium Date: Thu, 29 Feb 2024 01:48:51 +0800 Subject: [PATCH] by Robin at 20240229; fix --- library/contentaudit/imageaudit/control_block.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/contentaudit/imageaudit/control_block.go b/library/contentaudit/imageaudit/control_block.go index 516caec8..ae7bf5a3 100644 --- a/library/contentaudit/imageaudit/control_block.go +++ b/library/contentaudit/imageaudit/control_block.go @@ -40,7 +40,7 @@ func NewImageAuditTaskBatchControlBlock(tasks []*dbstruct.ImageAuditTask, batchI taskCtrlBlock := NewImageAuditTaskControlBlock(task) ctrlBlock.TaskCtrlBlocks = append(ctrlBlock.TaskCtrlBlocks, taskCtrlBlock) ctrlBlock.RecordAction(taskCtrlBlock) - ctrlBlock.RecordImage(taskCtrlBlock, &mediaFillables, imageIndex, taskIndex) + imageIndex, taskIndex = ctrlBlock.RecordImage(taskCtrlBlock, &mediaFillables, imageIndex, taskIndex) } mediafiller.FillList(&gin.Context{}, mediaFillables) @@ -62,7 +62,7 @@ func (ctrlBlock *ImageAuditTaskBatchControlBlock) RecordAction(taskCtrlBlock *Im ctrlBlock.ActionMap[taskCtrlBlock.ActionId].Record(taskCtrlBlock) } -func (ctrlBlock *ImageAuditTaskBatchControlBlock) RecordImage(taskCtrlBlock *ImageAuditTaskControlBlock, mediaFillables *[]mediafiller.MediaFillable, imageIndex int, taskIndex int) { +func (ctrlBlock *ImageAuditTaskBatchControlBlock) RecordImage(taskCtrlBlock *ImageAuditTaskControlBlock, mediaFillables *[]mediafiller.MediaFillable, imageIndex int, taskIndex int) (newImageIndex int, newTaskIndex int) { // 未分片 if util.DerefInt64(taskCtrlBlock.ImageAuditTask.IsFragmented) == 0 { @@ -87,6 +87,7 @@ func (ctrlBlock *ImageAuditTaskBatchControlBlock) RecordImage(taskCtrlBlock *Ima } taskIndex++ + return imageIndex, taskIndex } // 图像审核任务控制块