|
|
@ -1,6 +1,5 @@ |
|
|
|
package com.huoran.iasf.service.impl; |
|
|
|
package com.huoran.iasf.service.impl; |
|
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
|
|
@ -10,7 +9,10 @@ import com.huoran.iasf.entity.SysRole; |
|
|
|
import com.huoran.iasf.entity.SysRolePermission; |
|
|
|
import com.huoran.iasf.entity.SysRolePermission; |
|
|
|
import com.huoran.iasf.entity.SysUserRole; |
|
|
|
import com.huoran.iasf.entity.SysUserRole; |
|
|
|
import com.huoran.iasf.mapper.SysRoleMapper; |
|
|
|
import com.huoran.iasf.mapper.SysRoleMapper; |
|
|
|
import com.huoran.iasf.service.*; |
|
|
|
import com.huoran.iasf.service.HttpSessionService; |
|
|
|
|
|
|
|
import com.huoran.iasf.service.RolePermissionService; |
|
|
|
|
|
|
|
import com.huoran.iasf.service.RoleService; |
|
|
|
|
|
|
|
import com.huoran.iasf.service.UserRoleService; |
|
|
|
import com.huoran.iasf.vo.req.RolePermissionOperationReqVO; |
|
|
|
import com.huoran.iasf.vo.req.RolePermissionOperationReqVO; |
|
|
|
import com.huoran.iasf.vo.resp.DeptRespNodeVO; |
|
|
|
import com.huoran.iasf.vo.resp.DeptRespNodeVO; |
|
|
|
import com.huoran.iasf.vo.resp.PermissionRespNode; |
|
|
|
import com.huoran.iasf.vo.resp.PermissionRespNode; |
|
|
@ -140,7 +142,7 @@ public class RoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impleme |
|
|
|
public boolean checkDeptRepeat(SysRole vo) { |
|
|
|
public boolean checkDeptRepeat(SysRole vo) { |
|
|
|
QueryWrapper<SysRole> queryWrapper = new QueryWrapper<>(); |
|
|
|
QueryWrapper<SysRole> queryWrapper = new QueryWrapper<>(); |
|
|
|
queryWrapper.eq("name", vo.getName()); |
|
|
|
queryWrapper.eq("name", vo.getName()); |
|
|
|
if (StrUtil.isNotEmpty(vo.getId().toString())) { |
|
|
|
if (vo.getId()!=null) { |
|
|
|
queryWrapper.last(" and id != " + vo.getId()); |
|
|
|
queryWrapper.last(" and id != " + vo.getId()); |
|
|
|
} |
|
|
|
} |
|
|
|
List<SysRole> sysRoles = baseMapper.selectList(queryWrapper); |
|
|
|
List<SysRole> sysRoles = baseMapper.selectList(queryWrapper); |
|
|
|