nested exception is org.apache.ibatis.binding.BindingException: Parameter 'xxx' not found.Available parameters are [arg1, arg0, param1, param2]
需求要向Mapper接口方法中传入多个参数
错误写法:
int editState(Integer id, Integer state);
<update id="editState">
update gy_branch_feature
set state = #{state}
where id = #{id}
</update>
正确写法:
int editState(@Param("id")Integer id, @Param("state")Integer state);
<update id="editState">
update gy_branch_feature
set state = #{arg1}
where id = #{arg0}
</update>