org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'paymentType' in 'class java.lang.Integer'
我的代码是这么写的,调用的时候之传入了这一个参数,这个参数的非空判断是在mapper里面做的(业务需求)
<select id="listQueryRechargeProduct" parameterType="java.lang.Integer" resultMap="rechargeEntity">
SELECT * FROM recharge_product
<if test="_parameter!=null">
WHERE payment_type=#{paymentType}
</if>
</select>
最后查证得知

这里应该使用mybatis的内置对象"_parameter",而且

要在#传参里面加上类型.
网友评论