| 
				
				
					
				
				
				 | 
			
			 | 
			@@ -480,37 +480,39 @@ public class UserMouldVideoServiceImpl implements UserMouldVideoService { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    this.saveOrUpdate(videoUpd); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			
  | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    //实时判断上传状态 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    for (int i = 0;i <= 30; i++){ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                        try { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                            Thread.sleep(1000); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                        } catch (InterruptedException e) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                            e.printStackTrace(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                        } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			//                    for (int i = 0;i <= 30; i++){ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			//                        try { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			//                            Thread.sleep(1000); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			//                        } catch (InterruptedException e) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			//                            e.printStackTrace(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			//                        } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                        String progress = videoFactory.getExcutor(videoType).getVedioUploadProgress(result.getVideoId()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                        if (progress.equals("complete")) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                            VideUploadResult videoDetail = videoFactory.getExcutor(videoType).getVideoDetailWithCache(result.getVideoId(),true); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                            if (videoDetail.isSuccess()){ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                videoUpd = new UserMouldVideo(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                videoUpd.setId(userMouldVideo.getId()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                videoUpd.setCoverImg(videoDetail.getCoverURL()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                videoUpd.setVideoPlayUrl(videoDetail.getVideoUrl()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                videoUpd.setVideoTime(videoDetail.getDuration()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                videoUpd.setVideoSize(videoDetail.getSize()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                videoUpd.setVideoStatus(EnumVideoStatus.upload_success.getCode()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                videoUpd.setVideoMsg("视频上传成功"); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                videoUpd.setUpdateDate(new Date()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                //设置扣费,当前方法是慧影项目专用的 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                CreateBilling cb = projectFactory.getProjectService(EnumProject.PROJECT_2.getCode()) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                		.handleCreateVideoBilling(userMouldVideo.getUserId(), userMouldVideo.getFinalTenantId(), videoUpd.getVideoTime(), videoUpd.getVideoSize()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                if (null != cb) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                	logger.info("createBilling result:"+JSON.toJSONString(cb)); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                	videoUpd.setCostPoints(cb.getTotalCostPoins()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                	videoUpd.setCostPointsDetail(cb.getDetail()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                this.updateById(videoUpd); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                                break; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                            } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                        while(true) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                        if (progress.equals("complete")) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                            VideUploadResult videoDetail = videoFactory.getExcutor(videoType).getVideoDetailWithCache(result.getVideoId(),true); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                            if (videoDetail.isSuccess()){ | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                videoUpd = new UserMouldVideo(); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                videoUpd.setId(userMouldVideo.getId()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                videoUpd.setCoverImg(videoDetail.getCoverURL()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                videoUpd.setVideoPlayUrl(videoDetail.getVideoUrl()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                videoUpd.setVideoTime(videoDetail.getDuration()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                videoUpd.setVideoSize(videoDetail.getSize()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                videoUpd.setVideoStatus(EnumVideoStatus.upload_success.getCode()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                videoUpd.setVideoMsg("视频上传成功"); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                videoUpd.setUpdateDate(new Date()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                //设置扣费,当前方法是慧影项目专用的 | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                CreateBilling cb = projectFactory.getProjectService(EnumProject.PROJECT_2.getCode()) | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                		.handleCreateVideoBilling(userMouldVideo.getUserId(), userMouldVideo.getFinalTenantId(), videoUpd.getVideoTime(), videoUpd.getVideoSize()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                if (null != cb) { | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                	logger.info("createBilling result:"+JSON.toJSONString(cb)); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                	videoUpd.setCostPoints(cb.getTotalCostPoins()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                	videoUpd.setCostPointsDetail(cb.getDetail()); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                this.updateById(videoUpd); | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                                break; | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
				                            } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                        } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			//                        } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                    } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			                } | 
		
		
	
		
			
			 | 
			 | 
			
			 | 
			            } | 
		
		
	
	
		
			
				| 
				
					
				
				
				
				 | 
			
			 | 
			
  |