insert into sys_auto_code(id,code_name,code_desc,parent_id,order_id,create_by,create_time,update_by,update_time,user_id,dept_id,sass_id,extend1,extend2,code_value)
values (#{id},#{codeName},#{codeDesc},#{parentId},#{orderId},#{creator},sysdate(),#{updator},#{updateTime},#{userId},#{deptId},#{sassId},#{extend1},#{extend2},#{codeValue})
insert into sys_auto_code(id,code_name,code_desc,parent_id,order_id,create_by,create_time,update_by,update_time,user_id,dept_id,sass_id,extend1,extend2)
values
(#{entity.id},#{entity.codeName},#{entity.codeDesc},#{entity.parentId},#{entity.orderId},#{entity.createBy},#{entity.createTime},#{entity.updateBy},#{entity.updateTime},#{entity.userId},#{entity.deptId},#{entity.sassId},#{entity.extend1},#{entity.extend2})
insert into sys_auto_code(id,code_name,code_desc,parent_id,order_id,create_by,create_time,update_by,update_time,user_id,dept_id,sass_id,extend1,extend2)
values
(#{entity.id},#{entity.codeName},#{entity.codeDesc},#{entity.parentId},#{entity.orderId},#{entity.createBy},#{entity.createTime},#{entity.updateBy},#{entity.updateTime},#{entity.userId},#{entity.deptId},#{entity.sassId},#{entity.extend1},#{entity.extend2})
on duplicate key update
id=values(id),
code_name=values(code_name),
code_desc=values(code_desc),
parent_id=values(parent_id),
order_id=values(order_id),
create_by=values(create_by),
create_time=values(create_time),
update_by=values(update_by),
update_time=values(update_time),
user_id=values(user_id),
dept_id=values(dept_id),
sass_id=values(sass_id),
extend1=values(extend1),
extend2=values(extend2)
update sys_auto_code
code_name = #{codeName},
code_desc = #{codeDesc},
parent_id = #{parentId},
order_id = #{orderId},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updator},
update_time = sysdate(),
user_id = #{userId},
dept_id = #{deptId},
sass_id = #{sassId},
extend1 = #{extend1},
extend2 = #{extend2},
code_value = #{codeValue},
where id = #{id}
delete from sys_auto_code where id = #{id}