|
@@ -439,7 +439,7 @@ public class UserMouldVideoServiceImpl implements UserMouldVideoService { |
|
|
this.saveOrUpdate(videoUpd); |
|
|
this.saveOrUpdate(videoUpd); |
|
|
|
|
|
|
|
|
videoUpd.setTitle(mouldVideo.getTitle()); |
|
|
videoUpd.setTitle(mouldVideo.getTitle()); |
|
|
this.uploadVideo(videoUpd); |
|
|
|
|
|
|
|
|
this.uploadVideo(videoUpd,false); |
|
|
|
|
|
|
|
|
return new AsyncResult<>(1); |
|
|
return new AsyncResult<>(1); |
|
|
} |
|
|
} |
|
@@ -460,7 +460,7 @@ public class UserMouldVideoServiceImpl implements UserMouldVideoService { |
|
|
|
|
|
|
|
|
@Async |
|
|
@Async |
|
|
@Override |
|
|
@Override |
|
|
public void uploadVideo(UserMouldVideo mouldVideo){ |
|
|
|
|
|
|
|
|
public void uploadVideo(UserMouldVideo mouldVideo,boolean finisedAndCost){ |
|
|
String lockKey = "oralBroadcasting:handleVideo:"+mouldVideo.getId(); |
|
|
String lockKey = "oralBroadcasting:handleVideo:"+mouldVideo.getId(); |
|
|
long time = System.currentTimeMillis() + 30000; |
|
|
long time = System.currentTimeMillis() + 30000; |
|
|
String timeStr = String.valueOf(time); |
|
|
String timeStr = String.valueOf(time); |
|
@@ -510,15 +510,17 @@ public class UserMouldVideoServiceImpl implements UserMouldVideoService { |
|
|
videoUpd.setVideoStatus(EnumVideoStatus.upload_success.getCode()); |
|
|
videoUpd.setVideoStatus(EnumVideoStatus.upload_success.getCode()); |
|
|
videoUpd.setVideoMsg("视频上传成功"); |
|
|
videoUpd.setVideoMsg("视频上传成功"); |
|
|
videoUpd.setUpdateDate(new Date()); |
|
|
videoUpd.setUpdateDate(new Date()); |
|
|
//设置扣费,当前方法是慧影项目专用的 |
|
|
|
|
|
if (StringUtils.isBlank(videoUpd.getVideoTime())) { |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
CreateBilling cb = projectFactory.getProjectService(EnumProject.PROJECT_2.getCode()) |
|
|
|
|
|
.handleCreateVideoBilling(userMouldVideo.getUserId(), userMouldVideo.getFinalTenantId(), videoUpd.getVideoTime(), videoUpd.getVideoSize()); |
|
|
|
|
|
if (null != cb) { |
|
|
|
|
|
videoUpd.setCostPoints(cb.getTotalCostPoins()); |
|
|
|
|
|
videoUpd.setCostPointsDetail(cb.getDetail()); |
|
|
|
|
|
|
|
|
if (finisedAndCost) { |
|
|
|
|
|
//设置扣费,当前方法是慧影项目专用的 |
|
|
|
|
|
if (StringUtils.isBlank(videoUpd.getVideoTime())) { |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
CreateBilling cb = projectFactory.getProjectService(EnumProject.PROJECT_2.getCode()) |
|
|
|
|
|
.handleCreateVideoBilling(userMouldVideo.getUserId(), userMouldVideo.getFinalTenantId(), videoUpd.getVideoTime(), videoUpd.getVideoSize()); |
|
|
|
|
|
if (null != cb) { |
|
|
|
|
|
videoUpd.setCostPoints(cb.getTotalCostPoins()); |
|
|
|
|
|
videoUpd.setCostPointsDetail(cb.getDetail()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
this.updateById(videoUpd); |
|
|
this.updateById(videoUpd); |
|
|
break; |
|
|
break; |
|
|