Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
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
haoban3.0
haoban-manage3.0
Commits
b19562ba
Commit
b19562ba
authored
Sep 14, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:新增接口
parent
4c03761d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletions
+33
-1
HaobanRoleController.java
...ic/haoban/manage/web/controller/HaobanRoleController.java
+33
-1
No files found.
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/
test/
HaobanRoleController.java
→
haoban-manage3-operation-web/src/main/java/com/gic/haoban/manage/web/controller/HaobanRoleController.java
View file @
b19562ba
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
test
;
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.manage.api.dto.qdto.role.HaobanRoleQDTO
;
import
com.gic.haoban.manage.api.dto.role.HaobanMenuDTO
;
import
com.gic.haoban.manage.api.service.role.HaobanMenuApiService
;
import
com.gic.haoban.manage.api.service.role.HaobanRoleApiService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
...
...
@@ -20,6 +26,8 @@ public class HaobanRoleController {
@Autowired
private
HaobanMenuApiService
haobanMenuApiService
;
@Autowired
private
HaobanRoleApiService
haobanRoleApiService
;
/**
* 获取菜单树
...
...
@@ -31,4 +39,28 @@ public class HaobanRoleController {
return
RestResponse
.
successResult
(
serviceMenuTreeList
.
getResult
());
}
/**
* 修改
* @param haobanRoleQDTO
* @return
*/
@RequestMapping
(
value
=
"/edit"
,
method
=
RequestMethod
.
POST
)
private
RestResponse
edit
(
@RequestBody
HaobanRoleQDTO
haobanRoleQDTO
)
{
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
return
RestResponse
.
successResult
(
haobanRoleApiService
.
edit
(
haobanRoleQDTO
,
login
));
}
/**
* 根据角色查询菜单
* @param roleId
* @return
*/
@RequestMapping
(
value
=
"/queryMenuByRoleId"
,
method
=
RequestMethod
.
GET
)
private
RestResponse
queryMenuByRoleId
(
Long
roleId
)
{
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
ServiceResponse
serviceResponse
=
haobanRoleApiService
.
getByWxEnterpriseIdAndRoleId
(
login
.
getWxEnterpriseId
(),
roleId
);
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
}
}
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