bug修改,根性视频meta信息

This commit is contained in:
2025-01-09 19:34:20 +08:00
parent c27665e513
commit 5c0bf09c95
12 changed files with 101 additions and 7 deletions

View File

@ -196,6 +196,9 @@ public class GoodsServiceImpl implements GoodsService {
goodsDetailVO.setVideoUrl(videoRespVO.getVideoUrl());
goodsDetailVO.setTemplateCoverUrl(videoRespVO.getTemplateCoverUrl());
goodsDetailVO.setCreateTime(videoRespVO.getCreateTime());
goodsDetailVO.setHeight(videoRespVO.getHeight());
goodsDetailVO.setWidth(videoRespVO.getWidth());
goodsDetailVO.setDuration(videoRespVO.getDuration());
if (userId == null) {
goodsDetailVO.setIsBuy(0);
goodsDetailVO.setShare(true);

View File

@ -364,6 +364,11 @@ public class TaskTaskServiceImpl implements TaskService {
VideoEntity video = videoMapper.findByTaskId(taskId);
if (video != null) {
video.setVideoUrl(task.getVideoUrl());
if (req.getVideoInfo() != null) {
video.setHeight(req.getVideoInfo().getHeight());
video.setWidth(req.getVideoInfo().getWidth());
video.setDuration(req.getVideoInfo().getDuration());
}
videoMapper.update(video);
} else {
video = new VideoEntity();
@ -374,6 +379,11 @@ public class TaskTaskServiceImpl implements TaskService {
video.setWorkerId(worker.getId());
video.setVideoUrl(task.getVideoUrl());
video.setCreateTime(new Date());
if (req.getVideoInfo() != null) {
video.setHeight(req.getVideoInfo().getHeight());
video.setWidth(req.getVideoInfo().getWidth());
video.setDuration(req.getVideoInfo().getDuration());
}
videoMapper.add(video);
}
int isBuy = 0;