Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gf_back
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianchao
gf_back
Commits
1f70c95f
Commit
1f70c95f
authored
Nov 13, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
得到的
parent
96ea2301
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
261 additions
and
218 deletions
+261
-218
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysAreaViewMapper.xml
...rces/mybatis/mapper/pps/core/system/SysAreaViewMapper.xml
+16
-13
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysAuthOuScopeViewMapper.xml
...batis/mapper/pps/core/system/SysAuthOuScopeViewMapper.xml
+6
-0
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysDictionaryViewMapper.xml
...ybatis/mapper/pps/core/system/SysDictionaryViewMapper.xml
+33
-21
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysMenuViewMapper.xml
...rces/mybatis/mapper/pps/core/system/SysMenuViewMapper.xml
+144
-137
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysOrganizationDictionaryViewMapper.xml
...r/pps/core/system/SysOrganizationDictionaryViewMapper.xml
+17
-12
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysOrganizationPropertyViewMapper.xml
...per/pps/core/system/SysOrganizationPropertyViewMapper.xml
+3
-0
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysOrganizationRelViewMapper.xml
...s/mapper/pps/core/system/SysOrganizationRelViewMapper.xml
+5
-1
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysOrganizationViewMapper.xml
...atis/mapper/pps/core/system/SysOrganizationViewMapper.xml
+1
-1
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysRoleMenuAuthViewMapper.xml
...atis/mapper/pps/core/system/SysRoleMenuAuthViewMapper.xml
+1
-0
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysUserOrganizationRelViewMapper.xml
...pper/pps/core/system/SysUserOrganizationRelViewMapper.xml
+19
-15
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysUserRoleRelViewMapper.xml
...batis/mapper/pps/core/system/SysUserRoleRelViewMapper.xml
+16
-16
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysUserViewMapper.xml
...rces/mybatis/mapper/pps/core/system/SysUserViewMapper.xml
+0
-2
No files found.
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysAreaViewMapper.xml
View file @
1f70c95f
...
...
@@ -8,6 +8,7 @@
<result
column=
"LEV"
property=
"lev"
/>
<result
column=
"CITY_CODE"
property=
"cityCode"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID
,
...
...
@@ -16,27 +17,29 @@
LEV,
CITY_CODE
</sql>
<select
id=
"selectOne"
parameterType=
"pps.core.system.entity.SysAreaView"
resultMap=
"BaseResultMap"
>
select
SELECT
<include
refid=
"Base_Column_List"
/>
from
SYS_AREA
where
id
=#{id}
FROM
SYS_AREA
WHERE
ID
=#{id}
</select>
<select
id=
"selectList"
parameterType=
"pps.core.system.entity.SysAreaView"
resultMap=
"BaseResultMap"
>
select
SELECT
<include
refid=
"Base_Column_List"
/>
from
SYS_AREA
where
id
=#{id}
FROM
SYS_AREA
WHERE
ID
=#{id}
</select>
<select
id=
"selectListAll"
parameterType=
"pps.core.system.entity.SysAreaView"
resultMap=
"BaseResultMap"
>
select
SELECT
<include
refid=
"Base_Column_List"
/>
from
SYS_AREA
FROM
SYS_AREA
WHERE
id
<>
120
ID
<>
120
ORDER BY
PARENT_ID,
id
...
...
@@ -77,8 +80,8 @@
</select>
<resultMap
id=
"ExtResultMap"
type=
"pps.core.system.entity.SysAreaView"
extends=
"BaseResultMap"
>
<result
column=
"PROVINCE"
property=
"province"
/>
<result
column=
"CITY"
property=
"city"
/>
<result
column=
"PROVINCE"
property=
"province"
/>
<result
column=
"CITY"
property=
"city"
/>
</resultMap>
<select
id=
"selectProvinceAndCity"
parameterType=
"list"
resultMap=
"ExtResultMap"
>
...
...
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysAuthOuScopeViewMapper.xml
View file @
1f70c95f
...
...
@@ -16,6 +16,7 @@
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID
,
...
...
@@ -30,6 +31,7 @@
MODIFY_BY_NAME,
MODIFY_TIME
</sql>
<select
id=
"selectOne"
parameterType=
"pps.core.system.entity.SysAuthOuScopeView"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
...
...
@@ -37,6 +39,7 @@
WHERE
id=#{id}
</select>
<select
id=
"selectList"
parameterType=
"pps.core.system.entity.SysAuthOuScopeView"
resultMap=
"BaseResultMap"
>
SELECT C.ID,C.OU_ID,C.MENU_ID,A.OU_NAME,B.MENU_NAME,C.CREATE_BY_NAME,C.CREATE_TIME
FROM SYS_ORGANIZATION A ,SYS_MENU B,SYS_AUTH_OU_SCOPE C
...
...
@@ -47,6 +50,7 @@
</if>
ORDER BY A.OU_NAME ASC ,C.CREATE_TIME DESC
</select>
<select
id=
"selectListByUserGroupId"
parameterType=
"pps.core.system.entity.SysAuthOuScopeView"
resultMap=
"BaseResultMap"
>
SELECT
...
...
@@ -68,6 +72,7 @@
AND SAU.USER_GROUP_ID =#{userGroupId}
</if>
</select>
<select
id=
"selectOuIdsByUserId"
parameterType=
"pps.core.system.entity.SysAuthOuScopeView"
resultMap=
"BaseResultMap"
>
SELECT OU_ID, OU_NAME
...
...
@@ -99,6 +104,7 @@
LEFT JOIN SYS_ORGANIZATION SO ON SAOS.OU_ID=SO.ID AND SO.IS_DELETED =1
)
</select>
<select
id=
"selectOuMediaTypeByUserId"
parameterType=
"pps.core.system.entity.SysAuthOuScopeView"
resultType=
"pps.core.system.entity.SysAuthOuScopeView"
>
SELECT 'GAS' AS MEDIA_TYPE
...
...
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysDictionaryViewMapper.xml
View file @
1f70c95f
...
...
@@ -2,28 +2,29 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pps.core.system.mapper.SysDictionaryViewMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"pps.core.system.entity.SysDictionaryView"
>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"PID"
property=
"pid"
/>
<result
column=
"DIC_NAME"
property=
"dicName"
/>
<result
column=
"SHORT_NAME"
property=
"shortName"
/>
<result
column=
"REMARK"
property=
"remark"
/>
<result
column=
"SORT"
property=
"sort"
/>
<result
column=
"LEVELS"
property=
"levels"
/>
<result
column=
"BE_DEFAULT"
property=
"beDefault"
/>
<result
column=
"BE_HAS_CHILDREN"
property=
"beHasChildren"
/>
<result
column=
"DIC_TYPE"
property=
"dicType"
/>
<result
column=
"EFFECT_TIME"
property=
"effectTime"
/>
<result
column=
"END_TIME"
property=
"endTime"
/>
<result
column=
"CREATE_NAME"
property=
"createName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_NAME"
property=
"modifyName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"ALIAS"
property=
"alias"
/>
<result
column=
"DIC_KEY"
property=
"dicKey"
/>
<result
column=
"DIC_PATH"
property=
"dicPath"
/>
<result
column=
"USE_LOWER_LEVEL"
property=
"useLowerLevel"
/>
<result
column=
"OU_NAME"
property=
"ouName"
/>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"PID"
property=
"pid"
/>
<result
column=
"DIC_NAME"
property=
"dicName"
/>
<result
column=
"SHORT_NAME"
property=
"shortName"
/>
<result
column=
"REMARK"
property=
"remark"
/>
<result
column=
"SORT"
property=
"sort"
/>
<result
column=
"LEVELS"
property=
"levels"
/>
<result
column=
"BE_DEFAULT"
property=
"beDefault"
/>
<result
column=
"BE_HAS_CHILDREN"
property=
"beHasChildren"
/>
<result
column=
"DIC_TYPE"
property=
"dicType"
/>
<result
column=
"EFFECT_TIME"
property=
"effectTime"
/>
<result
column=
"END_TIME"
property=
"endTime"
/>
<result
column=
"CREATE_NAME"
property=
"createName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_NAME"
property=
"modifyName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"ALIAS"
property=
"alias"
/>
<result
column=
"DIC_KEY"
property=
"dicKey"
/>
<result
column=
"DIC_PATH"
property=
"dicPath"
/>
<result
column=
"USE_LOWER_LEVEL"
property=
"useLowerLevel"
/>
<result
column=
"OU_NAME"
property=
"ouName"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID
,
...
...
@@ -46,6 +47,7 @@
DIC_PATH,
DIC_KEY
</sql>
<select
id=
"selectOne"
parameterType=
"pps.core.system.entity.SysDictionaryView"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
...
...
@@ -53,6 +55,7 @@
WHERE
ID=#{id}
</select>
<select
id=
"selectList"
parameterType=
"pps.core.system.entity.SysDictionaryView"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
...
...
@@ -60,6 +63,7 @@
WHERE
ID=#{id}
</select>
<select
id=
"selectListsByParentIds"
parameterType=
"pps.core.system.entity.SysDictionaryView"
resultMap=
"BaseResultMap"
>
SELECT
...
...
@@ -74,6 +78,7 @@
</if>
ORDER BY SORT
</select>
<select
id=
"selectListsByParentCodes"
parameterType=
"pps.core.system.entity.SysDictionaryView"
resultMap=
"BaseResultMap"
>
SELECT
...
...
@@ -89,6 +94,7 @@
</where>
ORDER BY CREATE_TIME DESC
</select>
<select
id=
"selectListsByAlias"
parameterType=
"pps.core.system.entity.SysDictionaryView"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
...
...
@@ -103,6 +109,7 @@
)
ORDER BY CREATE_TIME DESC
</select>
<select
id=
"selectListsByByDicKeys"
parameterType=
"pps.core.system.entity.SysDictionaryView"
resultMap=
"BaseResultMap"
>
SELECT
...
...
@@ -126,6 +133,7 @@
</where>
ORDER BY CREATE_TIME DESC
</select>
<select
id=
"selectSysDictionaryTree"
resultType=
"pps.core.system.entity.SysDictionaryView"
>
SELECT DISTINCT SD.ID, SD.PID, SD.DIC_NAME, SD.SORT
FROM SYS_DICTIONARY SD
...
...
@@ -199,6 +207,7 @@
LEFT JOIN SYS_ORGANIZATION_DICTIONARY AASD ON A.OU_ID = AASD.OU_ID AND A.ID=AASD.DIC_CODE
WHERE AASD.END_TIME >NOW()
</select>
<select
id=
"selectListByConditionByPage"
parameterType=
"pps.core.system.entity.SysDictionaryView"
resultMap=
"BaseResultMap"
>
SELECT A.OU_NAME,A.OU_ID,A.ID,A.ID AS DIC_CODE,ASD.PID AS
...
...
@@ -219,6 +228,7 @@
ORDER BY ASD.EFFECT_TIME DESC
LIMIT #{startRow},#{endRow}
</select>
<select
id=
"selectListByConditionByCount"
parameterType=
"pps.core.system.entity.SysDictionaryView"
resultType=
"java.lang.Integer"
>
SELECT COUNT(0) FROM (
...
...
@@ -235,6 +245,7 @@
AND SOD.OU_ID=#{ouId}
</if>
)A
</select>
<select
id=
"selectChildListByCondition"
parameterType=
"pps.core.system.entity.SysDictionaryView"
resultMap=
"BaseResultMap"
>
SELECT A.OU_NAME,
...
...
@@ -261,6 +272,7 @@
AND SOD.DIC_CODE IS NOT NULL) A
LEFT JOIN SYS_DICTIONARY ASD ON ASD.ID = A.ID
</select>
<select
id=
"selectListByEquipmentType"
parameterType=
"pps.core.system.entity.SysDictionaryView"
resultMap=
"BaseResultMap"
>
WITH RECURSIVE TEMPS AS
...
...
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysMenuViewMapper.xml
View file @
1f70c95f
...
...
@@ -2,33 +2,34 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pps.core.system.mapper.SysMenuViewMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"pps.core.system.entity.SysMenuView"
>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"MENU_NAME"
property=
"menuName"
/>
<result
column=
"PARENT_MENU_ID"
property=
"parentMenuId"
/>
<result
column=
"IS_VISIABLE"
property=
"isVisiable"
/>
<result
column=
"IS_HAS_SCOPE"
property=
"isHasScope"
/>
<result
column=
"SORT"
property=
"sort"
/>
<result
column=
"IS_HAS_CHILDREN"
property=
"isHasChildren"
/>
<result
column=
"URL"
property=
"url"
/>
<result
column=
"IS_EXTERNAL"
property=
"isExternal"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"IS_HAS_APPEAR"
property=
"isHasAppear"
/>
<result
column=
"MENU_TYPE"
property=
"menuType"
/>
<result
column=
"MEDIA_TYPE"
property=
"mediaType"
/>
<result
column=
"LEVEL"
property=
"level"
/>
<result
column=
"MENU_DESCRIBE"
property=
"menuDescribe"
/>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"MENU_NAME"
property=
"menuName"
/>
<result
column=
"PARENT_MENU_ID"
property=
"parentMenuId"
/>
<result
column=
"IS_VISIABLE"
property=
"isVisiable"
/>
<result
column=
"IS_HAS_SCOPE"
property=
"isHasScope"
/>
<result
column=
"SORT"
property=
"sort"
/>
<result
column=
"IS_HAS_CHILDREN"
property=
"isHasChildren"
/>
<result
column=
"URL"
property=
"url"
/>
<result
column=
"IS_EXTERNAL"
property=
"isExternal"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"IS_HAS_APPEAR"
property=
"isHasAppear"
/>
<result
column=
"MENU_TYPE"
property=
"menuType"
/>
<result
column=
"MEDIA_TYPE"
property=
"mediaType"
/>
<result
column=
"LEVEL"
property=
"level"
/>
<result
column=
"MENU_DESCRIBE"
property=
"menuDescribe"
/>
<result
column=
"SHOW_CHILDREN"
property=
"showChildren"
/>
<result
column=
"MENU_PATTERN"
property=
"menuPattern"
/>
<result
column=
"FILL_CONF_ID"
property=
"fillConfId"
/>
<result
column=
"MENU_PATTERN"
property=
"menuPattern"
/>
<result
column=
"FILL_CONF_ID"
property=
"fillConfId"
/>
<result
column=
"SHOW_HOME"
property=
"showHome"
/>
<result
column=
"APPLY_SCENE"
property=
"applyScene"
/>
<result
column=
"MENU_ICON"
property=
"menuIcon"
/>
<result
column=
"APPLY_SCENE"
property=
"applyScene"
/>
<result
column=
"MENU_ICON"
property=
"menuIcon"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID
,
...
...
@@ -56,10 +57,12 @@
APPLY_SCENE,
MENU_ICON
</sql>
<update
id=
"updateShowChildren"
parameterType=
"pps.core.system.entity.SysMenuView"
>
UPDATE SYS_MENU
SET SHOW_CHILDREN=#{showChildren}
</update>
<select
id=
"selectOne"
parameterType=
"pps.core.system.entity.SysMenuView"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
...
...
@@ -67,6 +70,7 @@
WHERE
ID=#{id}
</select>
<select
id=
"selectList"
parameterType=
"pps.core.system.entity.SysMenuView"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
...
...
@@ -107,6 +111,7 @@
</where>
ORDER BY CREATE_TIME DESC
</select>
<select
id=
"selectMaxSort"
parameterType=
"String"
resultType=
"pps.core.system.entity.SysMenuView"
>
SELECT MAX(SM.SORT) AS SORT,
SM.PARENT_MENU_ID
...
...
@@ -156,9 +161,11 @@
SELECT DISTINCT TEMPS.*
FROM TEMPS
</select>
<select
id=
"selectMediumTypeByUserId"
parameterType=
"pps.core.system.entity.SysMenuView"
resultMap=
"BaseResultMap"
>
SELECT 'GAS' AS MEDIA_TYPE
</select>
<select
id=
"selectParentMenus"
parameterType=
"pps.core.system.entity.SysMenuView"
resultMap=
"BaseResultMap"
>
SELECT T.ID, T.MENU_NAME, T.PARENT_MENU_ID
FROM (WITH RECURSIVE TEMPS AS
...
...
@@ -176,134 +183,134 @@
<select
id=
"selectMenuForThreeLevelList"
parameterType=
"pps.core.system.entity.SysMenuView"
resultType=
"pps.core.system.entity.SysMenuView"
>
select id
,
menu_name
,
menu_pattern
,
parent_menu_id
,
is_visiable
,
is_has_scope
,
sort
,
is_has_children
,
url
,
is_external
,
create_by_id
,
create_by_name
,
SELECT ID
,
MENU_NAME
,
MENU_PATTERN
,
PARENT_MENU_ID
,
IS_VISIABLE
,
IS_HAS_SCOPE
,
SORT
,
IS_HAS_CHILDREN
,
URL
,
IS_EXTERNAL
,
CREATE_BY_ID
,
CREATE_BY_NAME
,
CREATE_TIME,
modify_by_id
,
modify_by_name
,
modify_time
,
is_has_appear
,
menu_type
,
media_type
,
`
level
`,
menu_describe
,
show_children
,
menu_icon
from
SYS_MENU
where url like
'/%'
order by sort asc
MODIFY_BY_ID
,
MODIFY_BY_NAME
,
MODIFY_TIME
,
IS_HAS_APPEAR
,
MENU_TYPE
,
MEDIA_TYPE
,
`
LEVEL
`,
MENU_DESCRIBE
,
SHOW_CHILDREN
,
MENU_ICON
FROM
SYS_MENU
WHERE URL LIKE
'/%'
ORDER BY SORT ASC
</select>
<select
id=
"selectSysMenuListByMenuName"
parameterType=
"pps.core.system.entity.SysMenuView"
resultMap=
"BaseResultMap"
>
with RECURSIVE temps as
(select sm.id,
sm.menu_name,
sm.parent_menu_id,
sm.sort,
sm.url,
sm.media_type,
sm.menu_type,
sm.menu_pattern,
sm.menu_describe,
sm.menu_icon
from SYS_MENU sm
where menu_name like concat('%', #{menuName}, '%')
and apply_scene = #{applyScene}
union
select sm.id,
sm.menu_name,
sm.parent_menu_id,
sm.sort,
sm.url,
sm.media_type,
sm.menu_type,
sm.menu_pattern,
sm.menu_describe,
sm.menu_icon
from temps
inner join SYS_MENU sm on temps.parent_menu_id = sm.id)
select temps.*
from temps
WITH RECURSIVE TEMPS AS
(SELECT SM.ID,
SM.MENU_NAME,
SM.PARENT_MENU_ID,
SM.SORT,
SM.URL,
SM.MEDIA_TYPE,
SM.MENU_TYPE,
SM.MENU_PATTERN,
SM.MENU_DESCRIBE,
SM.MENU_ICON
FROM SYS_MENU SM
WHERE MENU_NAME LIKE CONCAT('%', #{menuName}, '%')
AND APPLY_SCENE = #{applyScene}
UNION
SELECT SM.ID,
SM.MENU_NAME,
SM.PARENT_MENU_ID,
SM.SORT,
SM.URL,
SM.MEDIA_TYPE,
SM.MENU_TYPE,
SM.MENU_PATTERN,
SM.MENU_DESCRIBE,
SM.MENU_ICON
FROM TEMPS
INNER JOIN SYS_MENU SM ON TEMPS.PARENT_MENU_ID = SM.ID)
SELECT TEMPS.*
FROM TEMPS
</select>
<select
id=
"getMenusByUserId"
parameterType=
"pps.core.system.entity.SysMenuView"
resultMap=
"BaseResultMap"
>
select *
from (select *
from (select id,
menu_name,
menu_type,
media_type,
sort,
url,
cast(substring(url, position('=' in url) + 1) as varchar) as fill_conf_id,
true as show_home,
menu_icon
from SYS_MENU sm
where sm.id in (select menu_id
from SYS_ROLE_MENU_AUTH srma
where srma.role_id in (select role_id
from SYS_USER_ROLE_REL surr
where surr.user_id = #{userId})))
where media_type like concat('%', #{mediaType}, '%')
or media_type = 'ALL')
where url like concat('%', '/fillProgress?fillConfId', '%')
<select
id=
"getMenusByUserId"
parameterType=
"pps.core.system.entity.SysMenuView"
resultMap=
"BaseResultMap"
>
SELECT *
FROM (SELECT *
FROM (SELECT ID,
MENU_NAME,
MENU_TYPE,
MEDIA_TYPE,
SORT,
URL,
CAST(SUBSTRING(URL, POSITION('=' IN URL) + 1) AS VARCHAR) AS FILL_CONF_ID,
TRUE AS SHOW_HOME,
MENU_ICON
FROM SYS_MENU SM
WHERE SM.ID IN (SELECT MENU_ID
FROM SYS_ROLE_MENU_AUTH SRMA
WHERE SRMA.ROLE_ID IN (SELECT ROLE_ID
FROM SYS_USER_ROLE_REL SURR
WHERE SURR.USER_ID = #{userId})))
WHERE MEDIA_TYPE LIKE CONCAT('%', #{mediaType}, '%')
OR MEDIA_TYPE = 'ALL')
WHERE URL LIKE CONCAT('%', '/fillProgress?fillConfId', '%')
</select>
<select
id=
"selectSysMenuListByUserId"
parameterType=
"pps.core.system.entity.SysMenuView"
resultMap=
"BaseResultMap"
>
WITH RECURSIVE
temps AS (SELECT id
,
menu_name
,
menu_pattern
,
parent_menu_id
,
menu_type
,
media_type
,
sort
,
url
,
menu_describe
,
menu_icon
FROM SYS_MENU
sm
WHERE
sm.id IN (SELECT menu_id
FROM SYS_ROLE_MENU_AUTH
srma
WHERE
srma.role_id IN (SELECT role_id
FROM SYS_USER_ROLE_REL
surr
WHERE
surr.user_id
= #{userId}))
WITH RECURSIVE
TEMPS AS (SELECT ID
,
MENU_NAME
,
MENU_PATTERN
,
PARENT_MENU_ID
,
MENU_TYPE
,
MEDIA_TYPE
,
SORT
,
URL
,
MENU_DESCRIBE
,
MENU_ICON
FROM SYS_MENU
SM
WHERE
SM.ID IN (SELECT MENU_ID
FROM SYS_ROLE_MENU_AUTH
SRMA
WHERE
SRMA.ROLE_ID IN (SELECT ROLE_ID
FROM SYS_USER_ROLE_REL
SURR
WHERE
SURR.USER_ID
= #{userId}))
UNION
SELECT
a.id
,
a.menu_name
,
a.menu_pattern
,
a.parent_menu_id
,
a.menu_type
,
a.media_type
,
a.sort
,
a.url
,
a.menu_describe
,
a.menu_icon
FROM
temps
INNER JOIN SYS_MENU
a ON temps.parent_menu_id = a.id
)
SELECT DISTINCT
temps
.*
FROM
temps
SELECT
A.ID
,
A.MENU_NAME
,
A.MENU_PATTERN
,
A.PARENT_MENU_ID
,
A.MENU_TYPE
,
A.MEDIA_TYPE
,
A.SORT
,
A.URL
,
A.MENU_DESCRIBE
,
A.MENU_ICON
FROM
TEMPS
INNER JOIN SYS_MENU
A ON TEMPS.PARENT_MENU_ID = A.ID
)
SELECT DISTINCT
TEMPS
.*
FROM
TEMPS
</select>
<select
id=
"selectCountByParentMenuIds"
parameterType=
"pps.core.system.entity.SysMenuView"
resultMap=
"BaseResultMap"
>
select
count(so.id) as id
,
so.parent_menu_id
from SYS_MENU so
where so.parent_menu_id in
SELECT
COUNT(SO.ID) AS ID
,
SO.PARENT_MENU_ID
FROM SYS_MENU SO
WHERE SO.PARENT_MENU_ID IN
<foreach
collection=
"list"
open=
"("
close=
")"
separator=
","
item=
"item"
>
#{item}
</foreach>
group by so.parent_menu_id
GROUP BY SO.PARENT_MENU_ID
</select>
</mapper>
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysOrganizationDictionaryViewMapper.xml
View file @
1f70c95f
...
...
@@ -2,19 +2,20 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pps.core.system.mapper.SysOrganizationDictionaryViewMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"pps.core.system.entity.SysOrganizationDictionaryView"
>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"OU_ID"
property=
"ouId"
/>
<result
column=
"PARENT_DIC_CODE"
property=
"parentDicCode"
/>
<result
column=
"DIC_CODE"
property=
"dicCode"
/>
<result
column=
"EFFECT_TIME"
property=
"effectTime"
/>
<result
column=
"END_TIME"
property=
"endTime"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"OU_ID"
property=
"ouId"
/>
<result
column=
"PARENT_DIC_CODE"
property=
"parentDicCode"
/>
<result
column=
"DIC_CODE"
property=
"dicCode"
/>
<result
column=
"EFFECT_TIME"
property=
"effectTime"
/>
<result
column=
"END_TIME"
property=
"endTime"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID
,
...
...
@@ -30,6 +31,7 @@
MODIFY_BY_NAME,
MODIFY_TIME
</sql>
<select
id=
"selectOne"
parameterType=
"pps.core.system.entity.SysOrganizationDictionaryView"
resultMap=
"BaseResultMap"
>
SELECT
...
...
@@ -38,6 +40,7 @@
WHERE
ID=#{id}
</select>
<select
id=
"selectList"
parameterType=
"pps.core.system.entity.SysOrganizationDictionaryView"
resultMap=
"BaseResultMap"
>
SELECT
...
...
@@ -46,6 +49,7 @@
WHERE
ID=#{id}
</select>
<select
id=
"selectListByOuId"
parameterType=
"pps.core.system.entity.SysOrganizationDictionaryView"
resultMap=
"BaseResultMap"
>
SELECT
...
...
@@ -56,6 +60,7 @@
AND OU_ID=#{ouId}
</if>
</select>
<select
id=
"selectListByDictionaryOuId"
parameterType=
"pps.core.system.entity.SysOrganizationDictionaryView"
resultMap=
"BaseResultMap"
>
SELECT A.DIC_CODE,
...
...
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysOrganizationPropertyViewMapper.xml
View file @
1f70c95f
...
...
@@ -15,6 +15,7 @@
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID
,
...
...
@@ -30,6 +31,7 @@
MODIFY_BY_NAME,
MODIFY_TIME
</sql>
<select
id=
"selectOne"
parameterType=
"pps.core.system.entity.SysOrganizationPropertyView"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
...
...
@@ -37,6 +39,7 @@
WHERE
ID=#{id}
</select>
<select
id=
"selectList"
parameterType=
"pps.core.system.entity.SysOrganizationPropertyView"
resultMap=
"BaseResultMap"
>
SELECT
...
...
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysOrganizationRelViewMapper.xml
View file @
1f70c95f
...
...
@@ -18,6 +18,7 @@
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID
,
...
...
@@ -36,6 +37,7 @@
MODIFY_BY_NAME,
MODIFY_TIME
</sql>
<select
id=
"selectOne"
parameterType=
"pps.core.system.entity.SysOrganizationRelView"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
...
...
@@ -43,6 +45,7 @@
WHERE
ID=#{id}
</select>
<select
id=
"selectList"
parameterType=
"pps.core.system.entity.SysOrganizationRelView"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
...
...
@@ -50,12 +53,14 @@
WHERE
ID=#{id}
</select>
<select
id=
"selectEffective"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM SYS_ORGANIZATION_REL
WHERE EFFECT_TIME
<
= now() AND END_TIME
>
= now()
</select>
<select
id=
"selectMaxSort"
parameterType=
"String"
resultType=
"pps.core.system.entity.SysOrganizationRelView"
>
SELECT MAX(SOR.SORT) AS SORT,
SOR.PARENT_OU_ID
...
...
@@ -72,5 +77,4 @@
LEFT JOIN SYS_ORGANIZATION_REL SOR2 ON SOR.PARENT_OU_ID = SOR2.OU_ID
WHERE SOR2.PARENT_OU_ID = #{ouId}
</select>
</mapper>
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysOrganizationViewMapper.xml
View file @
1f70c95f
...
...
@@ -80,7 +80,7 @@
SELECT
<include
refid=
"Base_Column_List"
/>
FROM SYS_ORGANIZATION
WHERE IS_DELETED =1
WHERE IS_DELETED =
1
</select>
<select
id=
"selectSysOrganizationList"
parameterType=
"pps.core.system.entity.SysOrganizationView"
...
...
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysRoleMenuAuthViewMapper.xml
View file @
1f70c95f
...
...
@@ -12,6 +12,7 @@
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID
,
...
...
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysUserOrganizationRelViewMapper.xml
View file @
1f70c95f
...
...
@@ -2,22 +2,22 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pps.core.system.mapper.SysUserOrganizationRelViewMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"pps.core.system.entity.SysUserOrganizationRelView"
>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"OU_ID"
property=
"ouId"
/>
<result
column=
"USER_ID"
property=
"userId"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"EFFECT_TIME"
property=
"effectTime"
/>
<result
column=
"END_TIME"
property=
"endTime"
/>
<result
column=
"OU_NAME"
property=
"ouName"
/>
<result
column=
"STATION_ID"
property=
"stationId"
/>
<result
column=
"STATION_NAME"
property=
"stationName"
/>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"OU_ID"
property=
"ouId"
/>
<result
column=
"USER_ID"
property=
"userId"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<result
column=
"EFFECT_TIME"
property=
"effectTime"
/>
<result
column=
"END_TIME"
property=
"endTime"
/>
<result
column=
"OU_NAME"
property=
"ouName"
/>
<result
column=
"STATION_ID"
property=
"stationId"
/>
<result
column=
"STATION_NAME"
property=
"stationName"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
ID
,
...
...
@@ -32,6 +32,7 @@
EFFECT_TIME,
END_TIME
</sql>
<select
id=
"selectOne"
parameterType=
"pps.core.system.entity.SysUserOrganizationRelView"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
...
...
@@ -39,6 +40,7 @@
WHERE
ID=#{id}
</select>
<select
id=
"selectList"
parameterType=
"pps.core.system.entity.SysUserOrganizationRelView"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
...
...
@@ -46,12 +48,14 @@
WHERE
ID=#{id}
</select>
<select
id=
"selectOrgList"
parameterType=
"pps.core.system.entity.SysUserOrganizationRelView"
resultType=
"pps.core.system.entity.SysOrganizationView"
>
SELECT *
FROM SYS_ORGANIZATION
WHERE IS_DELETED = 1
</select>
<select
id=
"getSysOrganizationByUserId"
parameterType=
"pps.core.system.entity.SysUserOrganizationRelView"
resultMap=
"BaseResultMap"
>
SELECT DISTINCT SUOR.ID,
...
...
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysUserRoleRelViewMapper.xml
View file @
1f70c95f
...
...
@@ -2,21 +2,21 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pps.core.system.mapper.SysUserRoleRelViewMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"pps.core.system.entity.SysUserRoleRelView"
>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"ROLE_ID"
property=
"roleId"
/>
<result
column=
"ROLE_NAME"
property=
"roleName"
/>
<result
column=
"USER_ID"
property=
"userId"
/>
<result
column=
"LOGIN_NAME"
property=
"loginName"
/>
<result
column=
"USER_NAME"
property=
"userName"
/>
<result
column=
"OU_ID"
property=
"ouId"
/>
<result
column=
"OU_NAME"
property=
"ouName"
/>
<result
column=
"CONCAT_OU_NAME"
property=
"concatOuName"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
<id
column=
"ID"
property=
"id"
/>
<result
column=
"ROLE_ID"
property=
"roleId"
/>
<result
column=
"ROLE_NAME"
property=
"roleName"
/>
<result
column=
"USER_ID"
property=
"userId"
/>
<result
column=
"LOGIN_NAME"
property=
"loginName"
/>
<result
column=
"USER_NAME"
property=
"userName"
/>
<result
column=
"OU_ID"
property=
"ouId"
/>
<result
column=
"OU_NAME"
property=
"ouName"
/>
<result
column=
"CONCAT_OU_NAME"
property=
"concatOuName"
/>
<result
column=
"CREATE_BY_ID"
property=
"createById"
/>
<result
column=
"CREATE_BY_NAME"
property=
"createByName"
/>
<result
column=
"CREATE_TIME"
property=
"createTime"
/>
<result
column=
"MODIFY_BY_ID"
property=
"modifyById"
/>
<result
column=
"MODIFY_BY_NAME"
property=
"modifyByName"
/>
<result
column=
"MODIFY_TIME"
property=
"modifyTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
...
...
@@ -112,7 +112,7 @@
<select
id=
"selectListByRoleIds"
parameterType=
"pps.core.system.entity.SysUserRoleRelView"
resultMap=
"BaseResultMap"
>
SELECT DISTINCT
SU.ID
,
SU.ID,
SU.USER_NAME,
SU.LOGIN_NAME,
SU.PHONE
...
...
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysUserViewMapper.xml
View file @
1f70c95f
...
...
@@ -258,7 +258,6 @@
#{item}
</foreach>
</if>
</where>
</select>
...
...
@@ -278,7 +277,6 @@
<if
test=
"userName != null and userName!= ''"
>
AND SU.USER_NAME LIKE CONCAT('%',#{userName},'%')
</if>
</where>
</select>
...
...
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