1、适配oracle

2、更改高级搜索的时间空间,格式化时间日期值
This commit is contained in:
xierz 2020-12-16 16:00:32 +08:00
parent ea461213bf
commit 193d144a04
1 changed files with 20 additions and 3 deletions

View File

@ -235,6 +235,7 @@
<if test="createDate != null"> and ct.create_date=#{createDate} </if>
<if test="updateBy &gt; 0"> and ct.update_by=#{updateBy} </if>
<if test="updateDate != null"> and update_date=#{updateDate} </if>
<include refid="net.mingsoft.base.dao.IBaseDao.sqlWhere"></include>
</where>
)ct ORDER BY ct.content_datetime desc,content_sort desc
</select>
@ -253,11 +254,21 @@
(select id FROM cms_category where find_in_set('${categoryId}',CATEGORY_PARENT_IDS)>0))
</if>
<if test="beginTime!=null and beginTime!=''">
<if test="_databaseId == 'mysql'">
and content_datetime &gt;= #{beginTime}
</if>
<if test="_databaseId == 'oracle'">
and content_datetime &gt;= to_date(#{beginTime}, 'yyyy-mm-dd hh24:mi:ss')
</if>
</if>
<if test="endTime!=null and endTime!=''">
<if test="_databaseId == 'mysql'">
and content_datetime &gt;= #{endTime}
</if>
<if test="_databaseId == 'oracle'">
and content_datetime &gt;= to_date(#{endTime}, 'yyyy-mm-dd hh24:mi:ss')
</if>
</if>
<if test="flag!=null and flag!=''">
and ct.content_type in ( #{flag})
</if>
@ -319,8 +330,14 @@
and a.content_details like CONCAT(CONCAT("%",#{map.content_details}),"%")
</if>
<if test="map.content_datetime_start!=null and map.content_datetime_end!=null">
<if test="_databaseId == 'mysql'">
and a.content_datetime between #{map.content_datetime_start} and #{map.content_datetime_end}
</if>
<if test="_databaseId == 'oracle'">
and a.content_datetime &gt; to_date(#{map.content_datetime_start}, 'yyyy-mm-dd hh24:mi:ss')
and a.content_datetime &lt; to_date(#{map.content_datetime_end}, 'yyyy-mm-dd hh24:mi:ss')
</if>
</if>
<if test="tableName!=null and tableName!='' and diyMap!=null">
<foreach item="item" index="index" collection="diyList" open=""
separator="" close="">