From 05b742969f52aba138cfc10a6e11ae34a1e96146 Mon Sep 17 00:00:00 2001 From: 이민희 <mhlee@maprex.co.kr> Date: 월, 13 12월 2021 15:22:46 +0900 Subject: [PATCH] 이슈 유형 목록에서 검색시 다른 유형도 검색되는 오류수정 --- src/main/java/kr/wisestone/owl/service/impl/UserServiceImpl.java | 68 +++++++++++++++++++++++++++++---- 1 files changed, 59 insertions(+), 9 deletions(-) diff --git a/src/main/java/kr/wisestone/owl/service/impl/UserServiceImpl.java b/src/main/java/kr/wisestone/owl/service/impl/UserServiceImpl.java index 36b2936..96bcc28 100644 --- a/src/main/java/kr/wisestone/owl/service/impl/UserServiceImpl.java +++ b/src/main/java/kr/wisestone/owl/service/impl/UserServiceImpl.java @@ -93,6 +93,9 @@ private ProjectService projectService; @Autowired + private IssueTypeService issueTypeService; + + @Autowired private UserSecurityService userSecurityService; @Autowired @@ -236,6 +239,13 @@ /*user.setPermission(MngPermission.USER_PERMISSION_MNG_NONE);*/ } else if(validAdmin == 1) { // �씪�씠�꽱�뒪 �엯�젰 愿�由ъ옄 + + /*DepartmentForm departmentForm = new DepartmentForm(); + + departmentForm.setDepartmentName("遺��꽌 �뾾�쓬"); + Department department = this.departmentService.add(departmentForm); + this.departmentRepository.saveAndFlush(department);*/ + Workspace primaryWorkspace = this.workspaceService.getPrimaryWorkspace(); UserLevel userLevel = this.userLevelService.addSuperUserLevel(); @@ -251,7 +261,10 @@ this.userWorkspaceService.addUserWorkspace(user, workspace, true, true); // 湲곕낯�쑝濡� �젣怨듬릺�뒗 �봽濡쒖젥�듃瑜� �깮�꽦�븳�떎. -// this.projectService.addDefaultProject(user, workspace); + this.projectService.addDefaultProject(user, workspace); + + // 湲곕낯�쑝濡� �젣怨듬릺�뒗 �봽濡쒖젥�듃瑜� �씠�뒋 �쑀�삎�쓽 �궗�슜 �봽濡쒖젥�듃濡� �꽕�젙 + this.issueTypeService.addDefaultUsedProject(workspace); user.setLastWorkspaceId(workspace.getId()); @@ -263,13 +276,6 @@ /*user.setPermission(MngPermission.makeSubAllPermission());*/ } } - DepartmentForm departmentForm = new DepartmentForm(); - - departmentForm.setDepartmentName("遺��꽌 �뾾�쓬"); - Department department = this.departmentService.add(departmentForm); - - // wyu - this.departmentRepository.saveAndFlush(department); this.userRepository.saveAndFlush(user); // �씠硫붿씪 �븣由� �삁�젙 �떆媛꾩씠 怨듬갚�씠硫� �뵒�뤃�듃 �씠硫붿씪 �븣由� �삁�젙 �떆媛꾩쑝濡� �꽕�젙�븳�떎. @@ -541,8 +547,12 @@ User user = this.getUser(userCondition.getId()); userVo = ConvertUtil.copyProperties(user, UserVo.class, "password"); userVo.setAccount(CommonUtil.decryptAES128(userVo.getAccount())); - } + Map<String, Object> projectManagerYN = this.projectRoleUserService.findProjectManager((userCondition.getId())); + if(projectManagerYN != null){ + userVo.setProjectManagerYN(true); + } + } resJsonData.put(Constants.RES_KEY_CONTENTS, userVo); } @@ -1064,6 +1074,30 @@ resJsonData.put(Constants.RES_KEY_CONTENTS, userVo); } + // 留덉�留됱쑝濡� �꽑�깮�븳 �씠�뒋 ���엯 �젙蹂대�� ���옣�븳�떎. + @Override + @Transactional + public void updateLastIssueType(Map<String, Object> resJsonData, UserForm userForm) { + User user = this.getUser(this.webAppUtil.getLoginId()); + + if (userForm.getLastIssueTypeId() != null) { + user.setLastIssueTypeId(userForm.getLastIssueTypeId()); + } + + this.userRepository.saveAndFlush(user); + // �꽭�뀡 �뾽�뜲�씠�듃 + SecurityUtils.setUserToSession(user); + // �겢�씪�씠�뼵�듃�쓽 �궗�슜�옄 �젙蹂� �뾽�뜲�씠�듃 + UserVo userVo = ConvertUtil.copyProperties(user, UserVo.class, "password"); + + if (user.getSocialType() != null) { + userVo.setSocialType(user.getSocialType().toString()); + } + + userVo.setAccount(CommonUtil.decryptAES128(userVo.getAccount())); + + resJsonData.put(Constants.RES_KEY_CONTENTS, userVo); + } // �듅�젙 �븘�씠�뵒�뿉 �빐�떦�븯�뒗 �궗�슜�옄 紐⑸줉�쓣 媛��졇�삩�떎. @Override @Transactional(readOnly = true) @@ -1237,6 +1271,22 @@ return results; } + // �씠硫붿씪 �븣由� �삁�젙 �떆媛꾩쓣 �떎�떆媛꾩쑝濡� �꽕�젙�븳 �궗�슜�옄瑜� 議고쉶�븳�떎. + @Override + @Transactional(readOnly = true) + public List<String> findByRealTimeNotifyTime() { + Map<String, Object> conditions = new HashMap<>(); + + List<Map<String, Object>> users = this.userMapper.findByRealTimeNotifyTime(conditions); + List<String> results = Lists.newArrayList(); + + for (Map<String, Object> user : users) { + results.add(MapUtil.getString(user, "account")); + } + + return results; + } + // �봽濡쒖젥�듃�뿉 李몄뿬�븯�뒗 �궗�슜�옄 �젙蹂대�� 議고쉶�븳�떎. @Override @Transactional(readOnly = true) -- Gitblit v1.8.0