select a.id, a.screen_size, a.in_screen_mode, a.roll_speed, a.stop_time, a.apply_type, a.is_currency,
a.template_type, a.vms_type, a.remark, b.id, b.template_id, b.content, b.font_color, b.font_size,
b.font_type, b.font_spacing, b.coordinate, b.image_url, b.height, b.width, a.category, c.dict_label,d.dict_label screenMode
from iot_board_template a
left join iot_board_template_content b on a.id = b.template_id
left join sys_dict_data c on c.dict_type = "iot_template_category" and a.category = c.dict_value
left join sys_dict_data d on d.dict_type = "iot_device_font_inScreen_mode" and a.in_screen_mode = d.dict_value
insert into iot_board_template
screen_size,in_screen_mode,roll_speed,stop_time,apply_type,is_currency,template_type,vms_type,remark,category,#{screenSize},#{inScreenMode},#{rollSpeed},#{stopTime},#{applyType},#{isCurrency},#{templateType},#{vmsType},#{remark},#{category},
update iot_board_template
screen_size = #{screenSize},in_screen_mode = #{inScreenMode},roll_speed = #{rollSpeed},stop_time = #{stopTime},apply_type = #{applyType},is_currency = #{isCurrency},vms_type = #{vmsType},remark = #{remark},category = #{category},
where id = #{id}
delete from iot_board_template where id = #{id}
delete from iot_board_template where id in
#{id}