select u.plan_id, u.plan_title, u.del_flag, u.create_by, u.create_time, u.update_by, u.update_time, u.dept_id from t_branch_plan u left join sys_dept d on u.dept_id = d.dept_id
SELECT seq_t_branch_plan.NEXTVAL as planId FROM DUAL
insert into t_branch_plan
plan_id,
plan_title,
del_flag,
create_by,
create_time,
update_by,
update_time,
dept_id,
#{planId},
#{planTitle},
#{delFlag},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{deptId},
update t_branch_plan
plan_title = #{planTitle},
del_flag = #{delFlag},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
dept_id = #{deptId},
where plan_id = #{planId}
update t_branch_plan set del_flag = 2 where plan_id = #{planId}
update t_branch_plan set del_flag = 2 where plan_id in
#{planId}