refactor(video): 将视频实体中的workerId字段改为faceId

- 修改VideoEntity类中字段workerId为faceId,并更新注释
- 更新TaskTaskServiceImpl中设置视频信息的逻辑,使用faceId替代workerId
- 修改VideoMapper.xml中插入视频记录的SQL语句,字段由workerId改为faceId
- 调整VideoMapper.xml中更新视频记录的SQL条件,使用faceId进行筛选
- 更新VideoMapper.xml中查询视频列表和单个视频详情的SQL语句,字段名由workerId改为faceId
- 优化查询条件中对faceId的处理逻辑,直接关联video表的face_id字段
This commit is contained in:
2025-12-15 16:50:17 +08:00
parent 0665eef37d
commit 7348994427
4 changed files with 11 additions and 20 deletions

View File

@@ -34,9 +34,9 @@ public class VideoEntity {
*/
private Long taskId;
/**
* 执行任务的机器ID,render_worker.id
* 人脸ID,对应face.id
*/
private Long workerId;
private Long faceId;
/**
* 视频链接
*/

View File

@@ -27,11 +27,6 @@ public class VideoRepository {
public static final String VIDEO_CACHE_KEY = "video:%s";
public static final String VIDEO_BY_TASK_ID_CACHE_KEY = "video:task:%s";
@Autowired
@Lazy
private PriceBiz priceBiz;
@Autowired
private IVoucherService iVoucherService;
@Autowired
private MemberRelationRepository memberRelationRepository;
public VideoEntity getVideo(Long videoId) {

View File

@@ -492,7 +492,7 @@ public class TaskTaskServiceImpl implements TaskService {
video.setScenicId(task.getScenicId());
video.setTemplateId(task.getTemplateId());
video.setTaskId(taskId);
video.setWorkerId(worker.getId());
video.setFaceId(task.getFaceId());
video.setVideoUrl(task.getVideoUrl());
video.setCreateTime(new Date());
if (req.getVideoInfo() != null) {