select id,
category,
sign,
content,
status,
send_quantity,
del_flag,
create_by,
create_time,
update_by,
update_time,
remark
from zdy_message_template
insert into zdy_message_template
id,
category,
sign,
content,
status,
send_quantity,
del_flag,
create_by,
create_time,
update_by,
update_time,
remark,
#{id},
#{category},
#{sign},
#{content},
#{status},
#{sendQuantity},
#{delFlag},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
update zdy_message_template
category =
#{category},
sign =
#{sign},
content =
#{content},
status =
#{status},
send_quantity =
#{sendQuantity},
del_flag =
#{delFlag},
create_by =
#{createBy},
create_time =
#{createTime},
update_by =
#{updateBy},
update_time =
#{updateTime},
remark =
#{remark},
where id = #{id}
delete
from zdy_message_template
where id = #{id}
update zdy_message_template set del_flag = 1 where id in
#{id}
update zdy_message_template
set send_quantity = send_quantity + #{num}
where id = #{messageTemplateId}
and del_flag = '0'