feat:(REQ-2545) 修改刷新权限点类型逻辑
This commit is contained in:
parent
c13110a46f
commit
f75f9d1fae
@ -391,7 +391,7 @@ public class PrivateController {
|
||||
|
||||
private void updateNewRoleFeature(List<SaasPgroupPermissionRelation> saasPgroupPermissionRelations) {
|
||||
List<SaasPgroupPermissionRelation> newFeatureRelations = saasPgroupPermissionRelations.stream()
|
||||
.filter(e -> Objects.equals(e.getFeatureType(), NEW_FEATURE))
|
||||
.filter(e -> Objects.equals(e.getType(), NEW_FEATURE))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (CollectionUtils.isEmpty(newFeatureRelations)) {
|
||||
@ -402,7 +402,7 @@ public class PrivateController {
|
||||
.stream()
|
||||
.collect(Collectors.toMap(SaasFeatureResource::getId, Function.identity()));
|
||||
|
||||
List<SaasPgroupPermissionRelation> update = saasPgroupPermissionRelations.stream()
|
||||
List<SaasPgroupPermissionRelation> update = newFeatureRelations.stream()
|
||||
.map(e -> {
|
||||
SaasFeatureResource saasFeatureResource = saasFeatureResourceMap.get(e.getFeatureId());
|
||||
if (saasFeatureResource == null) {
|
||||
@ -425,7 +425,7 @@ public class PrivateController {
|
||||
|
||||
private void updateOldRoleFeature(List<SaasPgroupPermissionRelation> saasPgroupPermissionRelations) {
|
||||
List<SaasPgroupPermissionRelation> oldFeatureRelations = saasPgroupPermissionRelations.stream()
|
||||
.filter(e -> Objects.equals(e.getFeatureType(), OLD_FEATURE))
|
||||
.filter(e -> Objects.equals(e.getType(), OLD_FEATURE))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (CollectionUtils.isEmpty(oldFeatureRelations)) {
|
||||
@ -436,7 +436,7 @@ public class PrivateController {
|
||||
.stream()
|
||||
.collect(Collectors.toMap(SaasFeature::getId, Function.identity()));
|
||||
|
||||
List<SaasPgroupPermissionRelation> update = saasPgroupPermissionRelations.stream()
|
||||
List<SaasPgroupPermissionRelation> update = oldFeatureRelations.stream()
|
||||
.map(e -> {
|
||||
SaasFeature saasFeature = saasFeatureMap.get(e.getFeatureId());
|
||||
if (saasFeature == null) {
|
||||
@ -492,7 +492,7 @@ public class PrivateController {
|
||||
|
||||
private void updateNewProductFeature(List<SaasProductModuleFeatureRelation> saasProductModuleFeatureRelations) {
|
||||
List<SaasProductModuleFeatureRelation> newFeatureRelations = saasProductModuleFeatureRelations.stream()
|
||||
.filter(e -> Objects.equals(e.getFeatureType(), NEW_FEATURE))
|
||||
.filter(e -> Objects.equals(e.getType(), NEW_FEATURE))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (CollectionUtils.isEmpty(newFeatureRelations)) {
|
||||
@ -503,7 +503,7 @@ public class PrivateController {
|
||||
.stream()
|
||||
.collect(Collectors.toMap(SaasFeatureResource::getId, Function.identity()));
|
||||
|
||||
List<SaasProductModuleFeatureRelation> update = saasProductModuleFeatureRelations.stream()
|
||||
List<SaasProductModuleFeatureRelation> update = newFeatureRelations.stream()
|
||||
.map(e -> {
|
||||
SaasFeatureResource saasFeatureResource = saasFeatureResourceMap.get(e.getFeatureId());
|
||||
if (saasFeatureResource == null) {
|
||||
@ -526,7 +526,7 @@ public class PrivateController {
|
||||
|
||||
private void updateOldProductFeature(List<SaasProductModuleFeatureRelation> saasProductModuleFeatureRelations) {
|
||||
List<SaasProductModuleFeatureRelation> oldFeatureRelations = saasProductModuleFeatureRelations.stream()
|
||||
.filter(e -> Objects.equals(e.getFeatureType(), OLD_FEATURE))
|
||||
.filter(e -> Objects.equals(e.getType(), OLD_FEATURE))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (CollectionUtils.isEmpty(oldFeatureRelations)) {
|
||||
@ -537,7 +537,7 @@ public class PrivateController {
|
||||
.stream()
|
||||
.collect(Collectors.toMap(SaasFeature::getId, Function.identity()));
|
||||
|
||||
List<SaasProductModuleFeatureRelation> update = saasProductModuleFeatureRelations.stream()
|
||||
List<SaasProductModuleFeatureRelation> update = oldFeatureRelations.stream()
|
||||
.map(e -> {
|
||||
SaasFeature saasFeature = saasFeatureMap.get(e.getFeatureId());
|
||||
if (saasFeature == null) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user