|
|
@@ -8,6 +8,8 @@
|
|
|
<id property="id" column="id"/>
|
|
|
<result property="companyId" column="company_id"/>
|
|
|
<result property="companyUserId" column="company_user_id"/>
|
|
|
+ <result property="voiceName" column="voice_name"/>
|
|
|
+ <result property="voiceCode" column="voice_code"/>
|
|
|
<result property="ttsId" column="tts_id"/>
|
|
|
<result property="status" column="status"/>
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
@@ -18,18 +20,46 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="selectByCompanyIdAndTtsId" resultMap="CompanyVoiceCloneRefResult">
|
|
|
- select id, company_id,company_user_id, tts_id, status, create_by, create_time, update_by, update_time, remark
|
|
|
+ select id,voice_name,voice_code, company_id,company_user_id, tts_id, status, create_by, create_time, update_by, update_time, remark
|
|
|
from company_voice_clone_ref
|
|
|
where company_id = #{companyId}
|
|
|
and company_user_id = #{companyUserId}
|
|
|
and tts_id = #{ttsId}
|
|
|
limit 1
|
|
|
</select>
|
|
|
+ <select id="selectByCompanyIdAndCompanyUserId" resultType="java.lang.Long">
|
|
|
+ select tts_id
|
|
|
+ from company_voice_clone_ref
|
|
|
+ where company_id = #{companyId}
|
|
|
+ and company_user_id = #{companyUserId}
|
|
|
+ limit 1
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <sql id="selectCcTtsAliyunVo">
|
|
|
+ select id, voice_name, voice_code, voice_enabled, voice_source, priority, provider from cc_tts_aliyun
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectCcTtsAliyunList" resultType="com.fs.aicall.domain.CcTtsAliyun">
|
|
|
+ <include refid="selectCcTtsAliyunVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="voiceName != null and voiceName != ''"> and voice_name like concat('%', #{voiceName}, '%')</if>
|
|
|
+ <if test="voiceCode != null and voiceCode != ''"> and voice_code = #{voiceCode}</if>
|
|
|
+ <if test="voiceEnabled != null "> and voice_enabled = #{voiceEnabled}</if>
|
|
|
+ <if test="voiceSource != null and voiceSource != ''"> and voice_source = #{voiceSource}</if>
|
|
|
+ <if test="priority != null "> and priority = #{priority}</if>
|
|
|
+ <if test="provider != null and provider != ''"> and provider = #{provider}</if>
|
|
|
+ </where>
|
|
|
+ order by priority asc
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
|
|
|
<insert id="insertCompanyVoiceCloneRef" parameterType="com.fs.company.domain.CompanyVoiceCloneRef"
|
|
|
useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into company_voice_clone_ref
|
|
|
(
|
|
|
+ voice_name,
|
|
|
+ voice_code,
|
|
|
company_id,
|
|
|
company_user_id,
|
|
|
tts_id,
|
|
|
@@ -42,6 +72,8 @@
|
|
|
)
|
|
|
values
|
|
|
(
|
|
|
+ #{voiceName},
|
|
|
+ #{voiceCode},
|
|
|
#{companyId},
|
|
|
#{companyUserId},
|
|
|
#{ttsId},
|