|
|
@@ -12,6 +12,7 @@
|
|
|
<result property="voiceCode" column="voice_code"/>
|
|
|
<result property="ttsId" column="tts_id"/>
|
|
|
<result property="status" column="status"/>
|
|
|
+ <result property="delFlag" column="del_flag"/>
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
<result property="updateBy" column="update_by"/>
|
|
|
@@ -20,11 +21,13 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="selectByCompanyIdAndTtsId" resultMap="CompanyVoiceCloneRefResult">
|
|
|
- select id,voice_name,voice_code, 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, del_flag, 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}
|
|
|
+ and del_flag = 0
|
|
|
+ and status = 1
|
|
|
limit 1
|
|
|
</select>
|
|
|
<select id="selectByCompanyIdAndCompanyUserId" resultType="java.lang.Long">
|
|
|
@@ -32,9 +35,22 @@
|
|
|
from company_voice_clone_ref
|
|
|
where company_id = #{companyId}
|
|
|
and company_user_id = #{companyUserId}
|
|
|
+ and del_flag = 0
|
|
|
+ and status = 1
|
|
|
limit 1
|
|
|
</select>
|
|
|
|
|
|
+ <select id="selectActiveTtsIds" resultType="java.lang.Long">
|
|
|
+ select tts_id
|
|
|
+ from company_voice_clone_ref
|
|
|
+ where company_id = #{companyId}
|
|
|
+ and del_flag = 0
|
|
|
+ and status = 1
|
|
|
+ <if test="companyUserId != null">
|
|
|
+ and company_user_id = #{companyUserId}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
<sql id="selectCcTtsAliyunVo">
|
|
|
select id, voice_name, voice_code, voice_enabled, voice_source, priority, provider,tts_models from cc_tts_aliyun
|
|
|
</sql>
|
|
|
@@ -64,6 +80,7 @@
|
|
|
company_user_id,
|
|
|
tts_id,
|
|
|
status,
|
|
|
+ del_flag,
|
|
|
create_by,
|
|
|
create_time,
|
|
|
update_by,
|
|
|
@@ -78,6 +95,7 @@
|
|
|
#{companyUserId},
|
|
|
#{ttsId},
|
|
|
#{status},
|
|
|
+ #{delFlag},
|
|
|
#{createBy},
|
|
|
now(),
|
|
|
#{updateBy},
|
|
|
@@ -97,4 +115,26 @@
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
|
|
|
+ <delete id="deleteById">
|
|
|
+ update company_voice_clone_ref set del_flag = 1, update_time = now() where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <update id="updateStatusById" parameterType="com.fs.company.domain.CompanyVoiceCloneRef">
|
|
|
+ update company_voice_clone_ref set status = #{status}, update_time = now() where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="selectCompanyVoiceCloneRefList" resultMap="CompanyVoiceCloneRefResult">
|
|
|
+ select id, voice_name, voice_code, company_id, company_user_id, tts_id,
|
|
|
+ status, del_flag, create_by, create_time, update_by, update_time, remark
|
|
|
+ from company_voice_clone_ref
|
|
|
+ <where>
|
|
|
+ del_flag = 0
|
|
|
+ <if test="companyId != null"> and company_id = #{companyId}</if>
|
|
|
+ <if test="companyUserId != null"> and company_user_id = #{companyUserId}</if>
|
|
|
+ <if test="voiceName != null and voiceName != ''"> and voice_name like concat('%', #{voiceName}, '%')</if>
|
|
|
+ <if test="status != null"> and status = #{status}</if>
|
|
|
+ </where>
|
|
|
+ order by id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|