@@ -0,0 +1,3 @@ | |||||
ALTER TABLE `mallink_suimang_test`.`photo_speak_video` | |||||
ADD COLUMN `subtitle_enabled` smallint(1) COMMENT '字幕开关' AFTER `person_photo_url`, | |||||
ADD COLUMN `subtitle_params` json COMMENT '字幕参数' AFTER `subtitle_enabled`; |
@@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSON; | |||||
import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
import lombok.extern.slf4j.Slf4j; | |||||
import org.springframework.stereotype.Component; | |||||
import org.springframework.web.multipart.MultipartFile; | import org.springframework.web.multipart.MultipartFile; | ||||
import java.io.*; | import java.io.*; | ||||
@@ -18,6 +20,8 @@ import java.util.HashMap; | |||||
/** | /** | ||||
* 图片质量检查方法 | * 图片质量检查方法 | ||||
*/ | */ | ||||
@Slf4j | |||||
@Component | |||||
public class BaiduImageCheckUtil { | public class BaiduImageCheckUtil { | ||||
// 百度图片审核接口地址 | // 百度图片审核接口地址 | ||||
private final static String photo_check_url = "https://aip.baidubce.com/rest/2.0/solution/v1/img_censor/v2/user_defined"; | private final static String photo_check_url = "https://aip.baidubce.com/rest/2.0/solution/v1/img_censor/v2/user_defined"; | ||||
@@ -43,7 +47,7 @@ public class BaiduImageCheckUtil { | |||||
//这里暂时写死 | //这里暂时写死 | ||||
String result = BaiDuHttpUtil.post(photo_check_url, accessToken, param); | String result = BaiDuHttpUtil.post(photo_check_url, accessToken, param); | ||||
System.out.println(result); | |||||
log.info("图片检测"+result); | |||||
JSONObject jsonObject = JSON.parseObject(result); | JSONObject jsonObject = JSON.parseObject(result); | ||||
//1:合规,2:不合规,3:疑似,4:审核失败 | //1:合规,2:不合规,3:疑似,4:审核失败 | ||||
Integer type = jsonObject.getInteger("conclusionType"); | Integer type = jsonObject.getInteger("conclusionType"); | ||||
@@ -104,6 +108,7 @@ public class BaiduImageCheckUtil { | |||||
map.put("client_secret", secretKey); | map.put("client_secret", secretKey); | ||||
map.put("grant_type", "client_credentials"); | map.put("grant_type", "client_credentials"); | ||||
String doPost = HttpUtil.doPost(auth_url, map); | String doPost = HttpUtil.doPost(auth_url, map); | ||||
log.info("获取token"+doPost); | |||||
JSONObject json = JSONObject.parseObject(doPost); | JSONObject json = JSONObject.parseObject(doPost); | ||||
String access_token = (String) json.get("access_token"); | String access_token = (String) json.get("access_token"); | ||||
Integer expires_in = (Integer) json.get("expires_in"); | Integer expires_in = (Integer) json.get("expires_in"); | ||||
@@ -51,6 +51,12 @@ public class PhotoSpeakVideo extends TenantEntity { | |||||
@TableField(exist = false) | @TableField(exist = false) | ||||
private PersonPhoto personPhoto; | private PersonPhoto personPhoto; | ||||
@io.swagger.annotations.ApiModelProperty(value="字幕开关",name="subtitleEnabled") | |||||
private Integer subtitleEnabled; | |||||
@io.swagger.annotations.ApiModelProperty(value="字幕参数",name="subtitleParams") | |||||
private String subtitleParams; | |||||
@io.swagger.annotations.ApiModelProperty(value="EnumVoiceFrom 声音来源",name="voiceFrom") | @io.swagger.annotations.ApiModelProperty(value="EnumVoiceFrom 声音来源",name="voiceFrom") | ||||
private Integer voiceFrom; | private Integer voiceFrom; | ||||
@@ -6,6 +6,7 @@ import com.iformall.domain.po.sm.UserPackageDetail; | |||||
import java.util.List; | import java.util.List; | ||||
public interface UserPackageDetailService { | public interface UserPackageDetailService { | ||||
List<UserPackageDetail> getDetailInfo(); | List<UserPackageDetail> getDetailInfo(); | ||||
} | } |
@@ -8,6 +8,9 @@ | |||||
<result column="user_id" jdbcType="BIGINT" property="userId"/> | <result column="user_id" jdbcType="BIGINT" property="userId"/> | ||||
<result column="person_photo_id" jdbcType="BIGINT" property="personPhotoId"/> | <result column="person_photo_id" jdbcType="BIGINT" property="personPhotoId"/> | ||||
<result column="person_photo_url" jdbcType="VARCHAR" property="personPhotoUrl"/> | <result column="person_photo_url" jdbcType="VARCHAR" property="personPhotoUrl"/> | ||||
<result column="subtitle_enabled" jdbcType="INTEGER" property="subtitleEnabled"/> | |||||
<result column="subtitle_params" jdbcType="VARCHAR" property="subtitleParams"/> | |||||
<result column="voice_from" jdbcType="INTEGER" property="voiceFrom"/> | <result column="voice_from" jdbcType="INTEGER" property="voiceFrom"/> | ||||
<result column="voice_mould_id" jdbcType="BIGINT" property="voiceMouldId"/> | <result column="voice_mould_id" jdbcType="BIGINT" property="voiceMouldId"/> | ||||
<result column="voice_mould_sm" jdbcType="VARCHAR" property="voiceMouldSm"/> | <result column="voice_mould_sm" jdbcType="VARCHAR" property="voiceMouldSm"/> | ||||
@@ -39,7 +42,7 @@ | |||||
<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`, `subtitle_enabled`, `subtitle_params`, `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` | `is_hy`,`video_hy_status`,`music_id`,`save_dir` | ||||
</sql> | </sql> | ||||