| | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.dromara.common.core.constant.CacheNames; |
| | | import org.dromara.common.core.utils.StreamUtils; |
| | | import org.dromara.system.domain.SysDept; |
| | | import org.dromara.system.domain.SysRoleDept; |
| | | import org.dromara.system.mapper.SysDeptMapper; |
| | | import org.dromara.system.mapper.SysRoleDeptMapper; |
| | | import org.dromara.system.service.ISysDataScopeService; |
| | | import org.springframework.cache.annotation.Cacheable; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | * @param roleId 角色Id |
| | | * @return 部门Id组 |
| | | */ |
| | | @Cacheable(cacheNames = CacheNames.SYS_ROLE_CUSTOM, key = "#roleId", condition = "#roleId != null") |
| | | @Override |
| | | public String getRoleCustom(Long roleId) { |
| | | if (ObjectUtil.isNull(roleId)) { |
| | |
| | | * @param deptId 部门Id |
| | | * @return 部门Id组 |
| | | */ |
| | | @Cacheable(cacheNames = CacheNames.SYS_DEPT_AND_CHILD, key = "#deptId", condition = "#deptId != null") |
| | | @Override |
| | | public String getDeptAndChild(Long deptId) { |
| | | if (ObjectUtil.isNull(deptId)) { |