Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
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
base_platform_enterprise
gic-platform-auth
Commits
3060066f
Commit
3060066f
authored
Jan 25, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
子管理员查询资源组配置
parent
37b55b39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
0 deletions
+34
-0
UserResourceApiService.java
...ain/java/com/gic/auth/service/UserResourceApiService.java
+8
-0
UserResourceApiServiceImpl.java
...c/auth/service/outer/impl/UserResourceApiServiceImpl.java
+26
-0
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/service/UserResourceApiService.java
View file @
3060066f
package
com
.
gic
.
auth
.
service
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.dto.ResourceGroupDTO
;
import
com.gic.auth.dto.UserResourceDTO
;
/**
* 用户资源组关联
...
...
@@ -30,4 +31,11 @@ public interface UserResourceApiService {
* @return
*/
ServiceResponse
<
UserResourceDTO
>
getResourceByUserId
(
Integer
userId
);
/**
* 子管理员查询资源组数据
* @param userId
* @return
*/
ServiceResponse
<
ResourceGroupDTO
>
getResourceGroupByUserId
(
Integer
userId
);
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/UserResourceApiServiceImpl.java
View file @
3060066f
...
...
@@ -2,8 +2,10 @@ package com.gic.auth.service.outer.impl;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.constant.DeleteFlagConstants
;
import
com.gic.auth.dto.ResourceGroupDTO
;
import
com.gic.auth.dto.UserResourceDTO
;
import
com.gic.auth.entity.TabSysUser
;
import
com.gic.auth.service.ResourceGroupApiService
;
import
com.gic.auth.service.UserResourceApiService
;
import
com.gic.auth.service.UserResourceService
;
import
com.gic.auth.service.UserService
;
...
...
@@ -28,6 +30,8 @@ public class UserResourceApiServiceImpl implements UserResourceApiService{
private
UserResourceService
userResourceService
;
@Autowired
private
UserService
userService
;
@Autowired
private
ResourceGroupApiService
resourceGroupApiService
;
@Override
public
ServiceResponse
<
Void
>
save
(
UserResourceDTO
dto
)
{
ServiceResponse
paramValid
=
ValidParamsUtils
.
allCheckValidate
(
dto
,
UserResourceDTO
.
SaveUserResourceValid
.
class
);
...
...
@@ -55,4 +59,26 @@ public class UserResourceApiServiceImpl implements UserResourceApiService{
}
return
ServiceResponse
.
success
(
new
UserResourceDTO
());
}
@Override
public
ServiceResponse
<
ResourceGroupDTO
>
getResourceGroupByUserId
(
Integer
userId
)
{
ServiceResponse
<
UserResourceDTO
>
response
=
getResourceByUserId
(
userId
);
if
(
response
.
isSuccess
())
{
UserResourceDTO
userResourceDTO
=
response
.
getResult
();
if
(
userResourceDTO
!=
null
)
{
Integer
resourceId
=
userResourceDTO
.
getResourceId
();
ServiceResponse
<
ResourceGroupDTO
>
resourceRes
=
resourceGroupApiService
.
getResourceGroup
(
resourceId
);
if
(
resourceRes
.
isSuccess
())
{
ResourceGroupDTO
result
=
resourceRes
.
getResult
();
if
(
result
!=
null
)
{
return
ServiceResponse
.
success
(
result
);
}
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"没有资源组数据"
);
}
return
ServiceResponse
.
failure
(
resourceRes
.
getCode
(),
resourceRes
.
getMessage
());
}
}
return
ServiceResponse
.
failure
(
response
.
getCode
(),
response
.
getMessage
());
}
}
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