原来代码:

  <select >
        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 >
        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>

  

相关文章:

  • 2021-10-10
  • 2022-12-23
  • 2021-11-05
  • 2021-06-25
  • 2021-06-07
猜你喜欢
  • 2021-08-15
  • 2022-12-23
  • 2022-12-23
  • 2022-02-04
  • 2021-11-03
相关资源
相似解决方案