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
7302bbf2
Commit
7302bbf2
authored
Nov 22, 2024
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
得到的
parent
31808043
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
29 deletions
+41
-29
C02-system/pps-core-system/src/main/java/pps/core/system/service/SysMenuService.java
...src/main/java/pps/core/system/service/SysMenuService.java
+0
-28
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysMenuViewMapper.xml
...rces/mybatis/mapper/pps/core/system/SysMenuViewMapper.xml
+41
-1
No files found.
C02-system/pps-core-system/src/main/java/pps/core/system/service/SysMenuService.java
View file @
7302bbf2
...
...
@@ -123,34 +123,6 @@ public class SysMenuService {
record
.
setOuId
(
session
.
getOuId
());
List
<
SysMenuView
>
viewList
=
mapper
.
selectSysMenuListByUserIdAndMediaType
(
record
);
List
<
QuerySysMenuOutputTree
>
list
=
XCopyUtils
.
copyNewList
(
viewList
,
QuerySysMenuOutputTree
.
class
);
//介质类型
CreateSysDictionaryInput
mediaTypesInput
=
new
CreateSysDictionaryInput
();
mediaTypesInput
.
setAlias
(
"MEDIUM_TYPE"
);
XListResult
<
QuerySysDictionaryViewOutput
>
mediaTypes
=
dictService
.
querySysDictionarysByAlias
(
context
,
mediaTypesInput
);
for
(
QuerySysMenuOutputTree
tree
:
list
)
{
if
(
CharSequenceUtil
.
isNotBlank
(
tree
.
getMenuType
()))
{
if
(
CharSequenceUtil
.
isBlank
(
tree
.
getBusinessTypeName
()))
{
tree
.
setBusinessTypeName
(
tree
.
getMenuType
());
}
//介质类型
if
(
CollUtil
.
isNotEmpty
(
mediaTypes
.
getResult
()))
{
StringBuilder
buffer
=
new
StringBuilder
();
for
(
String
mediaType
:
CharSequenceUtil
.
splitToArray
(
tree
.
getMediaType
(),
','
))
{
for
(
QuerySysDictionaryViewOutput
item
:
mediaTypes
.
getResult
())
{
if
(
CharSequenceUtil
.
equals
(
mediaType
,
item
.
getDicKey
()))
{
buffer
.
append
(
","
).
append
(
item
.
getDicName
());
}
}
}
if
(
buffer
.
length
()
>
0
)
{
tree
.
setMediaTypeName
(
buffer
.
substring
(
1
));
}
}
if
(
CharSequenceUtil
.
isBlank
(
tree
.
getMediaTypeName
()))
{
tree
.
setMediaTypeName
(
tree
.
getMediaType
());
}
}
}
List
<
QuerySysMenuOutputTree
>
trees
=
new
ArrayList
<>(
list
.
size
());
for
(
QuerySysMenuOutputTree
tree
:
list
)
{
if
(
CharSequenceUtil
.
isBlank
(
tree
.
getParentMenuId
()))
{
...
...
C02-system/pps-core-system/src/main/resources/mybatis/mapper/pps/core/system/SysMenuViewMapper.xml
View file @
7302bbf2
...
...
@@ -121,7 +121,47 @@
</select>
<select
id=
"selectSysMenuListByUserIdAndMediaType"
parameterType=
"pps.core.system.entity.SysMenuView"
resultMap=
"BaseResultMap"
>
resultMap=
"BaseResultMap"
databaseId=
"Oracle"
>
WITH TEMPS (ID, MENU_NAME, MENU_PATTERN, PARENT_MENU_ID, MENU_TYPE, MEDIA_TYPE, SORT, URL, APPLY_SCENE,
MENU_DESCRIBE, MENU_ICON) AS (SELECT ID,
MENU_NAME,
MENU_PATTERN,
PARENT_MENU_ID,
MENU_TYPE,
MEDIA_TYPE,
SORT,
URL,
APPLY_SCENE,
MENU_DESCRIBE,
MENU_ICON
FROM SYS_MENU SM
WHERE APPLY_SCENE = #{applyScene}
AND MEDIA_TYPE = 'ALL'
AND 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 ALL
SELECT A.ID,
A.MENU_NAME,
A.MENU_PATTERN,
A.PARENT_MENU_ID,
A.MENU_TYPE,
A.MEDIA_TYPE,
A.SORT,
A.URL,
A.APPLY_SCENE,
A.MENU_DESCRIBE,
A.MENU_ICON
FROM TEMPS SM
JOIN SYS_MENU A ON SM.PARENT_MENU_ID = A.ID)
SELECT DISTINCT TEMPS.*
FROM TEMPS
</select>
<select
id=
"selectSysMenuListByUserIdAndMediaType"
parameterType=
"pps.core.system.entity.SysMenuView"
resultMap=
"BaseResultMap"
databaseId=
"MySQL"
>
WITH RECURSIVE TEMPS AS
(SELECT *
FROM (SELECT ID,
...
...
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