分权管理BUG修复

pull/209/head
dxfeng 2 years ago
parent 058aa353e5
commit cf7ac82356

@ -120,7 +120,7 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
// 判断有无重复数据
List<ManagerDetachPO> detachListById = getMangeDetachMapper().getDetachListById(ecManager);
if (CollectionUtils.isNotEmpty(detachListById)) {
Set<String> noRepeatRoleLevels = getNoRepeatRoleLevels(detachListById);
Set<String> noRepeatRoleLevels = getNoRepeatRoleLevels(detachListById, param.getId());
noRepeatRoleLevels.addAll(Arrays.asList(noRepeatRoleLevel.split(",")));
noRepeatRoleLevel = StringUtils.join(noRepeatRoleLevels, ",");
List<Long> collect = detachListById.stream().map(ManagerDetachPO::getId).map(Long::valueOf).collect(Collectors.toList());
@ -149,7 +149,7 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
// 判断有无重复数据
List<ManagerDetachPO> detachListById = getMangeDetachMapper().getDetachListById(ecManager);
if (CollectionUtils.isNotEmpty(detachListById)) {
Set<String> noRepeatRoleLevels = getNoRepeatRoleLevels(detachListById);
Set<String> noRepeatRoleLevels = getNoRepeatRoleLevels(detachListById,param.getId());
noRepeatRoleLevels.addAll(Arrays.asList(noRepeatRoleLevel.split(",")));
noRepeatRoleLevel = StringUtils.join(noRepeatRoleLevels, ",");
List<Long> collect = detachListById.stream().map(ManagerDetachPO::getId).map(Long::valueOf).collect(Collectors.toList());
@ -226,11 +226,15 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
*
*
* @param detachList detachList
* @param id
* @return return
*/
private Set<String> getNoRepeatRoleLevels(List<ManagerDetachPO> detachList) {
private Set<String> getNoRepeatRoleLevels(List<ManagerDetachPO> detachList, Integer id) {
Set<String> ecRoleLevels = new HashSet<>();
for (ManagerDetachPO managerDetach : detachList) {
if (null != id && id.equals(managerDetach.getId())) {
continue;
}
Set<String> ids = Stream.of(managerDetach.getJclRolelevel().split(",")).collect(Collectors.toSet());
if (CollectionUtils.isNotEmpty(ids)) {
ecRoleLevels.addAll(ids);

Loading…
Cancel
Save