select t.model, t.id, t.task_code, t.text, t.language, t.dialect, t.voice, t.emotion,
t.speed, t.volume, t.pitch, t.sample_rate, t.output_format, t.style_template,
t.status, t.audio_file_path, t.audio_duration, t.file_size, t.error_msg,
t.create_by, t.create_time, t.update_by, t.update_time, t.remark,
dict_lang.dict_label as language_name,
dict_voice.dict_label as voice_name,
dict_emotion.dict_label as emotion_name,
case t.status
when '0' then '待处理'
when '1' then '合成中'
when '2' then '成功已完成'
when '3' then '失败'
else '未知'
end as status_name
from tts_synthesize_task t
left join sys_dict_data dict_lang on t.language = dict_lang.dict_value and dict_lang.dict_type = 'tts_language'
left join sys_dict_data dict_voice on t.voice = dict_voice.dict_value and dict_voice.dict_type = 'tts_voice'
left join sys_dict_data dict_emotion on t.emotion = dict_emotion.dict_value and dict_emotion.dict_type = 'tts_emotion'
insert into tts_synthesize_task
id,
create_by,
create_time,
update_by,
update_time,
remark,
task_code,
text,
instructions,
model,
language,
dialect,
voice,
emotion,
speed,
volume,
pitch,
sample_rate,
output_format,
style_template,
status,
audio_file_path,
audio_duration,
file_size,
error_msg,
#{id},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
#{taskCode},
#{text},
#{instructions},
#{model},
#{language},
#{dialect},
#{voice},
#{emotion},
#{speed},
#{volume},
#{pitch},
#{sampleRate},
#{outputFormat},
#{styleTemplate},
#{status},
#{audioFilePath},
#{audioDuration},
#{fileSize},
#{errorMsg},
update tts_synthesize_task
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
remark = #{remark},
task_code = #{taskCode},
text = #{text},
instructions = #{instructions},
model = #{model},
language = #{language},
dialect = #{dialect},
voice = #{voice},
emotion = #{emotion},
speed = #{speed},
volume = #{volume},
pitch = #{pitch},
sample_rate = #{sampleRate},
output_format = #{outputFormat},
style_template = #{styleTemplate},
status = #{status},
audio_file_path = #{audioFilePath},
audio_duration = #{audioDuration},
file_size = #{fileSize},
error_msg = #{errorMsg},
where id = #{id}
delete from tts_synthesize_task where id = #{id}