a.id AS "id", a.create_by AS "createBy.id", a.create_date AS "createDate", a.update_by AS "updateBy.id", a.update_date AS "updateDate", a.remarks AS "remarks", a.del_flag AS "delFlag", a.template_cd AS "templateCd", a.template_nm AS "templateNm", a.template_type AS "templateType", a.template_path AS "templatePath", a.template_ext AS "templateExt", a.template_treenode AS "treeNode", a.other_id AS "otherId" INSERT INTO sys_template_mag( id, create_by, create_date, update_by, update_date, remarks, del_flag, template_cd, template_nm, template_type, template_path, template_ext, template_treenode, other_id ) values( #{id}, #{createBy.id}, #{createDate}, #{updateBy.id}, #{updateDate}, #{remarks}, #{delFlag}, #{templateCd}, #{templateNm}, #{templateType}, #{templatePath}, #{templateExt}, #{treeNode}, #{otherId} ) UPDATE sys_template_mag SET update_by = #{updateBy.id}, update_date = #{updateDate}, remarks = #{remarks}, template_cd = #{templateCd}, template_nm = #{templateNm}, template_type = #{templateType}, template_path = #{templatePath}, template_ext = #{templateExt}, template_treenode=#{treeNode}, other_id = #{otherId} WHERE id = #{id} DELETE FROM sys_template_mag WHERE id = #{id} UPDATE sys_template_mag SET del_flag = #{DEL_FLAG_DELETE} WHERE id = #{id}