| | |
| | | import kr.wisestone.owl.util.*; |
| | | import kr.wisestone.owl.vo.*; |
| | | import kr.wisestone.owl.web.condition.UserCondition; |
| | | import kr.wisestone.owl.web.form.DepartmentForm; |
| | | import kr.wisestone.owl.web.form.UserForm; |
| | | import kr.wisestone.owl.web.view.ExcelView; |
| | | import org.apache.commons.validator.routines.EmailValidator; |
| | |
| | | |
| | | @Autowired |
| | | private AttachedFileService attachedFileService; |
| | | |
| | | @Autowired |
| | | private UserDepartmentService userDepartmentService; |
| | | |
| | | @Autowired |
| | | private IssueService issueService; |
| | |
| | | return this.convertUserVoToMap(results, totalUsersCount, pageable, resJsonData); |
| | | } |
| | | |
| | | // 사용자 정보를 가져온다. |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | | public void findMyLevelAndDepartment(Map<String, Object> resJsonData) { |
| | | Long loginId = this.webAppUtil.getLoginId(); |
| | | Map<String, Object> result = this.userMapper.findByMyLevelAndDepartment(loginId); |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, result); |
| | | } |
| | | |
| | | // 사용자 아이디로 사용자를 조회한다. |
| | | @Override |
| | | @Transactional(readOnly = true) |
| | |
| | | @Transactional(readOnly = true) |
| | | public User getUserSession(Map<String, Object> resJsonData, HttpServletRequest httpServletRequest) { |
| | | User user = this.getUser(this.webAppUtil.getLoginId()); |
| | | UserVo userVo = ConvertUtil.copyProperties(user, UserVo.class, "password","permission"); |
| | | UserVo userVo = ConvertUtil.copyProperties(user, UserVo.class, "password"); |
| | | // user에서 Permission 값을 가져와서 userVo 에 setPermission 함 |
| | | userVo.setPermission(user.getPermission()); |
| | | userVo.setAccount(CommonUtil.decryptAES128(userVo.getAccount())); |
| | | |
| | | UserLevel userLevel = user.getUserLevel(); |
| | | if (userLevel != null) { |
| | | userVo.setLevelName(userLevel.getLevelName()); |
| | | } |
| | | |
| | | List<Department> departments = this.userDepartmentService.findDepartment(user.getId()); |
| | | if (departments != null) { |
| | | userVo.setDepartmentVos(ConvertUtil.convertObjectsToClasses(departments, DepartmentVo.class)); |
| | | } |
| | | resJsonData.put(Constants.RES_KEY_CONTENTS, userVo); |
| | | // 사용자 세션 정보를 분석해서 로그에 남긴다. |
| | | log.info(ElasticSearchUtil.makeUserSessionHistoryMessage(httpServletRequest, userVo)); |
| | |
| | | userMap.put("newUserCount", joinUsers.size()); |
| | | userMap.put("joinUsers", userVos); |
| | | |
| | | String[] sendEmails = this.userJoinStatisticsEmail.replaceAll("\\p{Z}", "").split(","); |
| | | List<String> encryptSendEmail = Lists.newArrayList(); |
| | | if (this.userJoinStatisticsEmail != null && !this.userJoinStatisticsEmail.equals("")) { |
| | | String[] sendEmails = this.userJoinStatisticsEmail.replaceAll("\\p{Z}", "").split(","); |
| | | List<String> encryptSendEmail = Lists.newArrayList(); |
| | | |
| | | for (String sendEmail : sendEmails) { |
| | | encryptSendEmail.add(CommonUtil.encryptAES128(sendEmail)); |
| | | for (String sendEmail : sendEmails) { |
| | | encryptSendEmail.add(CommonUtil.encryptAES128(sendEmail)); |
| | | } |
| | | // 결제 성공 메일 발송 |
| | | this.systemEmailService.directEmail(encryptSendEmail.toArray(new String[encryptSendEmail.size()]), EmailType.USER_JOIN_STATISTICS, userMap, null); |
| | | } |
| | | |
| | | // 결제 성공 메일 발송 |
| | | this.systemEmailService.directEmail(encryptSendEmail.toArray(new String[encryptSendEmail.size()]), EmailType.USER_JOIN_STATISTICS, userMap, null); |
| | | } |
| | | |
| | | // 전체 사용자, 프로젝트 수, 이슈 수를 이메일로 보낸다. |
| | |
| | | userMap.put("projectCount", CommonUtil.getDecimalFormat(projectCount)); |
| | | userMap.put("userCount", CommonUtil.getDecimalFormat(activeUsers.size())); |
| | | |
| | | String[] sendEmails = this.totalStatisticsEmail.replaceAll("\\p{Z}", "").split(","); |
| | | List<String> encryptSendEmail = Lists.newArrayList(); |
| | | if (this.totalStatisticsEmail != null && !this.totalStatisticsEmail.equals("")) { |
| | | String[] sendEmails = this.totalStatisticsEmail.replaceAll("\\p{Z}", "").split(","); |
| | | List<String> encryptSendEmail = Lists.newArrayList(); |
| | | |
| | | for (String sendEmail : sendEmails) { |
| | | encryptSendEmail.add(CommonUtil.encryptAES128(sendEmail)); |
| | | for (String sendEmail : sendEmails) { |
| | | encryptSendEmail.add(CommonUtil.encryptAES128(sendEmail)); |
| | | } |
| | | |
| | | // 결제 성공 메일 발송 |
| | | this.systemEmailService.directEmail(encryptSendEmail.toArray(new String[encryptSendEmail.size()]), EmailType.TOTAL_STATISTICS, userMap, null); |
| | | } |
| | | |
| | | // 결제 성공 메일 발송 |
| | | this.systemEmailService.directEmail(encryptSendEmail.toArray(new String[encryptSendEmail.size()]), EmailType.TOTAL_STATISTICS, userMap, null); |
| | | } |
| | | |
| | | |