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
1
Merge Requests
1
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
00e5701f
Commit
00e5701f
authored
Apr 26, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/权限' into 'developer'
好办权限 See merge request
!173
parents
66b22dc9
f5255290
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
0 deletions
+63
-0
RightController.java
...com/gic/haoban/manage/web/controller/RightController.java
+61
-0
dubbo-haoban-manage-web.xml
...3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
+2
-0
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/RightController.java
0 → 100644
View file @
00e5701f
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.clerk.api.dto.right.RightMenuDTO
;
import
com.gic.clerk.api.service.RightService
;
import
com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO
;
import
com.gic.haoban.common.utils.AuthWebRequestUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
/**
*
* @ClassName: RightController
* @Description: 好办权限
* @author xugh
* @date 2022年4月26日 下午4:59:35
*
*/
@RestController
public
class
RightController
extends
WebBaseController
{
private
static
final
Logger
log
=
LogManager
.
getLogger
(
RightController
.
class
);
@Autowired
private
RightService
rightService
;
@RequestMapping
(
"get-haoban-menu"
)
public
HaobanResponse
getHaobanMenu
(
String
enterpriseId
)
{
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
String
phoneNumber
=
login
.
getStaffDTO
().
getPhoneNumber
();
log
.
info
(
"好办菜单={},{}"
,
enterpriseId
,
phoneNumber
);
ServiceResponse
<
List
<
RightMenuDTO
>>
resp
=
this
.
rightService
.
getHaobanMenu
(
enterpriseId
,
phoneNumber
);
if
(
resp
.
isSuccess
())
{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
resp
.
getResult
());
}
return
resultResponse
(
HaoBanErrCode
.
ERR_OTHER
,
resp
.
getMessage
());
}
@RequestMapping
(
"get-haoban-right"
)
public
HaobanResponse
listHaobanAllMenu
(
String
enterpriseId
)
{
WebLoginDTO
login
=
AuthWebRequestUtil
.
getLoginUser
();
String
phoneNumber
=
login
.
getStaffDTO
().
getPhoneNumber
();
log
.
info
(
"好办菜单={},{}"
,
enterpriseId
,
phoneNumber
);
ServiceResponse
<
Map
<
String
,
Object
>>
resp
=
this
.
rightService
.
listHaobanAllMenu
(
enterpriseId
,
phoneNumber
);
if
(
resp
.
isSuccess
())
{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
resp
.
getResult
());
}
return
resultResponse
(
HaoBanErrCode
.
ERR_OTHER
,
resp
.
getMessage
());
}
}
haoban-manage3-web/src/main/webapp/WEB-INF/dubbo-haoban-manage-web.xml
View file @
00e5701f
...
...
@@ -14,6 +14,8 @@
<dubbo:application
name=
"haoban-manage3-web"
/>
<dubbo:protocol
name=
"dubbo"
port=
"30009"
/>
<dubbo:reference
interface=
"com.gic.clerk.api.service.RightService"
id=
"rightService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.clerk.api.service.UserService"
id=
"userService"
timeout=
"10000"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.StaffApiService"
id=
"staffApiService"
timeout=
"15000"
/>
...
...
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