Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
西魏
cms_sys
Commits
ea461213
Commit
ea461213
authored
Dec 15, 2020
by
xierz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
规范CONCAT函数以适配oracle
parent
f01ab0de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
IContentDao.xml
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
+10
-10
No files found.
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
ea461213
...
@@ -160,7 +160,7 @@
...
@@ -160,7 +160,7 @@
select * from cms_content
select * from cms_content
<where>
<where>
del=0
del=0
<if
test=
"contentTitle != null and contentTitle != ''"
>
and content_title like CONCAT(
'%',#{contentTitle}
,'%')
</if>
<if
test=
"contentTitle != null and contentTitle != ''"
>
and content_title like CONCAT(
CONCAT('%',#{contentTitle})
,'%')
</if>
<if
test=
"categoryId != null and categoryId != ''"
>
and category_id=#{categoryId}
</if>
<if
test=
"categoryId != null and categoryId != ''"
>
and category_id=#{categoryId}
</if>
<if
test=
"contentType != null and contentType != ''"
>
and content_type=#{contentType}
</if>
<if
test=
"contentType != null and contentType != ''"
>
and content_type=#{contentType}
</if>
<if
test=
"contentDisplay != null and contentDisplay != ''"
>
and content_display=#{contentDisplay}
</if>
<if
test=
"contentDisplay != null and contentDisplay != ''"
>
and content_display=#{contentDisplay}
</if>
...
@@ -216,10 +216,10 @@
...
@@ -216,10 +216,10 @@
join cms_category cc on ct.category_id=cc.id
join cms_category cc on ct.category_id=cc.id
<where>
<where>
ct.del=0
ct.del=0
<if
test=
"contentTitle != null and contentTitle != ''"
>
and content_title like CONCAT(
'%',#{contentTitle}
,'%')
</if>
<if
test=
"contentTitle != null and contentTitle != ''"
>
and content_title like CONCAT(
CONCAT('%',#{contentTitle})
,'%')
</if>
<if
test=
"categoryId != null and categoryId != ''"
>
and (ct.category_id=#{categoryId} or ct.category_id in
<if
test=
"categoryId != null and categoryId != ''"
>
and (ct.category_id=#{categoryId} or ct.category_id in
(select id FROM cms_category where find_in_set('${categoryId}',CATEGORY_PARENT_IDS)>0))
</if>
(select id FROM cms_category where find_in_set('${categoryId}',CATEGORY_PARENT_IDS)>0))
</if>
<if
test=
"contentType != null and contentType != ''"
>
and content_type LIKE CONCAT(
'%',#{contentType}
,'%')
</if>
<if
test=
"contentType != null and contentType != ''"
>
and content_type LIKE CONCAT(
CONCAT('%',#{contentType})
,'%')
</if>
<if
test=
"contentDisplay != null and contentDisplay != ''"
>
and content_display=#{contentDisplay}
</if>
<if
test=
"contentDisplay != null and contentDisplay != ''"
>
and content_display=#{contentDisplay}
</if>
<if
test=
"contentAuthor != null and contentAuthor != ''"
>
and content_author=#{contentAuthor}
</if>
<if
test=
"contentAuthor != null and contentAuthor != ''"
>
and content_author=#{contentAuthor}
</if>
<if
test=
"contentSource != null and contentSource != ''"
>
and content_source=#{contentSource}
</if>
<if
test=
"contentSource != null and contentSource != ''"
>
and content_source=#{contentSource}
</if>
...
@@ -296,13 +296,13 @@
...
@@ -296,13 +296,13 @@
and FIND_IN_SET(a.category_id,#{ids})>0
and FIND_IN_SET(a.category_id,#{ids})>0
</if>
</if>
<if
test=
"map.content_title!=null"
>
<if
test=
"map.content_title!=null"
>
and a.content_title like CONCAT(
"%",#{map.content_title}
,"%")
and a.content_title like CONCAT(
CONCAT("%",#{map.content_title})
,"%")
</if>
</if>
<if
test=
"map.content_author!=null"
>
<if
test=
"map.content_author!=null"
>
and a.content_author like CONCAT(
"%",#{map.content_author}
,"%")
and a.content_author like CONCAT(
CONCAT("%",#{map.content_author})
,"%")
</if>
</if>
<if
test=
"map.content_source!=null"
>
<if
test=
"map.content_source!=null"
>
and a.content_source like CONCAT(
"%",#{map.content_source}
,"%")
and a.content_source like CONCAT(
CONCAT("%",#{map.content_source})
,"%")
</if>
</if>
<if
test=
"map.content_type!=null"
>
<if
test=
"map.content_type!=null"
>
and
<foreach
item=
"item"
index=
"index"
collection=
"map.content_type.split(',')"
open=
"("
separator=
"or"
close=
")"
>
and
<foreach
item=
"item"
index=
"index"
collection=
"map.content_type.split(',')"
open=
"("
separator=
"or"
close=
")"
>
...
@@ -310,13 +310,13 @@
...
@@ -310,13 +310,13 @@
</foreach>
</foreach>
</if>
</if>
<if
test=
"map.content_description!=null"
>
<if
test=
"map.content_description!=null"
>
and a.content_description like CONCAT(
"%",#{map.content_description}
,"%")
and a.content_description like CONCAT(
CONCAT("%",#{map.content_description})
,"%")
</if>
</if>
<if
test=
"map.content_keyword!=null"
>
<if
test=
"map.content_keyword!=null"
>
and a.content_keyword like CONCAT(
"%",#{map.content_keyword}
,"%")
and a.content_keyword like CONCAT(
CONCAT("%",#{map.content_keyword})
,"%")
</if>
</if>
<if
test=
"map.content_details!=null"
>
<if
test=
"map.content_details!=null"
>
and a.content_details like CONCAT(
"%",#{map.content_details}
,"%")
and a.content_details like CONCAT(
CONCAT("%",#{map.content_details})
,"%")
</if>
</if>
<if
test=
"map.content_datetime_start!=null and map.content_datetime_end!=null"
>
<if
test=
"map.content_datetime_start!=null and map.content_datetime_end!=null"
>
and a.content_datetime between #{map.content_datetime_start} and #{map.content_datetime_end}
and a.content_datetime between #{map.content_datetime_start} and #{map.content_datetime_end}
...
@@ -324,7 +324,7 @@
...
@@ -324,7 +324,7 @@
<if
test=
"tableName!=null and tableName!='' and diyMap!=null"
>
<if
test=
"tableName!=null and tableName!='' and diyMap!=null"
>
<foreach
item=
"item"
index=
"index"
collection=
"diyList"
open=
""
<foreach
item=
"item"
index=
"index"
collection=
"diyList"
open=
""
separator=
""
close=
""
>
separator=
""
close=
""
>
and d.${field.key} like CONCAT(
"%",#{item.value}
,"%")
and d.${field.key} like CONCAT(
CONCAT("%",#{item.value})
,"%")
</foreach>
</foreach>
</if>
</if>
</where>
</where>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment