mybatis xml文件中的大于等于 小于等于

    技术2024-07-11  174

    <if test="start_time != null and start_time != ''" > and to_date(substr(t.create_time,0,10),'YYYY-MM-DD') >= to_date(#{start_time,jdbcType=VARCHAR},'YYYY-MM-DD') </if> <if test="end_time != null and end_time != ''" > and to_date(substr(t.create_time,0,10),'YYYY-MM-DD') <= to_date(#{end_time,jdbcType=VARCHAR},'YYYY-MM-DD') </if>

    应该为

    <if test="start_time != null and start_time != ''" > and to_date(substr(t.create_time,0,10),'YYYY-MM-DD') &gt;= to_date(#{start_time,jdbcType=VARCHAR},'YYYY-MM-DD') </if> <if test="end_time != null and end_time != ''" > and to_date(substr(t.create_time,0,10),'YYYY-MM-DD') &lt;= to_date(#{end_time,jdbcType=VARCHAR},'YYYY-MM-DD') </if>
    Processed: 0.013, SQL: 9