Merge pull request 'by Robin at 20240229; fix' (#149) from feat-20240117-001-Robin into main

Reviewed-on: http://121.41.31.146:3000/wishpal_ironfan/service/pulls/149
This commit is contained in:
chenhao 2024-02-29 01:50:14 +08:00
commit a1f3e5b4ff
1 changed files with 3 additions and 2 deletions

View File

@ -40,7 +40,7 @@ func NewImageAuditTaskBatchControlBlock(tasks []*dbstruct.ImageAuditTask, batchI
taskCtrlBlock := NewImageAuditTaskControlBlock(task) taskCtrlBlock := NewImageAuditTaskControlBlock(task)
ctrlBlock.TaskCtrlBlocks = append(ctrlBlock.TaskCtrlBlocks, taskCtrlBlock) ctrlBlock.TaskCtrlBlocks = append(ctrlBlock.TaskCtrlBlocks, taskCtrlBlock)
ctrlBlock.RecordAction(taskCtrlBlock) ctrlBlock.RecordAction(taskCtrlBlock)
ctrlBlock.RecordImage(taskCtrlBlock, &mediaFillables, imageIndex, taskIndex) imageIndex, taskIndex = ctrlBlock.RecordImage(taskCtrlBlock, &mediaFillables, imageIndex, taskIndex)
} }
mediafiller.FillList(&gin.Context{}, mediaFillables) mediafiller.FillList(&gin.Context{}, mediaFillables)
@ -62,7 +62,7 @@ func (ctrlBlock *ImageAuditTaskBatchControlBlock) RecordAction(taskCtrlBlock *Im
ctrlBlock.ActionMap[taskCtrlBlock.ActionId].Record(taskCtrlBlock) 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 { if util.DerefInt64(taskCtrlBlock.ImageAuditTask.IsFragmented) == 0 {
@ -87,6 +87,7 @@ func (ctrlBlock *ImageAuditTaskBatchControlBlock) RecordImage(taskCtrlBlock *Ima
} }
taskIndex++ taskIndex++
return imageIndex, taskIndex
} }
// 图像审核任务控制块 // 图像审核任务控制块