<if test="excStartTime!=null and excStartTime!=''">
                <![CDATA[   and DATE_FORMAT(dl.exc_start_time, '%Y-%m-%d')>=  DATE_FORMAT(#{excStartTime}, '%Y-%m-%d')   ]]>
        </if>
        <if test="excEndTime!=null and excEndTime!=''">
            <![CDATA[  and DATE_FORMAT(dl.exc_end_time, '%Y-%m-%d') <= DATE_FORMAT(#{excEndTime}, '%Y-%m-%d')    ]]>
        </if>
    

大于号和小于号在mybatis中不起作用,所以要转换一下.

或者使用转义符.

 <if test="excTimeLength != null">
       and dl.exc_time_length &gt;= #{excTimeLength,jdbcType=INTEGER}
      </if>

&lt;小于号  <      &gt; 大于号>

相关文章:

  • 2021-11-19
  • 2022-12-23
  • 2021-11-19
  • 2022-12-23
  • 2021-12-12
  • 2021-05-29
  • 2021-12-25
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-20
  • 2021-12-12
  • 2021-12-18
  • 2021-11-19
  • 2021-05-22
  • 2022-12-23
相关资源
相似解决方案