Mybatis 参数传递的优化之路
从项目开始使用 Mybatis Plus 到现在,对 Mapper 传递参数的方式做了多个版本的改进和优化。这篇文章主要讲解在改版和优化过程中遇到的问题,以及当时的一些想法。 第一版:单个参数传递 传递方式如下: UserMapper.java List<UserVO> getUserList(String name); UserMapper.xml <!--查询所有用户信息--> <select id="getUserList" resultMap="UserVOMap"> select <include refid="col"/> from user where is_deleted = '0' <if test="name != null"&g
