There is no getter for property named 'bill_status' in class 'java.lang.String'错误解决

在使用mybaitis传参数的时候,如果仅传入一个类型为String的参数,那么在 xml文件中应该使用_parameter来代替参数名。

 Integer selectAllDocuments(String billStatus);

xml文件

   <select id="selectAllDocuments" resultType="java.lang.Integer">
        SELECT COUNT(bill_no)
        FROM `oms_sale_inquiry`
        <where>
            <if test="_parameter!=null and _parameter.trim()!=''">
                bill_status = #{bill_status}
            </if>
        </where>
    </select>
原创文章 39 获赞 6 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_42261668/article/details/97132425
今日推荐