| | |
| | | public List<UserWorkspaceVo> findUserWorkspace(Map<String, Object> resJsonData, |
| | | UserWorkspaceCondition condition, Pageable pageable) { |
| | | |
| | | UserWorkspace userWorkspace = this.findMyWorkspace(this.webAppUtil.getLoginId()); |
| | | UserWorkspace userWorkspace = this.findWorkspaceManager(this.webAppUtil.getLoginId()); |
| | | Workspace myWorkspace = userWorkspace.getWorkspace(); |
| | | condition.setPage(pageable.getPageNumber() * pageable.getPageSize()); |
| | | condition.setPageSize(pageable.getPageSize()); |
| | |
| | | UserLevel userLevel = this.userLevelService.getUserLevel(userWorkspaceForm.getLevelId()); |
| | | user.setUserLevel(userLevel); |
| | | userWorkspace.setUser(user); |
| | | |
| | | // 등급 변경 된 유저 로그아웃 시키기 |
| | | this.simpMessagingTemplate.convertAndSendToUser(user.getAccount(), "/notification/changeUserLevel", this.messageAccessor.getMessage(MsgConstants.USER_LEVEL_CHANGE)); |
| | | |
| | | // 세션 업데이트 |
| | | //SecurityUtils.setUserToSession(user); |
| | | } |
| | | |
| | | // 부서 변경 |
| | |
| | | public void disabledUserWorkspace(User user, Workspace workspace) { |
| | | UserWorkspace userWorkspace = this.userWorkspaceRepository.findByUserIdAndWorkspaceId(user.getId(), workspace.getId()); |
| | | |
| | | if (userWorkspace.getManagerYn()) { |
| | | /*if (userWorkspace.getManagerYn()) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.WORKSPACE_MANAGER_NOT_CHANGE_USE_YN)); |
| | | } |
| | | }*/ |
| | | |
| | | userWorkspace.setUseYn(false); |
| | | this.userWorkspaceRepository.saveAndFlush(userWorkspace); |
| | |
| | | return this.userWorkspaceRepository.findByUserIdAndManagerYn(userId, true); |
| | | } |
| | | |
| | | // 워크스페이스 관리자 조회 |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public UserWorkspace findWorkspaceManager(Long userId) { |
| | | return this.userWorkspaceRepository.findByUserId(userId); |
| | | } |
| | | |
| | | // 업무 공간 사용자 연결 아이디로 업무 공간 사용자 연결 정보를 조회한다. |
| | | @Override |
| | | @Transactional(readOnly = true) |