| | |
| | | import com.ruoyi.system.domain.SysRoleDept; |
| | | import com.ruoyi.system.mapper.SysDeptMapper; |
| | | import com.ruoyi.system.mapper.SysRoleDeptMapper; |
| | | import com.ruoyi.system.service.SysDataScopeService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.ruoyi.system.service.ISysDataScopeService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 数据权限 实现 |
| | | * <p> |
| | | * 注意: 此Service内不允许调用标注`数据权限`注解的方法 |
| | | * 例如: deptMapper.selectList 此 selectList 方法标注了`数据权限`注解 会出现循环解析的问题 |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | @RequiredArgsConstructor |
| | | @Service("sdss") |
| | | public class SysDataScopeServiceImpl implements SysDataScopeService { |
| | | public class SysDataScopeServiceImpl implements ISysDataScopeService { |
| | | |
| | | @Autowired |
| | | private SysRoleDeptMapper roleDeptMapper; |
| | | @Autowired |
| | | private SysDeptMapper deptMapper; |
| | | private final SysRoleDeptMapper roleDeptMapper; |
| | | private final SysDeptMapper deptMapper; |
| | | |
| | | @Override |
| | | public String getRoleCustom(Long roleId) { |