fix(goods): 修复商品服务中视频任务状态返回逻辑

- 检查是否有完成的模板,如果没有则返回待处理状态
- 在计数为0时提前返回响应,避免后续处理逻辑执行
This commit is contained in:
2026-01-08 14:37:31 +08:00
parent 5952390093
commit 3ff76a0bea

View File

@@ -330,8 +330,10 @@ public class GoodsServiceImpl implements GoodsService {
// 设置已完成数量和总模板数 // 设置已完成数量和总模板数
response.setCount(count.get()); response.setCount(count.get());
response.setMaxCount(templateList.size()); response.setMaxCount(templateList.size());
// 检查是否有完成的模板,如果没有则返回待处理
if (count.get() <= 0) { if (count.get() <= 0) {
response.setStatus(VideoTaskStatus.PENDING.getCode()); response.setStatus(VideoTaskStatus.PENDING.getCode());
return response;
} }
// ==================== 第四步:根据切片完成状态返回结果 ==================== // ==================== 第四步:根据切片完成状态返回结果 ====================