| @@ -2,4 +2,7 @@ ALTER TABLE `mallink_suimang_test`.`photo_speak_video` | |||||
| ADD COLUMN `video_hy_status` smallint NULL COMMENT '视频超分状态' AFTER `video_status`; | ADD COLUMN `video_hy_status` smallint NULL COMMENT '视频超分状态' AFTER `video_status`; | ||||
| ALTER TABLE `mallink_suimang_test`.`voice_info` | ALTER TABLE `mallink_suimang_test`.`voice_info` | ||||
| ADD COLUMN `age_type` smallint NULL COMMENT '年纪类型 EnumAgeType' AFTER `sex`; | |||||
| ADD COLUMN `age_type` smallint NULL COMMENT '年纪类型 EnumAgeType' AFTER `sex`; | |||||
| ALTER TABLE `mallink_suimang_test`.`photo_speak_video` | |||||
| ADD COLUMN `is_hy` smallint NULL DEFAULT 0 COMMENT '是否超分(1、是,2、否)' AFTER `video_hy_status`, | |||||
| @@ -144,15 +144,17 @@ public class PhotoSpeakSchedule { | |||||
| @Scheduled(cron = "0 20/30 * * * *?") // 每半小时检查一次 | @Scheduled(cron = "0 20/30 * * * *?") // 每半小时检查一次 | ||||
| public void photoSpeakCreateHySchedule() { | public void photoSpeakCreateHySchedule() { | ||||
| PhotoSpeakVideo videoUpd = new PhotoSpeakVideo(); | PhotoSpeakVideo videoUpd = new PhotoSpeakVideo(); | ||||
| videoUpd.setVideoStartDate(DateUtils.getHourDateBefore(2,new Date())); | |||||
| videoUpd.setVideoStartDate(DateUtils.getHourDateBefore(2, new Date())); | |||||
| videoUpd.setVideoHyStatus(EnumVideoStatus.fail.getCode()); | videoUpd.setVideoHyStatus(EnumVideoStatus.fail.getCode()); | ||||
| List<PhotoSpeakVideo> list = photoSpeakVideoService.findList(videoUpd); | List<PhotoSpeakVideo> list = photoSpeakVideoService.findList(videoUpd); | ||||
| if (list != null && list.size() > 0) { | if (list != null && list.size() > 0) { | ||||
| for (PhotoSpeakVideo video : list) { | for (PhotoSpeakVideo video : list) { | ||||
| try { | try { | ||||
| photoSpeakVideoService.videoHy(video,false); | |||||
| if (StringUtils.isNotEmpty(video.getSaveDir())) { | |||||
| photoSpeakVideoService.videoHy(video, false); | |||||
| } | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("TtCouponVideoSchedule error.couponVideoSchedule:"+video.getId(),e); | |||||
| logger.error("TtCouponVideoSchedule error.couponVideoSchedule:" + video.getId(), e); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| @@ -156,5 +156,7 @@ public class PhotoSpeakVideo extends TenantEntity { | |||||
| private String saveDir; | private String saveDir; | ||||
| private Integer videoHyStatus; | private Integer videoHyStatus; | ||||
| private Integer isHy;//是否超分(1、是,0、否) | |||||
| } | } | ||||
| @@ -499,6 +499,7 @@ public class PhotoSpeakVideoServiceImpl implements PhotoSpeakVideoService { | |||||
| if(result.isSuccess()){ | if(result.isSuccess()){ | ||||
| speakVideo.setVideoHyStatus(EnumVideoStatus.success.getCode()); | speakVideo.setVideoHyStatus(EnumVideoStatus.success.getCode()); | ||||
| speakVideo.setVideoMsg("超分视频生成成功"); | speakVideo.setVideoMsg("超分视频生成成功"); | ||||
| speakVideo.setIsHy(EnumYesOrNo.YES.getCode()); | |||||
| this.updateById(speakVideo); | this.updateById(speakVideo); | ||||
| this.uploadHyVideo(speakVideo); | this.uploadHyVideo(speakVideo); | ||||
| @@ -31,7 +31,7 @@ public class VoiceInfoServiceImpl implements VoiceInfoService { | |||||
| @Override | @Override | ||||
| public List<VoiceInfo> chooseType(Long id) { | public List<VoiceInfo> chooseType(Long id) { | ||||
| List<VoiceInfo> voiceInfos = voiceMapper.selectList(new LambdaQueryWrapper<VoiceInfo>().eq(VoiceInfo::getLanguageId, id).orderByAsc(VoiceInfo::getDisplayName).select(VoiceInfo::getId, VoiceInfo::getDisplayName, VoiceInfo::getStyleList,VoiceInfo::getSex)); | |||||
| List<VoiceInfo> voiceInfos = voiceMapper.selectList(new LambdaQueryWrapper<VoiceInfo>().eq(VoiceInfo::getLanguageId, id).orderByAsc(VoiceInfo::getDisplayName).select(VoiceInfo::getId, VoiceInfo::getDisplayName, VoiceInfo::getStyleList,VoiceInfo::getSex,VoiceInfo::getAgeType)); | |||||
| voiceInfos.forEach(x -> { | voiceInfos.forEach(x -> { | ||||
| if (StringUtils.isNotEmpty(x.getStyleList())) { | if (StringUtils.isNotEmpty(x.getStyleList())) { | ||||
| List<String> strings = JSON.parseArray(x.getStyleList(), String.class); | List<String> strings = JSON.parseArray(x.getStyleList(), String.class); | ||||
| @@ -27,6 +27,11 @@ | |||||
| <result column="video_status" jdbcType="INTEGER" property="videoStatus"/> | <result column="video_status" jdbcType="INTEGER" property="videoStatus"/> | ||||
| <result column="video_msg" jdbcType="VARCHAR" property="videoMsg"/> | <result column="video_msg" jdbcType="VARCHAR" property="videoMsg"/> | ||||
| <result column="is_hy" jdbcType="INTEGER" property="isHy"/> | |||||
| <result column="video_hy_status" jdbcType="INTEGER" property="videoHyStatus"/> | |||||
| <result column="music_id" jdbcType="VARCHAR" property="musicId"/> | |||||
| <result column="save_dir" jdbcType="VARCHAR" property="saveDir"/> | |||||
| <result column="create_video_date" jdbcType="TIMESTAMP" property="createVideoDate"/> | <result column="create_video_date" jdbcType="TIMESTAMP" property="createVideoDate"/> | ||||
| <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> | <result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> | ||||
| <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> | <result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> | ||||
| @@ -35,7 +40,8 @@ | |||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`, `tenant_id`, `parent_tenant_id`, `user_id`, | `id`, `tenant_id`, `parent_tenant_id`, `user_id`, | ||||
| `person_photo_id`, `person_photo_url`, `voice_from`, `voice_mould_id`, `voice_mould_sm`, `paperwork`, `voice_material_id`, `voice_material_url`, | `person_photo_id`, `person_photo_url`, `voice_from`, `voice_mould_id`, `voice_mould_sm`, `paperwork`, `voice_material_id`, `voice_material_url`, | ||||
| `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` | |||||
| `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`, | |||||
| `is_hy`,`video_hy_status`,`music_id`,`save_dir` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -119,7 +125,7 @@ | |||||
| `id`, | `id`, | ||||
| `paperwork`, | `paperwork`, | ||||
| `title`, `cover_img`, `remark`, `video_id`, `video_path`, `video_play_url`, `video_time`, `video_size`, `video_status`,`video_msg`, | `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` | |||||
| `create_video_date`, `create_date`, `update_date`,`is_hy` | |||||
| from photo_speak_video | from photo_speak_video | ||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||