Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
297a786e
Commit
297a786e
authored
Apr 04, 2019
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
适配CONCAT关键字
parent
faa9e71c
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
135 additions
and
0 deletions
+135
-0
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/DeptMapper.xml
+22
-0
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/DictMapper.xml
+9
-0
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/LoginLogMapper.xml
+13
-0
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/MenuMapper.xml
+38
-0
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/NoticeMapper.xml
+10
-0
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/OperationLogMapper.xml
+15
-0
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/RoleMapper.xml
+10
-0
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/UserMapper.xml
+18
-0
No files found.
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/DeptMapper.xml
View file @
297a786e
...
@@ -60,6 +60,19 @@
...
@@ -60,6 +60,19 @@
order by sort ASC
order by sort ASC
</select>
</select>
<select
id=
"list"
resultType=
"map"
databaseId=
"oracle"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_dept where 1 = 1
<if
test=
"condition != null and condition != ''"
>
and simple_name like ('%' || #{condition} || '%') or full_name like ('%' || #{condition} || '%')
</if>
<if
test=
"deptId != null and deptId != ''"
>
and (dept_id = #{deptId} or dept_id in ( select dept_id from sys_dept where pids like '%[' || #{deptId} || ']%' ))
</if>
order by sort ASC
</select>
<select
id=
"treeviewNodes"
resultType=
"cn.stylefeng.guns.core.common.node.TreeviewNode"
>
<select
id=
"treeviewNodes"
resultType=
"cn.stylefeng.guns.core.common.node.TreeviewNode"
>
select dept_id AS tags, pid as "parentId", simple_name as text from sys_dept
select dept_id AS tags, pid as "parentId", simple_name as text from sys_dept
</select>
</select>
...
@@ -73,4 +86,13 @@
...
@@ -73,4 +86,13 @@
</if>
</if>
</select>
</select>
<select
id=
"likePids"
resultType=
"cn.stylefeng.guns.modular.system.entity.Dept"
databaseId=
"oracle"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_dept where 1 = 1
<if
test=
"deptId != null and deptId != ''"
>
and pids LIKE '%[' || #{deptId} || ']%'
</if>
</select>
</mapper>
</mapper>
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/DictMapper.xml
View file @
297a786e
...
@@ -57,4 +57,13 @@
...
@@ -57,4 +57,13 @@
</if>
</if>
</select>
</select>
<select
id=
"likeParentIds"
resultType=
"cn.stylefeng.guns.modular.system.entity.Dict"
databaseId=
"oracle"
>
select
<include
refid=
"Base_Column_List"
></include>
from sys_dict where 1 = 1
<if
test=
"dictId != null and dictId != ''"
>
and parent_ids LIKE '%$[' || #{dictId} || ']%'
</if>
</select>
</mapper>
</mapper>
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/LoginLogMapper.xml
View file @
297a786e
...
@@ -31,4 +31,17 @@
...
@@ -31,4 +31,17 @@
</if>
</if>
</select>
</select>
<select
id=
"getLoginLogs"
resultType=
"map"
parameterType=
"com.baomidou.mybatisplus.extension.plugins.pagination.Page"
databaseId=
"oracle"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_login_log
where 1 = 1
<if
test=
"beginTime != null and beginTime !='' and endTime != null and endTime != ''"
>
and (create_time between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
</if>
<if
test=
"logName != null and logName !=''"
>
and log_name like '%' || #{logName} || '%'
</if>
</select>
</mapper>
</mapper>
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/MenuMapper.xml
View file @
297a786e
...
@@ -45,6 +45,22 @@
...
@@ -45,6 +45,22 @@
</if>
</if>
</select>
</select>
<select
id=
"selectMenus"
resultType=
"map"
databaseId=
"oracle"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_menu
where status = 'ENABLE'
<if
test=
"condition != null and condition != ''"
>
and (name like '%' || #{condition} || '%' or code like '%' || #{condition} || '%')
</if>
<if
test=
"level != null and level != ''"
>
and levels = #{level}
</if>
<if
test=
"menuId != null and menuId != 0"
>
and (menu_id = #{menuId} or menu_id in ( select menu_id from sys_menu where pcodes like '%[' || #{code} ']%' ))
</if>
</select>
<select
id=
"getMenuIdsByRoleId"
resultType=
"long"
>
<select
id=
"getMenuIdsByRoleId"
resultType=
"long"
>
select menu_id from
select menu_id from
sys_relation where role_id = #{roleId}
sys_relation where role_id = #{roleId}
...
@@ -274,6 +290,19 @@
...
@@ -274,6 +290,19 @@
</if>
</if>
</select>
</select>
<select
id=
"selectMenuTree"
resultType=
"java.util.Map"
databaseId=
"oracle"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_menu
where status = 'ENABLE'
<if
test=
"condition != null and condition != ''"
>
and (name like '%' || #{condition} || '%' or code like '%' || #{condition} || '%')
</if>
<if
test=
"level != null and level != ''"
>
and levels = #{level}
</if>
</select>
<select
id=
"getMenusLikePcodes"
resultType=
"cn.stylefeng.guns.modular.system.entity.Menu"
>
<select
id=
"getMenusLikePcodes"
resultType=
"cn.stylefeng.guns.modular.system.entity.Menu"
>
select
select
<include
refid=
"Base_Column_List"
></include>
<include
refid=
"Base_Column_List"
></include>
...
@@ -283,4 +312,13 @@
...
@@ -283,4 +312,13 @@
</if>
</if>
</select>
</select>
<select
id=
"getMenusLikePcodes"
resultType=
"cn.stylefeng.guns.modular.system.entity.Menu"
databaseId=
"oracle"
>
select
<include
refid=
"Base_Column_List"
></include>
from sys_menu where 1 = 1
<if
test=
"code != null and code != ''"
>
and pcodes LIKE '%[' || #{code} || ']%'
</if>
</select>
</mapper>
</mapper>
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/NoticeMapper.xml
View file @
297a786e
...
@@ -27,4 +27,14 @@
...
@@ -27,4 +27,14 @@
</if>
</if>
order by create_time DESC
order by create_time DESC
</select>
</select>
<select
id=
"list"
resultType=
"map"
databaseId=
"oracle"
>
select
<include
refid=
"Base_Column_List"
></include>
from sys_notice
<if
test=
"condition != null and condition != ''"
>
where title like '%' || #{condition} || '%' or content like '%' || #{condition} || '%'
</if>
order by create_time DESC
</select>
</mapper>
</mapper>
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/OperationLogMapper.xml
View file @
297a786e
...
@@ -35,4 +35,19 @@
...
@@ -35,4 +35,19 @@
</if>
</if>
</select>
</select>
<select
id=
"getOperationLogs"
resultType=
"map"
databaseId=
"oracle"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_operation_log where 1 = 1
<if
test=
"beginTime != null and beginTime !='' and endTime != null and endTime != ''"
>
and (create_time between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
</if>
<if
test=
"logName != null and logName !=''"
>
and log_name like '%' || #{logName} || '%'
</if>
<if
test=
"logType != null and logType !=''"
>
and log_type like '%' || #{logType} || '%'
</if>
</select>
</mapper>
</mapper>
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/RoleMapper.xml
View file @
297a786e
...
@@ -31,6 +31,16 @@
...
@@ -31,6 +31,16 @@
order by sort asc
order by sort asc
</select>
</select>
<select
id=
"selectRoles"
resultType=
"map"
databaseId=
"oracle"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_role
<if
test=
"condition != null"
>
where name like '%' || #{condition} || '%'
</if>
order by sort asc
</select>
<delete
id=
"deleteRolesById"
>
<delete
id=
"deleteRolesById"
>
delete from sys_relation where role_id = #{roleId}
delete from sys_relation where role_id = #{roleId}
</delete>
</delete>
...
...
src/main/java/cn/stylefeng/guns/modular/system/mapper/mapping/UserMapper.xml
View file @
297a786e
...
@@ -51,6 +51,24 @@
...
@@ -51,6 +51,24 @@
</if>
</if>
</select>
</select>
<select
id=
"selectUsers"
resultType=
"map"
databaseId=
"oracle"
>
select
<include
refid=
"Base_Column_List"
/>
from sys_user
where status != 'DELETED'
<if
test=
"name != null and name != ''"
>
and (phone like '%' || #{name} || '%'
or account like '%' || #{name} || '%'
or name like '%' || #{name} || '%')
</if>
<if
test=
"deptId != null and deptId != 0"
>
and (dept_id = #{deptId} or dept_id in ( select dept_id from sys_dept where pids like '%[' || #{deptId} || ']%'))
</if>
<if
test=
"beginTime != null and beginTime != '' and endTime != null and endTime != ''"
>
and (create_time between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
</if>
</select>
<update
id=
"setStatus"
>
<update
id=
"setStatus"
>
update sys_user set status = #{status} where user_id = #{userId}
update sys_user set status = #{status} where user_id = #{userId}
</update>
</update>
...
...
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