org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'paymentType' in 'class java.lang.Integer'
我的代碼是這么寫的,調(diào)用的時(shí)候之傳入了這一個(gè)參數(shù),這個(gè)參數(shù)的非空判斷是在mapper里面做的(業(yè)務(wù)需求)
<select id="listQueryRechargeProduct" parameterType="java.lang.Integer" resultMap="rechargeEntity">
SELECT * FROM recharge_product
<if test="_parameter!=null">
WHERE payment_type=#{paymentType}
</if>
</select>
最后查證得知
image.png
這里應(yīng)該使用mybatis的內(nèi)置對象"_parameter",而且
image.png
要在#傳參里面加上類型.