oracle中的日期查詢在mybatis中寫法可以參考如下:注意提交時間的<號是用特殊字符代替的哦,直接寫<號程序會報錯的
<!-- 通用查詢條件 -->
<!-- 通用查詢條件 -->
<!-- 通用查詢條件 -->
<sql id="Base_Search">
<if test="content != null">
AND CONTENT like '%'||#{content,jdbcType=VARCHAR}||'%'
</if>
<if test="createdBy != null">
AND CREATED_BY = #{createdBy,jdbcType=VARCHAR}
</if>
<!-- 提交時間start -->
<if test="startTime !=null">
AND CREATION_TIME >= to_date(#{startTime},'yyyy-MM-dd hh24:mi:ss')
</if>
<!-- 提交時間end -->
<if test="endTime !=null">
AND CREATION_TIME <= to_date(#{endTime},'yyyy-MM-dd hh24:mi:ss')
</if>
</sql>