Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jeecg
jeecg-boot
提交
13ae66bc
J
jeecg-boot
项目概览
jeecg
/
jeecg-boot
上一次同步 3 年多
通知
865
Star
24375
Fork
84
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jeecg-boot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
13ae66bc
编写于
3月 18, 2019
作者:
JEECG低代码平台
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
还原
上级
6084bb23
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
13 deletion
+12
-13
jeecg-boot/src/main/java/org/jeecg/modules/system/controller/SysPermissionController.java
...cg/modules/system/controller/SysPermissionController.java
+12
-13
未找到文件。
jeecg-boot/src/main/java/org/jeecg/modules/system/controller/SysPermissionController.java
浏览文件 @
13ae66bc
...
...
@@ -78,7 +78,7 @@ public class SysPermissionController {
/**
* 查询用户
拥有的菜单权限和按钮权限(根据用户账号)
* 查询用户
的权限
* @return
*/
@RequestMapping
(
value
=
"/queryByUser"
,
method
=
RequestMethod
.
GET
)
...
...
@@ -118,7 +118,7 @@ public class SysPermissionController {
@RequestMapping
(
value
=
"/edit"
,
method
=
{
RequestMethod
.
PUT
,
RequestMethod
.
POST
})
@RequiresRoles
({
"admin"
})
public
Result
<
SysPermission
>
e
di
t
(
@RequestBody
SysPermission
permission
)
{
public
Result
<
SysPermission
>
e
id
t
(
@RequestBody
SysPermission
permission
)
{
Result
<
SysPermission
>
result
=
new
Result
<>();
try
{
sysPermissionService
.
editPermission
(
permission
);
...
...
@@ -264,12 +264,12 @@ public class SysPermissionController {
SysPermissionTree
tree
=
new
SysPermissionTree
(
permission
);
if
(
temp
==
null
&&
oConvertUtils
.
isEmpty
(
tempPid
))
{
treeList
.
add
(
tree
);
if
(
!
tree
.
getIsLeaf
()
)
{
if
(
tree
.
getIsLeaf
()==
0
)
{
getTreeList
(
treeList
,
metaList
,
tree
);
}
}
else
if
(
temp
!=
null
&&
tempPid
!=
null
&&
tempPid
.
equals
(
temp
.
getId
())){
temp
.
getChildren
().
add
(
tree
);
if
(
!
tree
.
getIsLeaf
()
)
{
if
(
tree
.
getIsLeaf
()==
0
)
{
getTreeList
(
treeList
,
metaList
,
tree
);
}
}
...
...
@@ -283,12 +283,12 @@ public class SysPermissionController {
TreeModel
tree
=
new
TreeModel
(
permission
);
if
(
temp
==
null
&&
oConvertUtils
.
isEmpty
(
tempPid
))
{
treeList
.
add
(
tree
);
if
(
!
tree
.
getIsLeaf
()
)
{
if
(
permission
.
getIsLeaf
()==
0
)
{
getTreeModelList
(
treeList
,
metaList
,
tree
);
}
}
else
if
(
temp
!=
null
&&
tempPid
!=
null
&&
tempPid
.
equals
(
temp
.
getKey
())){
temp
.
getChildren
().
add
(
tree
);
if
(
!
tree
.
getIsLeaf
()
)
{
if
(
permission
.
getIsLeaf
()==
0
)
{
getTreeModelList
(
treeList
,
metaList
,
tree
);
}
}
...
...
@@ -310,12 +310,11 @@ public class SysPermissionController {
JSONObject
json
=
getPermissionJsonObject
(
permission
);
if
(
parentJson
==
null
&&
oConvertUtils
.
isEmpty
(
tempPid
))
{
jsonArray
.
add
(
json
);
if
(
!
permission
.
isLeaf
()
)
{
if
(
permission
.
getIsLeaf
()==
0
)
{
getPermissionJsonArray
(
jsonArray
,
metaList
,
json
);
}
}
else
if
(
parentJson
!=
null
&&
oConvertUtils
.
isNotEmpty
(
tempPid
)
&&
tempPid
.
equals
(
parentJson
.
getString
(
"id"
))){
//类型( 0:一级菜单 1:子菜单 2:按钮 )
if
(
permission
.
getMenuType
()==
2
)
{
if
(
permission
.
getMenuType
()==
0
)
{
JSONObject
metaJson
=
parentJson
.
getJSONObject
(
"meta"
);
if
(
metaJson
.
containsKey
(
"permissionList"
))
{
metaJson
.
getJSONArray
(
"permissionList"
).
add
(
json
);
...
...
@@ -324,8 +323,8 @@ public class SysPermissionController {
permissionList
.
add
(
json
);
metaJson
.
put
(
"permissionList"
,
permissionList
);
}
//类型( 0:一级菜单 1:子菜单 2:按钮 )
}
else
if
(
permission
.
getMenuType
()==
1
||
permission
.
getMenuType
()==
0
)
{
}
else
if
(
permission
.
getMenuType
()==
1
)
{
if
(
parentJson
.
containsKey
(
"children"
))
{
parentJson
.
getJSONArray
(
"children"
).
add
(
json
);
}
else
{
...
...
@@ -334,7 +333,7 @@ public class SysPermissionController {
parentJson
.
put
(
"children"
,
children
);
}
if
(
!
permission
.
isLeaf
()
)
{
if
(
permission
.
getIsLeaf
()==
0
)
{
getPermissionJsonArray
(
jsonArray
,
metaList
,
json
);
}
}
...
...
@@ -406,4 +405,4 @@ public class SysPermissionController {
}
}
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录