问题描述:
Caused by: org.apache.ibatis.binding.BindingException: Parameter 'id' not found. Available parameters are [inbound_line_num, inbounddetail_id, param1, param2] at org.apache.ibatis.binding.MapperMethod$ParamMap.get(MapperMethod.java:212) at org.apache.ibatis.reflection.wrapper.MapWrapper.get(MapWrapper.java:45) at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:122)原因分析:
这是在mapper的字段映射的时候,没有映射对,只需要检查相应的mapper文件即可解决方案:
mapper文件:
InboundDetail getInboundDetailById(@Param("inbounddetailId") Long id,@Param("inboundLineNum") Long inboundLineNum);
mapper.xml文件:
<select id="getInboundDetailById" resultMap="inboundDetailResultMap">
select * from rm_inbound_detail
where inbound_id = #{inbounddetailId} and inbound_line_num=#{inboundLineNum} and is_deleted = 0
</select>