oracle中的日期查询在mybatis中写法
生活随笔
收集整理的這篇文章主要介紹了
oracle中的日期查询在mybatis中写法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
?
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>轉載于:https://www.cnblogs.com/null/p/11211229.html
新人創作打卡挑戰賽發博客就能抽獎!定制產品紅包拿不停!總結
以上是生活随笔為你收集整理的oracle中的日期查询在mybatis中写法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 循环链表:拉丁方阵问题
- 下一篇: HBase读写的几种方式(一)java篇