You've already forked FrameTour-BE
fix(service): 修复视频任务状态和内容ID设置问题
- 修复当完成数量小于等于0时视频任务状态设置为待处理 - 调整内容页面VO中内容ID的设置顺序以确保正确赋值
This commit is contained in:
@@ -330,6 +330,9 @@ 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) {
|
||||||
|
response.setStatus(VideoTaskStatus.PENDING.getCode());
|
||||||
|
}
|
||||||
|
|
||||||
// ==================== 第四步:根据切片完成状态返回结果 ====================
|
// ==================== 第四步:根据切片完成状态返回结果 ====================
|
||||||
|
|
||||||
|
|||||||
@@ -488,12 +488,12 @@ public class FaceServiceImpl implements FaceService {
|
|||||||
contentPageVO.setContentType(1);
|
contentPageVO.setContentType(1);
|
||||||
contentPageVO.setSort(contentPageVO.getSort());
|
contentPageVO.setSort(contentPageVO.getSort());
|
||||||
if (!memberVideoEntityList.isEmpty()) {
|
if (!memberVideoEntityList.isEmpty()) {
|
||||||
|
contentPageVO.setContentId(memberVideoEntityList.getFirst().getVideoId());
|
||||||
boolean isBuy = orderRepository.checkUserBuyFaceItem(userId, faceId, 0, contentPageVO.getContentId());
|
boolean isBuy = orderRepository.checkUserBuyFaceItem(userId, faceId, 0, contentPageVO.getContentId());
|
||||||
if (!isBuy) {
|
if (!isBuy) {
|
||||||
isBuy = orderRepository.checkUserBuyFaceItem(userId, faceId, -1, contentPageVO.getTemplateId()); // 购买模板
|
isBuy = orderRepository.checkUserBuyFaceItem(userId, faceId, -1, contentPageVO.getTemplateId()); // 购买模板
|
||||||
}
|
}
|
||||||
contentPageVO.setIsBuy(isBuy ? 1 : 0);
|
contentPageVO.setIsBuy(isBuy ? 1 : 0);
|
||||||
contentPageVO.setContentId(memberVideoEntityList.getFirst().getVideoId());
|
|
||||||
VideoEntity video = videoRepository.getVideo(contentPageVO.getContentId());
|
VideoEntity video = videoRepository.getVideo(contentPageVO.getContentId());
|
||||||
if (video != null) {
|
if (video != null) {
|
||||||
contentPageVO.setVideoUrl(video.getVideoUrl());
|
contentPageVO.setVideoUrl(video.getVideoUrl());
|
||||||
|
|||||||
Reference in New Issue
Block a user