liusheng
2025-04-02 acd62c1684cbde71954252ffdf89d0918491e6fc
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysRoleServiceImpl.java
@@ -17,6 +17,7 @@
import com.ruoyi.system.mapper.SysUserRoleMapper;
import com.ruoyi.system.service.ISysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -41,6 +42,9 @@
    @Autowired
    private SysRoleDeptMapper roleDeptMapper;
    @Value("${isAdmin}")
    private List<Long> isAdmin;
    /**
     * 根据条件分页查询角色数据
@@ -194,7 +198,7 @@
    @Override
    public void checkRoleDataScope(Long roleId)
    {
        if (!SysUser.isAdmin(SecurityUtils.getUserId()))
        if (!isAdmin.contains(SecurityUtils.getUserId()))
        {
            SysRole role = new SysRole();
            role.setRoleId(roleId);