| | |
| | | package com.ycl.web.controller.system; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.Set; |
| | | |
| | | import com.ycl.system.service.ISysDeptService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | private final ISysMenuService menuService; |
| | | |
| | | private final SysPermissionService permissionService; |
| | | |
| | | private final ISysDeptService deptService; |
| | | |
| | | /** |
| | | * 登录方法 |
| | |
| | | ajax.put("user", user); |
| | | ajax.put("roles", roles); |
| | | ajax.put("permissions", permissions); |
| | | // 获取当前登陆人的当前部门及下级所有部门 |
| | | if (Objects.nonNull(user.getDept())) { |
| | | List<Long> deptIds = deptService.getChildIds(user.getDept().getDeptId()); |
| | | ajax.put("childDeptList", deptIds); |
| | | } |
| | | return ajax; |
| | | } |
| | | |