| @@ -273,6 +273,9 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { | |||||
| break; | break; | ||||
| } | } | ||||
| if (integer.getAndDecrement() <= 0){ | if (integer.getAndDecrement() <= 0){ | ||||
| mouldVideo.setVideoStatus(EnumVideoStatus.fail.getCode()); | |||||
| mouldVideo.setVideoMsg("视频上传失败,点击“编辑”重试"); | |||||
| this.updateById(mouldVideo); | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||
| @@ -358,12 +361,21 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { | |||||
| AtomicInteger integer = new AtomicInteger(30); | AtomicInteger integer = new AtomicInteger(30); | ||||
| while (true){ | while (true){ | ||||
| String progress = videoFactory.getExcutor(videoType).getVedioUploadProgress(result.getVideoId()); | String progress = videoFactory.getExcutor(videoType).getVedioUploadProgress(result.getVideoId()); | ||||
| try { | |||||
| Thread.sleep(1000); | |||||
| } catch (InterruptedException e) { | |||||
| throw new RuntimeException(e); | |||||
| } | |||||
| if (progress.equals("complete")) { | if (progress.equals("complete")) { | ||||
| mouldVideo.setVideoHyStatus(EnumVideoStatus.upload_success.getCode()); | mouldVideo.setVideoHyStatus(EnumVideoStatus.upload_success.getCode()); | ||||
| this.updateById(mouldVideo); | this.updateById(mouldVideo); | ||||
| break; | break; | ||||
| } | } | ||||
| if (integer.getAndDecrement() <= 0){ | if (integer.getAndDecrement() <= 0){ | ||||
| mouldVideo.setVideoHyStatus(EnumVideoStatus.fail.getCode()); | |||||
| mouldVideo.setVideoMsg("视频上传失败,点击“编辑”重试"); | |||||
| this.updateById(mouldVideo); | |||||
| break; | break; | ||||
| } | } | ||||
| } | } | ||||