Browse Source

fix bug

master
winter 1 year ago
parent
commit
df06d02797
3 changed files with 11 additions and 10 deletions
  1. +7
    -6
      suimangSchedule/src/main/java/com/iformall/schedule/VideoSchedule.java
  2. +1
    -1
      suimangService/src/main/java/com/iformall/service/sm/impl/UserMouldVideoServiceImpl.java
  3. +3
    -3
      suimangService/src/main/resources/mapper/UserMouldVideoMapper.xml

+ 7
- 6
suimangSchedule/src/main/java/com/iformall/schedule/VideoSchedule.java View File

@@ -114,12 +114,13 @@ public class VideoSchedule {
if (StringUtils.isBlank(video.getVideoTime())) {
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);
}


+ 1
- 1
suimangService/src/main/java/com/iformall/service/sm/impl/UserMouldVideoServiceImpl.java View File

@@ -518,7 +518,7 @@ public class UserMouldVideoServiceImpl implements UserMouldVideoService {
videoUpd.setVideoMsg("视频上传成功");
videoUpd.setUpdateDate(new Date());
logger.debug(" >>>>>>>>>>>>>> finisedAndCost:"+finisedAndCost);
if (finisedAndCost) {
if (finisedAndCost && (null == mouldVideo.getCostPoints() || mouldVideo.getCostPoints() <= 0)) {
//设置扣费,当前方法是慧影项目专用的
if (StringUtils.isBlank(videoUpd.getVideoTime())) {
logger.debug(" >>>>>>>>>>>>>> videoUpd no time:"+videoUpd.getVideoTime());


+ 3
- 3
suimangService/src/main/resources/mapper/UserMouldVideoMapper.xml View File

@@ -161,19 +161,19 @@

<select id="findVideo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
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
where `id` = #{id}
</select>

<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
<include refid="dynamicWhereConditions"/>
</select>

<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
where `is_del` = 0
and `video_id` is not null


Loading…
Cancel
Save