<select id="selectByTwoId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from message
where id
between #{ido,jdbcType=INTEGER} and #{idt,jdbcType=INTEGER}
</select>
代码如图。报错说我的ido没有 ,传入的值也命名为ido,和idt了
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'ido' not found. Available parameters are [0, 1, param1, param2]
parameterType="java.lang.Integer" 这个类型写成map类型吧 dao层把参数放到map中
好像是多个参数的问题。我改成#{0} adn#{1}是可以用的。不知道怎么回事
parameterType="java.lang.Integer"
这个应该错了
这样后期维护也好维护