zoukankan      html  css  js  c++  java
  • (mybatis)There is no getter for property named 'isEffective' in 'class java.lang.String

    原来代码:

      <select id="findSpecialOffer" resultType="com.lizard.back.model.SpecialOffer" parameterType="java.lang.String">
            SELECT
            taso.id,
            taso.product_id as productId ,
            taso.table_name as tableName,
            taso.start_time_special_off as startTimeSpecialOff,
            taso.end_time_special as endTimeSpecial,
            taso.create_time as createTime,
            taso.operator,
            tau.mobile as mobile,
            taso.is_effective as isEffective,
            taso.type
            FROM
            `t_admin_special_offer` taso
            INNER JOIN t_admin_user tau ON tau.uid = taso.operator
            <if test="isEffective!=null">
                where taso.is_effective = #{isEffective,jdbcType=VARCHAR}
            </if>
        </select>
    

      

    解决方法:    不管你的参数是什么,都要改成"_parameter" 

    <select id="findSpecialOffer" resultType="com.lizard.back.model.SpecialOffer" parameterType="java.lang.String">
            SELECT
            taso.id,
            taso.product_id as productId ,
            taso.table_name as tableName,
            taso.start_time_special_off as startTimeSpecialOff,
            taso.end_time_special as endTimeSpecial,
            taso.create_time as createTime,
            taso.operator,
            tau.mobile as mobile,
            taso.is_effective as isEffective,
            taso.type
            FROM
            `t_admin_special_offer` taso
            INNER JOIN t_admin_user tau ON tau.uid = taso.operator
            <if test="_parameter !=null and _parameter !=''">
                where taso.is_effective = #{isEffective,jdbcType=VARCHAR}
            </if>
        </select>
    

      

  • 相关阅读:
    linux执行命令并获取结果(system)
    awk----基本用法
    shell用法总结
    autoit(au3)使用说明
    博客搜集
    vi常用快捷键总结
    python简单学------------程序传参数,列表推导式,set、list、tuple 转换
    python简单学------------模块
    python简单学------------python面向对象(3)
    python简单学------------python面向对象(2)
  • 原文地址:https://www.cnblogs.com/EveningWind/p/10025968.html
Copyright © 2011-2022 走看看