Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bill-platform
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
赵啸非
bill-platform
Commits
5be2b6c8
Commit
5be2b6c8
authored
Sep 14, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加菜单资源配置
parent
58ddeb2e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
bill-manager/src/main/java/com/mortals/xhx/base/system/role/web/RoleAuthController.java
.../mortals/xhx/base/system/role/web/RoleAuthController.java
+6
-7
No files found.
bill-manager/src/main/java/com/mortals/xhx/base/system/role/web/RoleAuthController.java
View file @
5be2b6c8
...
...
@@ -3,6 +3,7 @@ package com.mortals.xhx.base.system.role.web;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.menu.model.MenuTreeSelect
;
import
com.mortals.xhx.base.system.resource.model.ResourceEntity
;
import
com.mortals.xhx.base.system.resource.service.ResourceService
;
import
com.mortals.xhx.base.system.role.model.RoleAuthEntity
;
...
...
@@ -85,14 +86,15 @@ public class RoleAuthController extends BaseCRUDJsonBodyMappingController<RoleAu
@ApiOperation
(
value
=
"根据角色编辑菜单"
)
@PostMapping
(
value
=
"editMenu"
)
public
String
editMenu
(
@RequestBody
RoleAuthQuery
query
)
{
try
{
service
.
editMenu
(
query
,
this
.
getContext
());
JSONObject
ret
=
new
JSONObject
();
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
try
{
List
<
MenuTreeSelect
>
menuTreeSelects
=
service
.
editMenu
(
query
,
this
.
getContext
());
model
.
put
(
KEY_RESULT_DATA
,
menuTreeSelects
);
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
return
ret
.
toJSONString
();
}
catch
(
Exception
e
)
{
log
.
error
(
"角色编辑菜单错误"
,
e
);
JSONObject
ret
=
new
JSONObject
();
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_FAILURE
);
ret
.
put
(
KEY_RESULT_MSG
,
super
.
convertException
(
e
));
return
ret
.
toJSONString
();
...
...
@@ -106,13 +108,10 @@ public class RoleAuthController extends BaseCRUDJsonBodyMappingController<RoleAu
@PostMapping
(
value
=
"editResource"
)
public
String
editResource
(
@RequestBody
RoleAuthQuery
query
)
{
JSONObject
ret
=
new
JSONObject
();
Map
<
String
,
Object
>
model
=
new
HashMap
<>();
try
{
Map
<
String
,
List
<
ResourceEntity
>>
group
=
resourceService
.
group
(
query
.
getRoleId
(),
getContext
());
model
.
put
(
KEY_RESULT_DATA
,
group
);
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
ret
.
put
(
KEY_RESULT_DATA
,
model
);
ret
.
put
(
KEY_RESULT_CODE
,
VALUE_RESULT_SUCCESS
);
ret
.
put
(
KEY_RESULT_DATA
,
group
);
return
ret
.
toJSONString
();
}
catch
(
Exception
e
)
{
log
.
error
(
"角色编辑资源错误"
,
e
);
...
...
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