소스 검색

修改视频创建逻辑、新增图片检查接口、新增百度API接口、修改上传阿里云检查、新增回调接口

private_deployment
lrh 1 년 전
부모
커밋
4c605cdd21
1개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. +12
    -0
      suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java

+ 12
- 0
suimangService/src/main/java/com/iformall/service/sm/impl/PhotoSpeakVideoServiceImpl.java 파일 보기

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

if (progress.equals("complete")) {
mouldVideo.setVideoHyStatus(EnumVideoStatus.upload_success.getCode());
this.updateById(mouldVideo);
break;
}
if (integer.getAndDecrement() <= 0){
mouldVideo.setVideoHyStatus(EnumVideoStatus.fail.getCode());
mouldVideo.setVideoMsg("视频上传失败,点击“编辑”重试");
this.updateById(mouldVideo);
break;
}
}


불러오는 중...
취소
저장