Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
d8e32a0e
Commit
d8e32a0e
authored
Jun 08, 2022
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hyc 用户菜单字典调整
parent
c55c74da
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
14 deletions
+48
-14
MenuTypeEnum.java
...plus.v1/yifu/common/core/constant/enums/MenuTypeEnum.java
+5
-0
ErrorCodes.java
....cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
+10
-0
messages_zh_CN.properties
...on-core/src/main/resources/i18n/messages_zh_CN.properties
+17
-14
SysMenu.java
...com/yifu.cloud.plus.v1/yifu/admin/api/entity/SysMenu.java
+5
-0
SysDictItemServiceImpl.java
...us.v1/yifu/admin/service/impl/SysDictItemServiceImpl.java
+4
-0
SysMenuServiceImpl.java
...d.plus.v1/yifu/admin/service/impl/SysMenuServiceImpl.java
+5
-0
SysMenuMapper.xml
...yifu-upms-biz/src/main/resources/mapper/SysMenuMapper.xml
+2
-0
No files found.
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/constant/enums/MenuTypeEnum.java
View file @
d8e32a0e
...
...
@@ -29,6 +29,11 @@ import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
public
enum
MenuTypeEnum
{
/**
* 字典类型-系统内置(不可修改)
*/
SYSTEM
(
"0"
,
"系统内置"
),
/**
* 左侧菜单
*/
...
...
yifu-common/yifu-common-core/src/main/java/com/yifu.cloud.plus.v1/yifu/common/core/exception/ErrorCodes.java
View file @
d8e32a0e
...
...
@@ -63,6 +63,11 @@ public interface ErrorCodes {
*/
String
SYS_ROLE_NAMEORCODE_EXISTING
=
"sys.role.nameOrCode.existing"
;
/**
* 系统内置菜单不允许删除
*/
String
SYS_MENU_DELETE_SYSTEM
=
"sys.menu.delete.system"
;
/**
* 菜单存在下级节点 删除失败
*/
...
...
@@ -88,4 +93,9 @@ public interface ErrorCodes {
*/
String
SYS_APP_PHONE_UNREGISTERED
=
"sys.app.phone.unregistered"
;
/**
* 字典存在下级节点 删除失败
*/
String
SYS_DICT_DELETE_EXISTING
=
"sys.dict.delete.existing"
;
}
yifu-common/yifu-common-core/src/main/resources/i18n/messages_zh_CN.properties
View file @
d8e32a0e
sys.user.update.passwordError
=
\u
539
f
\u
5bc6
\u7801\u9519\u
8bef
\u
ff0c
\u
4fee
\u6539\u5931\u
8d
25
sys.user.query.error
=
\u
83
b7
\u
53d6
\u
5f53
\u
524d
\u7528\u6237\u
4fe1
\u
606f
\u5931\u
8d
25
sys.user.update.passwordError
=
\u
539
F
\u
5BC6
\u7801\u9519\u
8BEF
\u
FF0C
\u
4FEE
\u6539\u5931\u
8D
25
sys.user.query.error
=
\u
83
B7
\u
53D6
\u
5F53
\u
524D
\u7528\u6237\u
4FE1
\u
606F
\u5931\u
8D
25
sys.user.username.existing
=
{0}
\u7528\u6237\u
540D
\u
5DF2
\u
5B58
\u5728
sys.user.userInfo.empty
=
{0}
\u7528\u6237\u
4
fe1
\u
606f
\u
4e3a
\u
7a7a
sys.user.userInfo.empty
=
{0}
\u7528\u6237\u
4
FE1
\u
606F
\u
4E3A
\u
7A7A
sys.dept.deptName.inexistence
=
{0}
\u
90
e8
\u
95e8
\u
540d
\u
79f0
\u
4e0d
\u
5b
58
\u5728
sys.dept.deptName.inexistence
=
{0}
\u
90
E8
\u
95E8
\u
540D
\u
79F0
\u
4E0D
\u
5B
58
\u5728
sys.post.postName.inexistence
=
{0}
\u
5
c97
\u
4f4d
\u
540d
\u
79f0
\u
4e0d
\u
5b
58
\u5728
sys.post.nameOrCode.existing
=
{0} {1}
\u
5
c97
\u
4f4d
\u
540d
\u6216\u
5c97
\u
4f4d
\u
7f16
\u7801\u
5df2
\u
7ecf
\u
5b
58
\u5728
sys.post.postName.inexistence
=
{0}
\u
5
C97
\u
4F4D
\u
540D
\u
79F0
\u
4E0D
\u
5B
58
\u5728
sys.post.nameOrCode.existing
=
{0} {1}
\u
5
C97
\u
4F4D
\u
540D
\u6216\u
5C97
\u
4F4D
\u
7F16
\u7801\u
5DF2
\u
7ECF
\u
5B
58
\u5728
sys.role.roleName.inexistence
=
{0}
\u
89
d2
\u8272\u
540d
\u
79f0
\u
4e0d
\u
5b
58
\u5728
sys.role.nameOrCode.existing
=
{0} {1}
\u
89
d2
\u8272\u
540d
\u6216\u
89d2
\u8272\u
7f16
\u7801\u
5df2
\u
7ecf
\u
5b
58
\u5728
sys.role.roleName.inexistence
=
{0}
\u
89
D2
\u8272\u
540D
\u
79F0
\u
4E0D
\u
5B
58
\u5728
sys.role.nameOrCode.existing
=
{0} {1}
\u
89
D2
\u8272\u
540D
\u6216\u
89D2
\u8272\u
7F16
\u7801\u
5DF2
\u
7ECF
\u
5B
58
\u5728
sys.param.delete.system
=
\u
7
cfb
\u
7edf
\u5185\u
7f6e
\u
53c2
\u6570\u
4e0d
\u
80fd
\u5220\u9664
sys.param.delete.system
=
\u
7
CFB
\u
7EDF
\u5185\u
7F6E
\u
53C2
\u6570\u
4E0D
\u
80FD
\u5220\u9664
sys.param.config.error
=
{0}
\u
7CFB
\u
7EDF
\u
53C2
\u6570\u
914D
\u
7F6E
\u9519\u
8BEF
sys.menu.delete.existing
=
\u
83dc
\u5355\u
542b
\u6709\u
4e0b
\u
7ea7
\u
4e0d
\u
80fd
\u5220\u9664
sys.menu.delete.existing
=
\u
83DC
\u5355\u
542B
\u6709\u
4E0B
\u
7EA7
\u
4E0D
\u
80FD
\u5220\u9664
sys.menu.delete.system
=
\u
7CFB
\u
7EDF
\u5185\u
7F6E
\u
83DC
\u5355\u
4E0D
\u
80FD
\u5220\u9664
sys.app.sms.often
=
\u
9
a8c
\u
8bc1
\u7801\u
53d1
\u9001\u
8fc7
\u9891\u
7e
41
sys.app.phone.unregistered
=
{0}
\u
624
b
\u
673a
\u
53f7
\u
672a
\u
6ce8
\u
518c
sys.app.sms.often
=
\u
9
A8C
\u
8BC1
\u7801\u
53D1
\u9001\u
8FC7
\u9891\u
7E
41
sys.app.phone.unregistered
=
{0}
\u
624
B
\u
673A
\u
53F7
\u
672A
\u
6CE8
\u
518C
sys.dict.delete.system
=
\u
7cfb
\u
7edf
\u5185\u
7f6e
\u
5b57
\u5178\u9879\u
76ee
\u
4e0d
\u
80fd
\u5220\u9664
sys.dict.update.system
=
\u
7cfb
\u
7edf
\u5185\u
7f6e
\u
5b57
\u5178\u9879\u
76ee
\u
4e0d
\u
80fd
\u
4fee
\u6539
sys.dict.delete.system
=
\u
7CFB
\u
7EDF
\u5185\u
7F6E
\u
5B57
\u5178\u9879\u
76EE
\u
4E0D
\u
80FD
\u5220\u9664
sys.dict.update.system
=
\u
7CFB
\u
7EDF
\u5185\u
7F6E
\u
5B57
\u5178\u9879\u
76EE
\u
4E0D
\u
80FD
\u
4FEE
\u6539
sys.dict.delete.existing
=
\u
5B57
\u5178\u
5B58
\u5728\u
4E0B
\u
7EA7
\u8282\u
70B9
\u
4E0D
\u
80FD
\u5931\u
8D25
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/entity/SysMenu.java
View file @
d8e32a0e
...
...
@@ -110,4 +110,9 @@ public class SysMenu extends BaseEntity {
@Schema
(
description
=
"是否支持数据权限标识"
)
private
String
flag
;
/**
* 是否是系统内置
*/
@Schema
(
description
=
"是否系统内置"
)
private
String
systemFlag
;
}
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysDictItemServiceImpl.java
View file @
d8e32a0e
...
...
@@ -15,6 +15,7 @@
*/
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
service
.
impl
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.lang.tree.Tree
;
import
cn.hutool.core.lang.tree.TreeNode
;
import
cn.hutool.core.lang.tree.TreeUtil
;
...
...
@@ -62,6 +63,9 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
@Override
@CacheEvict
(
value
=
CacheConstants
.
DICT_DETAILS
,
allEntries
=
true
)
public
void
removeDictItem
(
Long
id
)
{
// 查询父节点为当前节点的节点
List
<
SysDictItem
>
dictList
=
this
.
list
(
Wrappers
.<
SysDictItem
>
query
().
lambda
().
eq
(
SysDictItem:
:
getParentId
,
id
));
Assert
.
isTrue
(
CollUtil
.
isEmpty
(
dictList
),
MsgUtils
.
getMessage
(
ErrorCodes
.
SYS_MENU_DELETE_EXISTING
));
// 根据ID查询字典ID
SysDictItem
dictItem
=
this
.
getById
(
id
);
SysDict
dict
=
dictService
.
getById
(
dictItem
.
getDictId
());
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/service/impl/SysMenuServiceImpl.java
View file @
d8e32a0e
...
...
@@ -79,6 +79,11 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
Assert
.
isTrue
(
CollUtil
.
isEmpty
(
menuList
),
MsgUtils
.
getMessage
(
ErrorCodes
.
SYS_MENU_DELETE_EXISTING
));
SysMenu
sysMenu
=
this
.
getById
(
id
);
// 系统内置
Assert
.
state
(!
MenuTypeEnum
.
SYSTEM
.
getType
().
equals
(
sysMenu
.
getSystemFlag
()),
MsgUtils
.
getMessage
(
ErrorCodes
.
SYS_MENU_DELETE_SYSTEM
));
sysRoleMenuMapper
.
delete
(
Wrappers
.<
SysRoleMenu
>
query
().
lambda
().
eq
(
SysRoleMenu:
:
getMenuId
,
id
));
// 删除当前菜单及其子菜单
return
this
.
removeById
(
id
);
...
...
yifu-upms/yifu-upms-biz/src/main/resources/mapper/SysMenuMapper.xml
View file @
d8e32a0e
...
...
@@ -34,6 +34,7 @@
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"flag"
property=
"flag"
/>
<result
column=
"system_flag"
property=
"systemFlag"
/>
</resultMap>
<!--通过角色查询菜单信息-->
...
...
@@ -49,6 +50,7 @@
sys_menu.type,
sys_menu.del_flag,
sys_menu.flag,
sys_menu.system_flag,
sys_menu.create_by,
sys_menu.create_time,
sys_menu.update_by,
...
...
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