id, company_id, phone, username, role, position, real_name, password_hash, must_change_password,
status, session_version, created_at, updated_at
update sys_user
set password_hash = #{passwordHash},
must_change_password = #{mustChangePassword},
updated_at = current_timestamp
where id = #{id} and company_id = #{companyId}
update sys_user
set role = #{role},
position = #{position},
session_version = session_version + 1,
updated_at = current_timestamp
where id = #{id} and company_id = #{companyId}
update sys_user
set status = #{status},
session_version = session_version + 1,
updated_at = current_timestamp
where id = #{id} and company_id = #{companyId}
update sys_user
set session_version = session_version + 1,
updated_at = current_timestamp
where id = #{id} and company_id = #{companyId}
delete from sys_user