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
5f113163
Commit
5f113163
authored
Feb 25, 2019
by
sunxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQLServer适配
parent
d2151c38
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
IArticleDao.xml
src/main/java/net/mingsoft/cms/dao/IArticleDao.xml
+12
-4
No files found.
src/main/java/net/mingsoft/cms/dao/IArticleDao.xml
View file @
5f113163
...
@@ -305,7 +305,15 @@
...
@@ -305,7 +305,15 @@
<if
test=
"order == true"
>
desc
</if>
<if
test=
"order == true"
>
desc
</if>
<if
test=
"order == false"
>
asc
</if>
<if
test=
"order == false"
>
asc
</if>
</select>
</select>
<sql
id=
"queryWhereCategoryId"
databaseId=
"mysql"
>
find_in_set('${categoryId}',CATEGORY_PARENT_ID)
</sql>
<sql
id=
"queryWhereCategoryId"
databaseId=
"oracle"
>
instr(','||'${categoryId}'||',', ','||CATEGORY_PARENT_ID||',')>0
</sql>
<sql
id=
"queryWhereCategoryId"
databaseId=
"sqlServer"
>
CHARINDEX(','+'${categoryId}'+',' , ','+CATEGORY_PARENT_ID +',')>0
</sql>
<!-- 根据站点编号、开始、结束时间和栏目编号查询文章编号集合 -->
<!-- 根据站点编号、开始、结束时间和栏目编号查询文章编号集合 -->
<select
id=
"queryIdsByCategoryIdForParser"
resultMap=
"resultMapBean"
>
<select
id=
"queryIdsByCategoryIdForParser"
resultMap=
"resultMapBean"
>
select
select
...
@@ -320,7 +328,7 @@
...
@@ -320,7 +328,7 @@
<!-- 查询子栏目数据 -->
<!-- 查询子栏目数据 -->
<if
test=
"categoryId > 0"
>
<if
test=
"categoryId > 0"
>
and (b.basic_categoryid=#{categoryId} or b.basic_categoryid in
and (b.basic_categoryid=#{categoryId} or b.basic_categoryid in
(select category_id FROM category where
find_in_set(#{categoryId},CATEGORY_PARENT_ID)
))
(select category_id FROM category where
<include
refid=
"queryWhereCategoryId"
></include>
))
</if>
</if>
<if
test=
"beginTime!=null and beginTime!=''"
>
<if
test=
"beginTime!=null and beginTime!=''"
>
and b.basic_updatetime
>
= #{beginTime}
and b.basic_updatetime
>
= #{beginTime}
...
@@ -358,14 +366,14 @@
...
@@ -358,14 +366,14 @@
<foreach
item=
"val"
index=
"index"
collection=
"item[3]"
>
<foreach
item=
"val"
index=
"index"
collection=
"item[3]"
>
<if
test=
"index==0"
>
#{val}
</if>
<if
test=
"index==0"
>
#{val}
</if>
</foreach>
</foreach>
||'%'
)
||'%'
</sql>
</sql>
<sql
id=
"queryLike"
databaseId=
"sqlServer"
>
<sql
id=
"queryLike"
databaseId=
"sqlServer"
>
like '%'+
like '%'+
<foreach
item=
"val"
index=
"index"
collection=
"item[3]"
>
<foreach
item=
"val"
index=
"index"
collection=
"item[3]"
>
<if
test=
"index==0"
>
#{val}
</if>
<if
test=
"index==0"
>
#{val}
</if>
</foreach>
</foreach>
+'%'
)
+'%'
</sql>
</sql>
<!-- 已过期 -->
<!-- 已过期 -->
<select
id=
"queryListForSearch"
resultMap=
"resultMap"
>
<select
id=
"queryListForSearch"
resultMap=
"resultMap"
>
...
...
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