Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-data-cloud
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-data-cloud
Commits
67d39375
Commit
67d39375
authored
Jul 14, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据用户ID查询数据权限
parent
39f4c212
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
DataAuthApiService.java
...c/main/java/com/gic/cloud/service/DataAuthApiService.java
+2
-0
DataAuthApiServiceImpl.java
.../gic/cloud/service/outer/impl/DataAuthApiServiceImpl.java
+10
-0
No files found.
gic-data-cloud-api/src/main/java/com/gic/cloud/service/DataAuthApiService.java
View file @
67d39375
...
...
@@ -19,4 +19,6 @@ public interface DataAuthApiService {
ServiceResponse
<
Page
<
DataAuthDTO
>>
pageDataAuth
(
Integer
enterpriseId
,
String
dataAuthName
,
Integer
currentPage
,
Integer
pageSize
);
ServiceResponse
<
List
<
DataAuthDTO
>>
listDataAuth
(
Integer
enterpriseId
,
String
dataAuthName
);
ServiceResponse
<
DataAuthDTO
>
ggetDataAuthByUserId
(
Integer
enterpriseId
,
Integer
userId
);
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/DataAuthApiServiceImpl.java
View file @
67d39375
...
...
@@ -5,6 +5,7 @@ import com.gic.api.base.commons.ServiceResponse;
import
com.gic.cloud.dto.DataAuthDTO
;
import
com.gic.cloud.dto.UserDTO
;
import
com.gic.cloud.entity.TabSysDataAuth
;
import
com.gic.cloud.entity.TabSysUser
;
import
com.gic.cloud.service.DataAuthApiService
;
import
com.gic.cloud.service.DataAuthService
;
import
com.gic.cloud.service.UserService
;
...
...
@@ -90,6 +91,15 @@ public class DataAuthApiServiceImpl implements DataAuthApiService{
dataAuthService
.
listDataAuth
(
enterpriseId
,
dataAuthName
))).
orElse
(
Collections
.
EMPTY_LIST
));
}
@Override
public
ServiceResponse
<
DataAuthDTO
>
ggetDataAuthByUserId
(
Integer
enterpriseId
,
Integer
userId
)
{
TabSysUser
user
=
userService
.
getUser
(
userId
);
if
(
user
==
null
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"用户ID错误,查无数据"
);
}
return
getDataAuth
(
user
.
getDataAuthId
());
}
private
ServiceResponse
validParam
(
DataAuthDTO
dto
)
{
if
(
dto
.
getDataAuthId
()
!=
null
)
{
TabSysDataAuth
record
=
dataAuthService
.
getDataAuth
(
dto
.
getDataAuthId
());
...
...
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