这个错误是mybatis 报错,sql中传多值,代码分不清哪个是哪个啦
解决办法
利用 注解@Param("abc") 注意是mybatis提供的注解 不是spring
<select id="selectByLimit" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from note_info
limit #{prefix},#{suffix}
</select>
List<NoteDao> selectByLimit(@Param("prefix") Integer prefix,
@Param("suffix") Integer suffix);
另一种办法:
mapper 里 的参数 用默认参数
如图
<select id="selectByLimit" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from note_info
limit #{arg0},#{arg1}
</select>