select u.user_id, u.dept_id, u.login_name, u.user_name, u.user_type, u.email, u.avatar, u.phonenumber, u.sex, u.password, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.pwd_update_date, u.create_time, u.remark, d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status, r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status from sys_user u left join sys_dept d on u.dept_id = d.dept_id left join sys_user_role ur on u.user_id = ur.user_id left join sys_role r on r.role_id = ur.role_id update sys_user set del_flag = '2' where user_id = #{userId} update sys_user set del_flag = '2' where user_id in #{userId} update sys_user dept_id = #{deptId}, login_name = #{loginName}, user_name = #{userName}, user_type = #{userType}, email = #{email}, phonenumber = #{phonenumber}, sex = #{sex}, avatar = #{avatar}, password = #{password}, salt = #{salt}, status = #{status}, login_ip = #{loginIp}, login_date = #{loginDate}, pwd_update_date = #{pwdUpdateDate}, update_by = #{updateBy}, remark = #{remark}, update_time = sysdate() where user_id = #{userId} insert into sys_user( user_id, dept_id, login_name, user_name, user_type, email, avatar, phonenumber, sex, password, salt, status, pwd_update_date, create_by, remark, create_time )values( #{userId}, #{deptId}, #{loginName}, #{userName}, #{userType}, #{email}, #{avatar}, #{phonenumber}, #{sex}, #{password}, #{salt}, #{status}, #{pwdUpdateDate}, #{createBy}, #{remark}, sysdate() )