分权管理BUG修复
This commit is contained in:
parent
51dc953766
commit
8155466a96
|
|
@ -120,7 +120,7 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
|
||||||
// 判断有无重复数据
|
// 判断有无重复数据
|
||||||
List<ManagerDetachPO> detachListById = getMangeDetachMapper().getDetachListById(ecManager);
|
List<ManagerDetachPO> detachListById = getMangeDetachMapper().getDetachListById(ecManager);
|
||||||
if (CollectionUtils.isNotEmpty(detachListById)) {
|
if (CollectionUtils.isNotEmpty(detachListById)) {
|
||||||
Set<String> noRepeatRoleLevels = getNoRepeatRoleLevels(detachListById);
|
Set<String> noRepeatRoleLevels = getNoRepeatRoleLevels(detachListById, param.getId());
|
||||||
noRepeatRoleLevels.addAll(Arrays.asList(noRepeatRoleLevel.split(",")));
|
noRepeatRoleLevels.addAll(Arrays.asList(noRepeatRoleLevel.split(",")));
|
||||||
noRepeatRoleLevel = StringUtils.join(noRepeatRoleLevels, ",");
|
noRepeatRoleLevel = StringUtils.join(noRepeatRoleLevels, ",");
|
||||||
List<Long> collect = detachListById.stream().map(ManagerDetachPO::getId).map(Long::valueOf).collect(Collectors.toList());
|
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);
|
List<ManagerDetachPO> detachListById = getMangeDetachMapper().getDetachListById(ecManager);
|
||||||
if (CollectionUtils.isNotEmpty(detachListById)) {
|
if (CollectionUtils.isNotEmpty(detachListById)) {
|
||||||
Set<String> noRepeatRoleLevels = getNoRepeatRoleLevels(detachListById);
|
Set<String> noRepeatRoleLevels = getNoRepeatRoleLevels(detachListById,param.getId());
|
||||||
noRepeatRoleLevels.addAll(Arrays.asList(noRepeatRoleLevel.split(",")));
|
noRepeatRoleLevels.addAll(Arrays.asList(noRepeatRoleLevel.split(",")));
|
||||||
noRepeatRoleLevel = StringUtils.join(noRepeatRoleLevels, ",");
|
noRepeatRoleLevel = StringUtils.join(noRepeatRoleLevels, ",");
|
||||||
List<Long> collect = detachListById.stream().map(ManagerDetachPO::getId).map(Long::valueOf).collect(Collectors.toList());
|
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 detachList detachList
|
||||||
|
* @param id
|
||||||
* @return return
|
* @return return
|
||||||
*/
|
*/
|
||||||
private Set<String> getNoRepeatRoleLevels(List<ManagerDetachPO> detachList) {
|
private Set<String> getNoRepeatRoleLevels(List<ManagerDetachPO> detachList, Integer id) {
|
||||||
Set<String> ecRoleLevels = new HashSet<>();
|
Set<String> ecRoleLevels = new HashSet<>();
|
||||||
for (ManagerDetachPO managerDetach : detachList) {
|
for (ManagerDetachPO managerDetach : detachList) {
|
||||||
|
if (null != id && id.equals(managerDetach.getId())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Set<String> ids = Stream.of(managerDetach.getJclRolelevel().split(",")).collect(Collectors.toSet());
|
Set<String> ids = Stream.of(managerDetach.getJclRolelevel().split(",")).collect(Collectors.toSet());
|
||||||
if (CollectionUtils.isNotEmpty(ids)) {
|
if (CollectionUtils.isNotEmpty(ids)) {
|
||||||
ecRoleLevels.addAll(ids);
|
ecRoleLevels.addAll(ids);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue