@@ -23,6 +23,9 @@ public class Product extends TenantEntity { | |||||
@io.swagger.annotations.ApiModelProperty(value="EnumProductType",name="type") | @io.swagger.annotations.ApiModelProperty(value="EnumProductType",name="type") | ||||
private Integer type; | private Integer type; | ||||
@io.swagger.annotations.ApiModelProperty(value="",name="extraId") | |||||
private Long extraId; | |||||
@io.swagger.annotations.ApiModelProperty(value="",name="coverImg") | @io.swagger.annotations.ApiModelProperty(value="",name="coverImg") | ||||
private String coverImg; | private String coverImg; | ||||
@io.swagger.annotations.ApiModelProperty(value="标题",name="title") | @io.swagger.annotations.ApiModelProperty(value="标题",name="title") | ||||
@@ -49,6 +49,8 @@ public class WxCVideoTable extends TenantEntityWithoutFinalTenantId { | |||||
private String modelMd5; | private String modelMd5; | ||||
@io.swagger.annotations.ApiModelProperty(value = "数字人模板预处理信息md文件校验码", name = "preinfo_md5") | @io.swagger.annotations.ApiModelProperty(value = "数字人模板预处理信息md文件校验码", name = "preinfo_md5") | ||||
private String preInfoMd5; | private String preInfoMd5; | ||||
@io.swagger.annotations.ApiModelProperty(value = "", name = "mask") | |||||
private String mask; | |||||
} | } |
@@ -7,6 +7,8 @@ package com.iformall.enums; | |||||
public enum EnumProject { | public enum EnumProject { | ||||
PROJECT_0(0,"通用"),//直播 | |||||
PROJECT_1(1,"邃芒慧播"),//直播 | PROJECT_1(1,"邃芒慧播"),//直播 | ||||
PROJECT_2(2,"邃芒慧影"),//数字人视频 | PROJECT_2(2,"邃芒慧影"),//数字人视频 | ||||
PROJECT_3(3,"邃芒慧语"),//照片说话 | PROJECT_3(3,"邃芒慧语"),//照片说话 | ||||
@@ -11,6 +11,6 @@ public interface WxCVideoMapper extends CommonMapper<WxCVideoTable, String> { | |||||
List<WxCVideoTable> getById(Long id); | List<WxCVideoTable> getById(Long id); | ||||
WxCVideoTable selectOne(Long id, long resource_id); | WxCVideoTable selectOne(Long id, long resource_id); | ||||
} | } |
@@ -53,23 +53,28 @@ public class WxCVideoServiceImpl implements WxCVideoService, IExcelExportServer | |||||
avatar.put("avatar_image", wxCVideoTable.getImage()); | avatar.put("avatar_image", wxCVideoTable.getImage()); | ||||
avatar.put("avatar_demo", wxCVideoTable.getDemo()); | avatar.put("avatar_demo", wxCVideoTable.getDemo()); | ||||
avatar.put("avatar_model", wxCVideoTable.getModel()); | avatar.put("avatar_model", wxCVideoTable.getModel()); | ||||
avatar.put("avatar_model_md5", wxCVideoTable.getModelMd5()); | |||||
avatar.put("avatar_preinfo_md5", wxCVideoTable.getPreInfoMd5()); | |||||
//模板文件和预处理信息存放问题 | //模板文件和预处理信息存放问题 | ||||
try { | |||||
File modelFile = new File(wxCVideoTable.getModelPath()); | |||||
avatar.put("avatar_model_md5", getFileMD5(modelFile)); | |||||
} catch (Exception e) { | |||||
e.printStackTrace(); | |||||
avatar.put("avatar_model_md5", wxCVideoTable.getModelMd5()); | |||||
} | |||||
// try { | |||||
// File modelFile = new File(wxCVideoTable.getModelPath()); | |||||
// avatar.put("avatar_model_md5", getFileMD5(modelFile)); | |||||
// } catch (Exception e) { | |||||
// e.printStackTrace(); | |||||
// avatar.put("avatar_model_md5", wxCVideoTable.getModelMd5()); | |||||
// } | |||||
// | |||||
// try { | |||||
// File preinfoFile = new File(wxCVideoTable.getPreInfoPath()); | |||||
// avatar.put("avatar_preinfo_md5", getFileMD5(preinfoFile)); | |||||
// } catch (Exception e) { | |||||
// e.printStackTrace(); | |||||
// avatar.put("avatar_preinfo_md5", wxCVideoTable.getPreInfoMd5()); | |||||
// } | |||||
try { | |||||
File preinfoFile = new File(wxCVideoTable.getPreInfoPath()); | |||||
avatar.put("avatar_preinfo_md5", getFileMD5(preinfoFile)); | |||||
} catch (Exception e) { | |||||
e.printStackTrace(); | |||||
avatar.put("avatar_preinfo_md5", wxCVideoTable.getPreInfoMd5()); | |||||
} | |||||
avatar.put("avatar_preinfo", wxCVideoTable.getPreInfo()); | avatar.put("avatar_preinfo", wxCVideoTable.getPreInfo()); | ||||
avatar.put("mask", wxCVideoTable.getMask()); | |||||
avatar.put("expire_time", wxCVideoTable.getExpireTime().getTime() / 1000); | avatar.put("expire_time", wxCVideoTable.getExpireTime().getTime() / 1000); | ||||
avatar.put("class", wxCVideoTable.getClassType()); | avatar.put("class", wxCVideoTable.getClassType()); | ||||
authorlist.add(avatar); | authorlist.add(avatar); | ||||
@@ -7,6 +7,7 @@ | |||||
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/> | <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/> | ||||
<result column="project_type" jdbcType="INTEGER" property="projectType" /> | <result column="project_type" jdbcType="INTEGER" property="projectType" /> | ||||
<result column="type" jdbcType="INTEGER" property="type" /> | <result column="type" jdbcType="INTEGER" property="type" /> | ||||
<result column="extra_id" jdbcType="BIGINT" property="extraId" /> | |||||
<result column="cover_img" jdbcType="VARCHAR" property="coverImg"/> | <result column="cover_img" jdbcType="VARCHAR" property="coverImg"/> | ||||
<result column="title" jdbcType="VARCHAR" property="title"/> | <result column="title" jdbcType="VARCHAR" property="title"/> | ||||
<result column="en_title" jdbcType="VARCHAR" property="enTitle"/> | <result column="en_title" jdbcType="VARCHAR" property="enTitle"/> | ||||
@@ -21,7 +22,7 @@ | |||||
</resultMap> | </resultMap> | ||||
<sql id="allColumns"> | <sql id="allColumns"> | ||||
`id`,`tenant_id`,`parent_tenant_id`,`project_type`,`type`, | |||||
`id`,`tenant_id`,`parent_tenant_id`,`project_type`,`type`,`extra_id`, | |||||
`cover_img`,`title`,`en_title`,`glod`,`detail`, | `cover_img`,`title`,`en_title`,`glod`,`detail`, | ||||
`price_dollar`,`sell_price_dollar`,`price_rmb`,`sell_price_rmb`, | `price_dollar`,`sell_price_dollar`,`price_rmb`,`sell_price_rmb`, | ||||
`create_date`,`update_date` | `create_date`,`update_date` | ||||
@@ -14,6 +14,7 @@ | |||||
<result column="class" jdbcType="VARCHAR" property="classType"/> | <result column="class" jdbcType="VARCHAR" property="classType"/> | ||||
<result column="preinfo" jdbcType="VARCHAR" property="preInfo"/> | <result column="preinfo" jdbcType="VARCHAR" property="preInfo"/> | ||||
<result column="preinfo_md5" jdbcType="VARCHAR" property="preInfoMd5"/> | <result column="preinfo_md5" jdbcType="VARCHAR" property="preInfoMd5"/> | ||||
<result column="mask" jdbcType="VARCHAR" property="mask"/> | |||||
<result column="preinfo_path" jdbcType="VARCHAR" property="preInfoPath"/> | <result column="preinfo_path" jdbcType="VARCHAR" property="preInfoPath"/> | ||||
<result column="expire_time" jdbcType="VARCHAR" property="expireTime"/> | <result column="expire_time" jdbcType="VARCHAR" property="expireTime"/> | ||||
@@ -27,7 +28,7 @@ | |||||
</resultMap>--> | </resultMap>--> | ||||
<select id="getById" resultMap="BaseResultMap"> | <select id="getById" resultMap="BaseResultMap"> | ||||
SELECT wca.user_name,expire_time,wcav.id,wcav.name,wcav.image,wcav.model,wcav.preinfo,wcav.demo | SELECT wca.user_name,expire_time,wcav.id,wcav.name,wcav.image,wcav.model,wcav.preinfo,wcav.demo | ||||
,wcav.class,wcav.model_path,wcav.preinfo_path,wcav.model_md5,wcav.preinfo_md5 | |||||
,wcav.class,wcav.model_path,wcav.preinfo_path,wcav.model_md5,wcav.preinfo_md5,wcav.mask | |||||
from wx_c_author wca | from wx_c_author wca | ||||
left join wx_c_avatar wcav on wcav.id =wca.resource_id | left join wx_c_avatar wcav on wcav.id =wca.resource_id | ||||
where wca.resource_id | where wca.resource_id | ||||
@@ -36,7 +37,7 @@ in (select wca.resource_id from wx_c_author wca WHERE wca.user_id =#{id} AND w | |||||
<select id="selectOne" resultType="com.iformall.domain.po.WxCVideoTable"> | <select id="selectOne" resultType="com.iformall.domain.po.WxCVideoTable"> | ||||
SELECT wca.user_name,expire_time,wcav.id,wcav.name,wcav.image,wcav.model,wcav.preinfo,wcav.demo | SELECT wca.user_name,expire_time,wcav.id,wcav.name,wcav.image,wcav.model,wcav.preinfo,wcav.demo | ||||
,wcav.class,wcav.model_path,wcav.preinfo_path | |||||
,wcav.class,wcav.model_path,wcav.preinfo_path,wcav.model_md5,wcav.preinfo_md5,wcav.mask | |||||
from wx_c_author wca | from wx_c_author wca | ||||
left join wx_c_avatar wcav on wcav.id =wca.resource_id | left join wx_c_avatar wcav on wcav.id =wca.resource_id | ||||
where wca.resource_id =#{resource_id} and wca.user_id = #{id} | where wca.resource_id =#{resource_id} and wca.user_id = #{id} | ||||