<!-- 更新语句,参数也是User对象 -->
<update>
UPDATE sys_user SET
company_id = #{company.id},
office_id = #{office.id},
login_name = #{loginName},
password = #{password},
no = #{no},
name = #{name},
email = #{email},
phone = #{phone},
mobile = #{mobile},
user_type = #{userType},
update_by = #{updateBy.id},
update_date = #{updateDate},
remarks = #{remarks},
login_flag = #{loginFlag},
photo = #{photo},
qrcode = #{qrCode},
school = #{school.id}
WHERE id = #{id}
</update>
<!-- 物理删除用户 -->
<update>
DELETE FROM sys_user
WHERE id = #{id}
</update>
<!-- 逻辑删除用户 -->
<update>
UPDATE sys_user SET
del_flag = #{DEL_FLAG_DELETE}
WHERE id = #{id}
</update>
</mapper>
整体就是这样,如果后续有什么补充,我会在之后的章节增加;如果有错误欢迎指出并修改。