You've already forked FrameTour-BE
fix(video): 修复任务状态查询逻辑并优化Redis过期策略
- 修改人脸模板渲染状态存储逻辑,增加默认过期时间 - 移除AppTaskController中冗余的JwtInfo获取代码 - 优化GoodsServiceImpl中任务状态判断逻辑,增强空值检查 - 修复视频任务状态返回不准确的问题,完善边界条件处理
This commit is contained in:
@@ -356,7 +356,11 @@ public class GoodsServiceImpl implements GoodsService {
|
||||
if (status == FaceCutStatus.COMPLETED) {
|
||||
// 切片已完成,查询该人脸关联的视频信息
|
||||
List<MemberVideoEntity> taskList = videoMapper.listRelationByFace(faceId);
|
||||
if (taskList == null || taskList.isEmpty() || taskList.getLast().getVideoId() == null) {
|
||||
if (taskList == null || taskList.isEmpty()) {
|
||||
response.setStatus(VideoTaskStatus.PENDING.getCode());
|
||||
return response;
|
||||
}
|
||||
if (taskList.getLast().getVideoId() == null) {
|
||||
response.setStatus(VideoTaskStatus.PROCESSING.getCode());
|
||||
return response;
|
||||
}
|
||||
@@ -464,7 +468,7 @@ public class GoodsServiceImpl implements GoodsService {
|
||||
// 该模板已渲染完成,查询对应的视频信息
|
||||
List<MemberVideoEntity> taskList = videoMapper.listRelationByFaceAndTemplate(faceId, templateId);
|
||||
|
||||
if (taskList.isEmpty() || taskList.getLast().getVideoId() == null) {
|
||||
if (taskList == null || taskList.isEmpty() || taskList.getLast().getVideoId() == null) {
|
||||
// 理论上不应该出现:渲染完成但无视频记录
|
||||
// 可能是数据不一致,返回待制作状态
|
||||
response.setStatus(VideoTaskStatus.PROCESSING.getCode());
|
||||
|
||||
Reference in New Issue
Block a user