Browse Source

//bug

private_deployment
xhxu 2 years ago
parent
commit
432607b658
4 changed files with 14 additions and 5 deletions
  1. +3
    -1
      suimangAdmin/src/main/java/com/iformall/schedule/VideoSchedule.java
  2. +2
    -0
      suimangService/src/main/java/com/iformall/domain/po/sm/UserMouldVideo.java
  3. +4
    -0
      suimangService/src/main/java/com/iformall/service/sm/impl/UserMouldVideoServiceImpl.java
  4. +5
    -4
      suimangService/src/main/resources/mapper/UserMouldVideoMapper.xml

+ 3
- 1
suimangAdmin/src/main/java/com/iformall/schedule/VideoSchedule.java View File

@@ -84,7 +84,7 @@ public class VideoSchedule {
/** /**
* 获取时长和大小 * 获取时长和大小
*/ */
@Scheduled(cron = "0 15/30 * * * *?") // 每半小时检查一次
@Scheduled(cron = "0 1/5 * * * *?") // 每五分钟检查一次
public void userVideoDetailSchedule() { public void userVideoDetailSchedule() {
List<UserMouldVideo> videos = userMouldVideoService.getUpLoadIngList(); List<UserMouldVideo> videos = userMouldVideoService.getUpLoadIngList();
if (videos != null && videos.size() > 0) { if (videos != null && videos.size() > 0) {
@@ -94,6 +94,8 @@ public class VideoSchedule {
if (videoDetail.isSuccess() if (videoDetail.isSuccess()
&& StringUtils.isNotBlank(videoDetail.getDuration()) && StringUtils.isNotBlank(videoDetail.getDuration())
&& !"0.0".equals(videoDetail.getDuration())) { && !"0.0".equals(videoDetail.getDuration())) {
video.setCoverImg(videoDetail.getCoverURL());
video.setVideoPlayUrl(videoDetail.getVideoUrl());
video.setVideoTime(videoDetail.getDuration()); video.setVideoTime(videoDetail.getDuration());
video.setVideoSize(videoDetail.getSize()); video.setVideoSize(videoDetail.getSize());
video.setVideoStatus(EnumVideoStatus.upload_success.getCode()); video.setVideoStatus(EnumVideoStatus.upload_success.getCode());


+ 2
- 0
suimangService/src/main/java/com/iformall/domain/po/sm/UserMouldVideo.java View File

@@ -159,6 +159,8 @@ public class UserMouldVideo extends TenantEntity {
} }
@io.swagger.annotations.ApiModelProperty(value="",name="videoPath") @io.swagger.annotations.ApiModelProperty(value="",name="videoPath")
private String videoPath; private String videoPath;
@io.swagger.annotations.ApiModelProperty(value="播放地址",name="videoPlayUrl")
private String videoPlayUrl;
@io.swagger.annotations.ApiModelProperty(value="视频时长(秒)",name="videoTime") @io.swagger.annotations.ApiModelProperty(value="视频时长(秒)",name="videoTime")
private String videoTime; private String videoTime;
@io.swagger.annotations.ApiModelProperty(value="视频大小(byte)",name="videoSize") @io.swagger.annotations.ApiModelProperty(value="视频大小(byte)",name="videoSize")


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

@@ -362,6 +362,10 @@ public class UserMouldVideoServiceImpl implements UserMouldVideoService {
videoUpd.setVideoMsg("success"); videoUpd.setVideoMsg("success");
videoUpd.setCreateVideoDate(new Date()); videoUpd.setCreateVideoDate(new Date());
this.saveOrUpdate(videoUpd); this.saveOrUpdate(videoUpd);

videoUpd.setTitle(mouldVideo.getTitle());
this.uploadVideo(videoUpd);

return new AsyncResult<>(1); return new AsyncResult<>(1);
} }
videoUpd.setVideoStatus(EnumVideoStatus.fail.getCode()); videoUpd.setVideoStatus(EnumVideoStatus.fail.getCode());


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

@@ -23,6 +23,7 @@
<result column="remark" jdbcType="VARCHAR" property="remark"/> <result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="video_id" jdbcType="VARCHAR" property="videoId"/> <result column="video_id" jdbcType="VARCHAR" property="videoId"/>
<result column="video_path" jdbcType="VARCHAR" property="videoPath"/> <result column="video_path" jdbcType="VARCHAR" property="videoPath"/>
<result column="video_play_url" jdbcType="VARCHAR" property="videoPlayUrl"/>
<result column="video_time" jdbcType="VARCHAR" property="videoTime"/> <result column="video_time" jdbcType="VARCHAR" property="videoTime"/>
<result column="video_size" jdbcType="BIGINT" property="videoSize"/> <result column="video_size" jdbcType="BIGINT" property="videoSize"/>
<result column="video_status" jdbcType="INTEGER" property="videoStatus"/> <result column="video_status" jdbcType="INTEGER" property="videoStatus"/>
@@ -36,7 +37,7 @@
<sql id="allColumns"> <sql id="allColumns">
`id`, `tenant_id`, `parent_tenant_id`, `user_id`, `video_type`, `id`, `tenant_id`, `parent_tenant_id`, `user_id`, `video_type`,
`person_mould_id`, `person_mould_sm`, `voice_mould_id`, `voice_mould_sm`, `languages`, `paperwork`, `background_id`, `background_sm`,`material_ids`,`material_all_json`, `person_mould_id`, `person_mould_sm`, `voice_mould_id`, `voice_mould_sm`, `languages`, `paperwork`, `background_id`, `background_sm`,`material_ids`,`material_all_json`,
`title`, `cover_img`, `remark`, `video_id`, `video_path`, `video_time`, `video_size`, `video_status`, `video_msg`, `create_video_date`, `create_date`, `update_date`
`title`, `cover_img`, `remark`, `video_id`, `video_path`, `video_play_url`, `video_time`, `video_size`, `video_status`, `video_msg`, `create_video_date`, `create_date`, `update_date`
</sql> </sql>


<sql id="dynamicWhereConditions"> <sql id="dynamicWhereConditions">
@@ -127,7 +128,7 @@
select select
`id`, `video_type`, `id`, `video_type`,
`paperwork`, `paperwork`,
`title`, `cover_img`, `remark`, `video_id`, `video_path`, `video_time`, `video_size`, `video_status`,
`title`, `cover_img`, `remark`, `video_id`, `video_path`, `video_play_url`, `video_time`, `video_size`, `video_status`,
`create_video_date`, `create_date`, `update_date` `create_video_date`, `create_date`, `update_date`
from user_mould_video from user_mould_video
<include refid="dynamicWhereConditions"/> <include refid="dynamicWhereConditions"/>
@@ -136,13 +137,13 @@


<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_time`, `video_size`, `video_status`, `video_msg`
`video_type`,`video_id`, `video_path`, `video_play_url`, `video_time`, `video_size`, `video_status`, `video_msg`
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_status
select id,title,video_id,video_path, video_play_url,video_status
from user_mould_video from user_mould_video
<include refid="dynamicWhereConditions"/> <include refid="dynamicWhereConditions"/>
</select> </select>


Loading…
Cancel
Save