前台传参过来,sql语句where后面却没有该字段

前台传参过来,sql语句where后面却没有该字段

代码块

    <where>
      <if test="eventTitle != null and eventTitle != ''">
        and e.event_title = #{eventTitle,jdbcType=VARCHAR}
      </if>
      <if test="taskStatus != null ">
        and t.status = #{taskStatus,jdbcType=INTEGER}
      </if>
    </where>

原因

jdbcType=INTEGER ,if 里面就不能有 taskStatus != ''

猜你喜欢

转载自blog.csdn.net/miawj/article/details/80804195