|
|
@@ -517,22 +517,28 @@ public class UserMouldVideoServiceImpl implements UserMouldVideoService { |
|
|
|
videoUpd.setVideoStatus(EnumVideoStatus.upload_success.getCode()); |
|
|
|
videoUpd.setVideoMsg("视频上传成功"); |
|
|
|
videoUpd.setUpdateDate(new Date()); |
|
|
|
logger.debug(" >>>>>>>>>>>>>> finisedAndCost:"+finisedAndCost); |
|
|
|
CreateBilling cb = null; |
|
|
|
if (finisedAndCost && (null == mouldVideo.getCostPoints() || mouldVideo.getCostPoints() <= 0)) { |
|
|
|
//设置扣费,当前方法是慧影项目专用的 |
|
|
|
if (StringUtils.isBlank(videoUpd.getVideoTime())) { |
|
|
|
logger.debug(" >>>>>>>>>>>>>> videoUpd no time:"+videoUpd.getVideoTime()); |
|
|
|
break; |
|
|
|
} |
|
|
|
CreateBilling cb = projectFactory.getProjectService(EnumProject.PROJECT_2.getCode()) |
|
|
|
cb = projectFactory.getProjectService(EnumProject.PROJECT_2.getCode()) |
|
|
|
.handleCreateVideoBilling(userMouldVideo.getUserId(), userMouldVideo.getFinalTenantId(), videoUpd.getVideoTime(), videoUpd.getVideoSize()); |
|
|
|
logger.info(">>>>>>>>>> CreateBilling :"+JSON.toJSONString(cb)); |
|
|
|
if (null != cb) { |
|
|
|
videoUpd.setCostPoints(cb.getTotalCostPoins()); |
|
|
|
videoUpd.setCostPointsDetail(cb.getDetail()); |
|
|
|
} |
|
|
|
} |
|
|
|
this.updateById(videoUpd); |
|
|
|
try { |
|
|
|
this.updateById(videoUpd); |
|
|
|
}catch(Exception e) { |
|
|
|
logger.error("uploadVideo updateById error.",e); |
|
|
|
if (null != cb) { |
|
|
|
projectFactory.getProjectService(EnumProject.PROJECT_2.getCode()). |
|
|
|
rollbackCreateVideoBilling(userMouldVideo.getUserId(), userMouldVideo.getFinalTenantId(), cb); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
@@ -541,7 +547,7 @@ public class UserMouldVideoServiceImpl implements UserMouldVideoService { |
|
|
|
} |
|
|
|
|
|
|
|
}catch(Exception e){ |
|
|
|
|
|
|
|
logger.error("uploadVideo error.",e); |
|
|
|
}finally{ |
|
|
|
redisLock.unlock(lockKey, timeStr); |
|
|
|
} |
|
|
|