@@ -114,12 +114,13 @@ public class VideoSchedule { | |||||
if (StringUtils.isBlank(video.getVideoTime())) { | if (StringUtils.isBlank(video.getVideoTime())) { | ||||
break; | break; | ||||
} | } | ||||
CreateBilling cb = projectFactory.getProjectService(EnumProject.PROJECT_2.getCode()) | |||||
.handleCreateVideoBilling(video.getUserId(), video.getFinalTenantId(), video.getVideoTime(), video.getVideoSize()); | |||||
if (null != cb) { | |||||
logger.info("createBilling result:"+JSON.toJSONString(cb)); | |||||
video.setCostPoints(cb.getTotalCostPoins()); | |||||
video.setCostPointsDetail(cb.getDetail()); | |||||
if (null == video.getCostPoints() || video.getCostPoints() <= 0) { | |||||
CreateBilling cb = projectFactory.getProjectService(EnumProject.PROJECT_2.getCode()) | |||||
.handleCreateVideoBilling(video.getUserId(), video.getFinalTenantId(), video.getVideoTime(), video.getVideoSize()); | |||||
if (null != cb) { | |||||
video.setCostPoints(cb.getTotalCostPoins()); | |||||
video.setCostPointsDetail(cb.getDetail()); | |||||
} | |||||
} | } | ||||
userMouldVideoService.updateById(video); | userMouldVideoService.updateById(video); | ||||
} | } | ||||
@@ -518,7 +518,7 @@ public class UserMouldVideoServiceImpl implements UserMouldVideoService { | |||||
videoUpd.setVideoMsg("视频上传成功"); | videoUpd.setVideoMsg("视频上传成功"); | ||||
videoUpd.setUpdateDate(new Date()); | videoUpd.setUpdateDate(new Date()); | ||||
logger.debug(" >>>>>>>>>>>>>> finisedAndCost:"+finisedAndCost); | logger.debug(" >>>>>>>>>>>>>> finisedAndCost:"+finisedAndCost); | ||||
if (finisedAndCost) { | |||||
if (finisedAndCost && (null == mouldVideo.getCostPoints() || mouldVideo.getCostPoints() <= 0)) { | |||||
//设置扣费,当前方法是慧影项目专用的 | //设置扣费,当前方法是慧影项目专用的 | ||||
if (StringUtils.isBlank(videoUpd.getVideoTime())) { | if (StringUtils.isBlank(videoUpd.getVideoTime())) { | ||||
logger.debug(" >>>>>>>>>>>>>> videoUpd no time:"+videoUpd.getVideoTime()); | logger.debug(" >>>>>>>>>>>>>> videoUpd no time:"+videoUpd.getVideoTime()); | ||||
@@ -161,19 +161,19 @@ | |||||
<select id="findVideo" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | <select id="findVideo" parameterType="java.util.HashMap" resultMap="BaseResultMap"> | ||||
select | select | ||||
`video_type`,`video_id`, `video_path`, `video_play_url`, `video_time`, `video_size`, `video_status`, `video_msg` | |||||
`video_type`,`video_id`, `video_path`, `video_play_url`, `video_time`, `video_size`, `video_status`, `video_msg`,`cost_points`,`cost_points_detail` | |||||
from user_mould_video | from user_mould_video | ||||
where `id` = #{id} | where `id` = #{id} | ||||
</select> | </select> | ||||
<select id="getSortList" parameterType="com.iformall.domain.po.sm.UserMouldVideo" resultMap="BaseResultMap"> | <select id="getSortList" parameterType="com.iformall.domain.po.sm.UserMouldVideo" resultMap="BaseResultMap"> | ||||
select id,title,video_id,video_path, video_play_url,video_status | |||||
select id,title,video_id,video_path, video_play_url,video_status,`cost_points`,`cost_points_detail` | |||||
from user_mould_video | from user_mould_video | ||||
<include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
</select> | </select> | ||||
<select id="getNotHaveUrl" resultType="com.iformall.domain.po.sm.UserMouldVideo"> | <select id="getNotHaveUrl" resultType="com.iformall.domain.po.sm.UserMouldVideo"> | ||||
select id,title,video_id,video_path, video_play_url,video_status,user_id | |||||
select id,title,video_id,video_path, video_play_url,video_status,user_id,`cost_points`,`cost_points_detail` | |||||
from user_mould_video | from user_mould_video | ||||
where `is_del` = 0 | where `is_del` = 0 | ||||
and `video_id` is not null | and `video_id` is not null | ||||