diff --git a/suimangSchedule/src/main/java/com/iformall/schedule/PhotoSpeakSchedule.java b/suimangSchedule/src/main/java/com/iformall/schedule/PhotoSpeakSchedule.java index a5866bf..d304787 100644 --- a/suimangSchedule/src/main/java/com/iformall/schedule/PhotoSpeakSchedule.java +++ b/suimangSchedule/src/main/java/com/iformall/schedule/PhotoSpeakSchedule.java @@ -87,7 +87,7 @@ public class PhotoSpeakSchedule { */ @Scheduled(cron = "0 1/5 * * * *?") // 每五分钟检查一次 public void userVideoDetailSchedule() { - List videos = photoSpeakVideoService.getUpLoadIngList(); + List videos = photoSpeakVideoService.getNotHaveUrl(); if (videos != null && videos.size() > 0) { for (PhotoSpeakVideo video : videos) { try { @@ -99,7 +99,11 @@ public class PhotoSpeakSchedule { video.setVideoPlayUrl(videoDetail.getVideoUrl()); video.setVideoTime(videoDetail.getDuration()); video.setVideoSize(videoDetail.getSize()); - video.setVideoStatus(EnumVideoStatus.upload_success.getCode()); + if (video.getVideoStatus() <= 5){ + video.setVideoStatus(EnumVideoStatus.upload_success.getCode()); + }else { + video.setVideoStatus(EnumVideoStatus.hy_upload_success.getCode()); + } photoSpeakVideoService.updateById(video); } } catch (Exception e) { @@ -112,7 +116,7 @@ public class PhotoSpeakSchedule { /** * 超分上传阿里云 */ - @Scheduled(cron = "0 */30 * * * *?") // 每半小时检查一次 +// @Scheduled(cron = "0 */30 * * * *?") // 每半小时检查一次 public void userVideoHyUploadSchedule() { List videos = photoSpeakVideoService.getNotHyUploadList(); if (videos != null && videos.size() > 0) { @@ -129,7 +133,7 @@ public class PhotoSpeakSchedule { /** * 获取超分时长和大小 */ - @Scheduled(cron = "0 1/5 * * * *?") // 每五分钟检查一次 +// @Scheduled(cron = "0 1/5 * * * *?") // 每五分钟检查一次 public void userVideoHyDetailSchedule() { List videos = photoSpeakVideoService.getUpLoadHyIngList(); if (videos != null && videos.size() > 0) { diff --git a/suimangService/src/main/java/com/iformall/mapper/PhotoSpeakVideoMapper.java b/suimangService/src/main/java/com/iformall/mapper/PhotoSpeakVideoMapper.java index f48066e..91f3410 100644 --- a/suimangService/src/main/java/com/iformall/mapper/PhotoSpeakVideoMapper.java +++ b/suimangService/src/main/java/com/iformall/mapper/PhotoSpeakVideoMapper.java @@ -24,4 +24,6 @@ public interface PhotoSpeakVideoMapper extends CommonMapper getSortList(PhotoSpeakVideo record); Integer checkVideoStatus(@Param("userId") Long userId, @Param("list") List list); + + List getNotHaveUrl(PhotoSpeakVideo umVideoQ); } diff --git a/suimangService/src/main/java/com/iformall/service/sm/PhotoSpeakVideoService.java b/suimangService/src/main/java/com/iformall/service/sm/PhotoSpeakVideoService.java index 53913b2..750ed31 100644 --- a/suimangService/src/main/java/com/iformall/service/sm/PhotoSpeakVideoService.java +++ b/suimangService/src/main/java/com/iformall/service/sm/PhotoSpeakVideoService.java @@ -66,4 +66,6 @@ public interface PhotoSpeakVideoService { List getNotHyUploadList(); ResultData checkVideoStatus(Long userId, List time); + + List getNotHaveUrl(); } diff --git a/suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java b/suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java index 1947c0e..20ce5e5 100644 --- a/suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java +++ b/suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java @@ -323,6 +323,8 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { List videoStatuss = new ArrayList<>(); videoStatuss.add(EnumVideoStatus.success.getCode()); videoStatuss.add(EnumVideoStatus.upload_fail.getCode()); + videoStatuss.add(EnumVideoStatus.hy_success.getCode()); + videoStatuss.add(EnumVideoStatus.hy_upload_fail.getCode()); umVideoQ.setVideoStatuss(videoStatuss); return photoSpeakVideoMapper.getSortList(umVideoQ); } @@ -457,6 +459,18 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { return photoSpeakVideoMapper.getSortList(umVideoQ); } + @Override + public List getNotHaveUrl() { + PhotoSpeakVideo umVideoQ = new PhotoSpeakVideo(); + List videoStatuss = new ArrayList<>(); + videoStatuss.add(EnumVideoStatus.hy_upload_ing.getCode()); + videoStatuss.add(EnumVideoStatus.hy_upload_success.getCode()); + videoStatuss.add(EnumVideoStatus.upload_ing.getCode()); + videoStatuss.add(EnumVideoStatus.upload_success.getCode()); + umVideoQ.setVideoStatuss(videoStatuss); + return photoSpeakVideoMapper.getNotHaveUrl(umVideoQ); + } + @Override public ResultData checkVideoStatus(Long userId, List list) { if (CollectionUtils.isEmpty(list)){ diff --git a/suimangService/src/main/resources/mapper/PhotoSpeakVideoMapper.xml b/suimangService/src/main/resources/mapper/PhotoSpeakVideoMapper.xml index 3161d49..bff90d9 100644 --- a/suimangService/src/main/resources/mapper/PhotoSpeakVideoMapper.xml +++ b/suimangService/src/main/resources/mapper/PhotoSpeakVideoMapper.xml @@ -169,4 +169,16 @@ + +