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
f01ab0de
Commit
f01ab0de
authored
Dec 15, 2020
by
xierz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、更改find_in_set使用方法
2、为菜单、角色添加mybatis-plus适配 3、优化添加菜单服务器返回信息
parent
5cb5e78a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
ContentAction.java
src/main/java/net/mingsoft/cms/action/ContentAction.java
+1
-0
ICategoryDao.xml
src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml
+3
-3
IContentDao.xml
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
+4
-4
No files found.
src/main/java/net/mingsoft/cms/action/ContentAction.java
View file @
f01ab0de
...
...
@@ -20,6 +20,7 @@
*/
package
net
.
mingsoft
.
cms
.
action
;
import
com.baomidou.mybatisplus.extension.conditions.query.QueryChainWrapper
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
...
...
src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml
View file @
f01ab0de
...
...
@@ -157,10 +157,10 @@
and
(
<if
test=
"categoryParentIds != null and categoryParentIds!=''"
>
find_in_set(#{categoryParentIds},CATEGORY_PARENT_IDS)
find_in_set(#{categoryParentIds},CATEGORY_PARENT_IDS)
>0
</if>
<if
test=
"categoryParentIds == null or categoryParentIds ==''"
>
find_in_set('${id}',CATEGORY_PARENT_IDS)
find_in_set('${id}',CATEGORY_PARENT_IDS)
>0
</if>
<if
test=
"id != null"
>
or id=#{id}
...
...
@@ -208,7 +208,7 @@
<if
test=
"dictId != null"
>
and dict_id=#{dictId}
</if>
<if
test=
"categoryFlag != null and categoryFlag != ''"
>
and category_flag=#{categoryFlag}
</if>
<if
test=
"categoryPath != null and categoryPath != ''"
>
and category_path=#{categoryPath}
</if>
<if
test=
"categoryParentIds != null and categoryParentIds != ''"
>
and find_in_set(#{categoryParentIds},category_parent_ids)
</if>
<if
test=
"categoryParentIds != null and categoryParentIds != ''"
>
and find_in_set(#{categoryParentIds},category_parent_ids)
>0
</if>
<if
test=
"createBy > 0"
>
and create_by=#{createBy}
</if>
<if
test=
"createDate != null"
>
and create_date=#{createDate}
</if>
<if
test=
"updateBy > 0"
>
and update_by=#{updateBy}
</if>
...
...
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
f01ab0de
...
...
@@ -218,7 +218,7 @@
ct.del=0
<if
test=
"contentTitle != null and contentTitle != ''"
>
and content_title like CONCAT('%',#{contentTitle},'%')
</if>
<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)))
</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=
"contentDisplay != null and contentDisplay != ''"
>
and content_display=#{contentDisplay}
</if>
<if
test=
"contentAuthor != null and contentAuthor != ''"
>
and content_author=#{contentAuthor}
</if>
...
...
@@ -250,7 +250,7 @@
<!-- 查询子栏目数据 -->
<if
test=
"categoryId > 0"
>
and (ct.category_id=#{categoryId} or ct.category_id in
(select id FROM cms_category where find_in_set('${categoryId}',CATEGORY_PARENT_IDS)))
(select id FROM cms_category where find_in_set('${categoryId}',CATEGORY_PARENT_IDS)
>0
))
</if>
<if
test=
"beginTime!=null and beginTime!=''"
>
and content_datetime
>
= #{beginTime}
...
...
@@ -293,7 +293,7 @@
<where>
a.del=0
<if
test=
"ids!=null and ids!=''"
>
and FIND_IN_SET(a.category_id,#{ids})
and FIND_IN_SET(a.category_id,#{ids})
>0
</if>
<if
test=
"map.content_title!=null"
>
and a.content_title like CONCAT("%",#{map.content_title},"%")
...
...
@@ -306,7 +306,7 @@
</if>
<if
test=
"map.content_type!=null"
>
and
<foreach
item=
"item"
index=
"index"
collection=
"map.content_type.split(',')"
open=
"("
separator=
"or"
close=
")"
>
FIND_IN_SET('${item}',a.content_type)
FIND_IN_SET('${item}',a.content_type)
>0
</foreach>
</if>
<if
test=
"map.content_description!=null"
>
...
...
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