Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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-enterprise
Commits
778a36e6
Commit
778a36e6
authored
Jun 03, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉前置资源-全部有权限
parent
bab8ecb1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
EnterpriseApiServiceImpl.java
...terprise/service/outer/impl/EnterpriseApiServiceImpl.java
+10
-3
EnterpriseGoodsResourceApiServiceImpl.java
...ice/outer/impl/EnterpriseGoodsResourceApiServiceImpl.java
+2
-1
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/EnterpriseApiServiceImpl.java
View file @
778a36e6
...
...
@@ -132,7 +132,8 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
enterpriseResourceRel
.
setEnterpriseId
(
enterpriseId
);
enterpriseResourceRel
.
setResourceCode
(
res
.
getResourceCode
());
enterpriseResourceRel
.
setResourceName
(
res
.
getResourceName
());
enterpriseResourceRel
.
setResourceSwitch
(
0
);
//去掉前置资源,默认都有权限
enterpriseResourceRel
.
setResourceSwitch
(
1
);
enterpriseResourceRelService
.
saveResource
(
enterpriseResourceRel
);
}
}
...
...
@@ -271,7 +272,12 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
public
ServiceResponse
<
List
<
EnterpriseResourceRelDTO
>>
getBusinessFrontRes
(
Integer
enterpriseId
)
{
List
<
TabEnterpriseResourceRel
>
list
=
enterpriseResourceRelService
.
getByEnterpriseId
(
enterpriseId
);
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityListNew
(
EnterpriseResourceRelDTO
.
class
,
list
));
List
<
EnterpriseResourceRelDTO
>
temp
=
EntityUtil
.
changeEntityListNew
(
EnterpriseResourceRelDTO
.
class
,
list
);
for
(
EnterpriseResourceRelDTO
dto
:
temp
)
{
//去掉前置资源,默认都有权限
dto
.
setResourceSwitch
(
1
);
}
return
ServiceResponse
.
success
(
temp
);
}
else
{
ServiceResponse
<
List
<
BusinessFrontResDTO
>>
businessFrontResListResult
=
businessFrontResApiService
.
listGroupResourceCode
();
...
...
@@ -281,7 +287,8 @@ public class EnterpriseApiServiceImpl implements EnterpriseApiService {
List
<
EnterpriseResourceRelDTO
>
result
=
new
ArrayList
<>(
resourceList
.
size
());
for
(
BusinessFrontResDTO
res
:
resourceList
)
{
EnterpriseResourceRelDTO
temp
=
new
EnterpriseResourceRelDTO
();
temp
.
setResourceSwitch
(
0
);
//去掉前置资源,默认都有权限
temp
.
setResourceSwitch
(
1
);
temp
.
setResourceName
(
res
.
getResourceName
());
temp
.
setResourceCode
(
res
.
getResourceCode
());
result
.
add
(
temp
);
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/EnterpriseGoodsResourceApiServiceImpl.java
View file @
778a36e6
...
...
@@ -31,6 +31,7 @@ public class EnterpriseGoodsResourceApiServiceImpl implements EnterpriseGoodsRes
if
(
CollectionUtils
.
isNotEmpty
(
businessFront
))
{
hasGoodsAuth
=
businessFront
.
stream
().
anyMatch
(
e
->
"goods"
.
equals
(
e
.
getResourceCode
())
&&
e
.
getResourceSwitch
().
intValue
()
==
1
);
}
return
ServiceResponse
.
success
(
hasGoodsAuth
);
//去掉前置资源,全部有权限
return
ServiceResponse
.
success
(
true
);
}
}
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