Home>사용자>DropDown>OWL 프로필>정보 수정 실시간 기능 추가 완료
| | |
| | | public static final String QNA_EMPTY_CONTENT = "QNA_EMPTY_CONTENT"; // QNA 제목 및 내용 중 입력 값이 없는 필드가 있습니다. |
| | | |
| | | public static final String RESERVATION_EMAIL_TITLE = "RESERVATION_EMAIL_TITLE"; // [OWL ITS] 어제 이슈 및 활동 현황입니다. |
| | | public static final String REALTIME_EMAIL_TITLE = "REALTIME_EMAIL_TITLE"; // [OWL ITS] 어제 이슈 및 활동 현황입니다. |
| | | public static final String FILE_TYPE_NOT_ALLOW = "FILE_TYPE_NOT_ALLOW"; // 허용되지 않은 파일 유형입니다. |
| | | |
| | | |
| | |
| | | |
| | | List<Map<String, Object>> findByReservationNotifyTime(Map<String, Object> conditions); |
| | | |
| | | List<Map<String, Object>> findByRealTimeNotifyTime(Map<String, Object> conditions); |
| | | |
| | | List<Map<String, Object>> findByAllWorkspace(UserCondition userCondition); |
| | | |
| | | Long countByAllWorkspace(UserCondition userCondition); |
| | |
| | | @Component |
| | | public class Scheduler { |
| | | |
| | | /*private static final Logger log = LoggerFactory.getLogger(Scheduler.class); |
| | | private static final Logger log = LoggerFactory.getLogger(Scheduler.class); |
| | | |
| | | @Autowired |
| | | private PaymentService paymentService; |
| | |
| | | this.userService.sendTotalStatisticsEmail(); |
| | | } |
| | | |
| | | @Scheduled(cron = "0 50 23 * * *") // 매 시간 (초, 분, 시, 일, 월, 년) |
| | | /*@Scheduled(cron = "0 50 23 * * *") // 매 시간 (초, 분, 시, 일, 월, 년) |
| | | public void updateExchangeRatePayment() { |
| | | // 변경된 환율 정보를 결제 금액에 업데이트한다. |
| | | this.paymentService.updateExchangeRatePayment(); |
| | | } |
| | | }*/ |
| | | |
| | | // 자동 결재 - 어제가 만료일인 업무 공간을 찾아서 결제한다. 새벽 1시에 실행 |
| | | @Scheduled(cron = "0 0 01 * * *") // 매 시간 (초, 분, 시, 일, 월, 년) |
| | | /*@Scheduled(cron = "0 0 01 * * *") // 매 시간 (초, 분, 시, 일, 월, 년) |
| | | public void subscribePayment() { |
| | | List<Workspace> workspaces = this.workspaceService.findSubscribeImmediateExpireDate(); |
| | | |
| | | for (Workspace workspace : workspaces) { |
| | | this.paymentService.subscribeImmediate(workspace); |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | // 이슈와 연결되지 않은 첨부파일 삭제 - 이슈 생성, 수정에서 에디트 창에 첨부했다가 저장하지 않은 파일들... 새벽 1시 30분에 실행 |
| | | @Scheduled(cron = "0 30 01 * * *") |
| | |
| | | } |
| | | |
| | | // 업무 공간 자동 초기화 - 어제가 만료일인 업무 공간을 찾아서 업무 공간 사용자, 사용 용량을 초기화한다. 새벽 2시에 실행 |
| | | @Scheduled(cron = "0 0 02 * * *") |
| | | /*@Scheduled(cron = "0 0 02 * * *") |
| | | public void expireWorkspace() { |
| | | // 사용 기간이 만료된 업무 공간을 찾아 용량, 최대 사용자, 서비스 유형을 변경한다. |
| | | this.workspaceService.expireWorkspace(); |
| | | // 업무 공간 만료 예정 안내 |
| | | this.workspaceService.expireAlarmWorkspace(); |
| | | } |
| | | }*/ |
| | | |
| | | // 이메일 예약 발송 - 사용자가 설정한 알림 시간에 시스템에서 일어난 이벤트를 이메일로 발송한다. - 매시간 30분에 실행 |
| | | @Scheduled(cron = "0 0/30 * * * *") |
| | |
| | | this.systemEmailService.reservationSendEmail(); |
| | | } |
| | | |
| | | // 이메일 실시간 발송 - 10초마다 실행 |
| | | @Scheduled(fixedDelay = 10000) |
| | | public void realTimeEmailSystem() { |
| | | // 실시간 이메일 발송 |
| | | this.systemEmailService.realTimeSendEmail(); |
| | | } |
| | | |
| | | // 15초 마다 접속자 확인 |
| | | @Scheduled(fixedDelay = 15000) |
| | | /*@Scheduled(fixedDelay = 15000) |
| | | public void pingUsers() { |
| | | // 접속 사용자를 확인한다. |
| | | this.webSocketService.checkActiveUser(); |
| | |
| | | |
| | | void reservationSendEmail(); |
| | | |
| | | void realTimeSendEmail(); |
| | | |
| | | void information(Map<String, Object> params); |
| | | } |
| | |
| | | |
| | | List<String> findByReservationNotifyTime(); |
| | | |
| | | List<String> findByRealTimeNotifyTime(); |
| | | |
| | | List<Map<String, Object>> findProjectMember(Project project); |
| | | |
| | | void updateLanguage(String language); |
| | |
| | | public void detectSendIssueMail(IssueHistoryType type, IssueForm issueForm, StringBuilder description) { |
| | | if (type == IssueHistoryType.SEND) { |
| | | description.append("<span translate=\"issue.sendIssueMailHistory\">이슈 메일 전송을 완료했습니다. </span>"); |
| | | description.append("<span class=\"text-primary bold\"> > " + CommonUtil.decryptAES128(issueForm.getSendEmails().toString()) + "</span>"); |
| | | if(issueForm.getSendEmails() != null && issueForm.getSendEmails().size() > 0){ |
| | | for (String sendEmail : issueForm.getSendEmails()){ |
| | | description.append("<span class=\"text-primary bold\"> > " + CommonUtil.decryptAES128(sendEmail) + "</span>"); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | import com.google.common.collect.Lists; |
| | | import com.sun.mail.smtp.SMTPAddressFailedException; |
| | | import kr.wisestone.owl.config.CommonConfiguration; |
| | | import kr.wisestone.owl.constant.ElasticSearchConstants; |
| | | import kr.wisestone.owl.constant.MailConstants; |
| | | import kr.wisestone.owl.constant.MsgConstants; |
| | | import kr.wisestone.owl.domain.Department; |
| | |
| | | import kr.wisestone.owl.repository.SystemEmailRepository; |
| | | import kr.wisestone.owl.service.SystemEmailService; |
| | | import kr.wisestone.owl.service.UserService; |
| | | import kr.wisestone.owl.util.CommonUtil; |
| | | import kr.wisestone.owl.util.DateUtil; |
| | | import kr.wisestone.owl.util.MapUtil; |
| | | import kr.wisestone.owl.util.StringTemplateUtil; |
| | | import kr.wisestone.owl.util.*; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | } |
| | | } |
| | | |
| | | // 실시간 이메일 발송 |
| | | @Override |
| | | @Transactional |
| | | public void realTimeSendEmail() { |
| | | |
| | | List<String> sendUsers = this.userService.findByRealTimeNotifyTime(); |
| | | |
| | | for (String sendUser : sendUsers) { |
| | | // 사용자 별로 아직 발송되지 않은 이메일을 조회한다. |
| | | List<SystemEmail> systemEmails = this.findBySendAddressAndSendYn(sendUser); |
| | | StringBuilder emailBuilder = new StringBuilder(); |
| | | User user = this.userService.findByAccount(sendUser); |
| | | |
| | | if (user != null) { |
| | | Locale locale = CommonUtil.getUserLanguage(user.getLanguage()); // 메일을 받는 사용자가 사용하고 있는 언어 정보를 가져온다. |
| | | |
| | | for (SystemEmail systemEmail : systemEmails) { |
| | | // 받는 사람의 언어로 변경하여 예약된 이메일을 발송한다. |
| | | this.makeReservationContextEmail(emailBuilder, systemEmail, locale); |
| | | systemEmail.setSendYn(true); |
| | | } |
| | | // 내용이 있으면 발송 |
| | | if (!StringUtils.isEmpty(emailBuilder.toString())) { |
| | | // 이메일을 발송한다. |
| | | this.sendEmail(this.messageAccessor.message(MsgConstants.REALTIME_EMAIL_TITLE, locale), emailBuilder.toString(), new String[]{CommonUtil.decryptAES128(sendUser)}, null); |
| | | this.systemEmailRepository.saveAll(systemEmails); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 받는 사람의 언어로 변경하여 예약된 이메일을 발송한다. |
| | | private void makeReservationContextEmail(StringBuilder emailBuilder, SystemEmail systemEmail, Locale locale) { |
| | | MailConstants mailConstants; |
| | |
| | | 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) |
| | |
| | | |
| | | <!-- 이메일 예약 시간 찾기 --> |
| | | <select id="findByReservationNotifyTime" resultType="java.util.HashMap" parameterType="java.util.HashMap"> |
| | | select account from user where reservation_notify_time between |
| | | #{startTime} and #{endTime} |
| | | select account from user |
| | | where reservation_notify_time between #{startTime} and #{endTime} |
| | | </select> |
| | | |
| | | <!-- 이메일 실시간 찾기 --> |
| | | <select id="findByRealTimeNotifyTime" resultType="java.util.HashMap" parameterType="java.util.HashMap"> |
| | | select account from user |
| | | where reservation_notify_time = "realTime" |
| | | </select> |
| | | |
| | | <select id="findByAllWorkspace" resultType="java.util.HashMap" parameterType="kr.wisestone.owl.web.condition.UserCondition"> |
| | |
| | | EXCEL_IMPORT_PERIOD_NOT_VALIDITY_EMPTY=\uB2E4\uC74C \uC5D1\uC140 \uB77C\uC778\uC5D0\uC11C \uC785\uB825\uD55C \uC2DC\uC791\uC77C, \uC885\uB8CC\uC77C\uC5D0 \uBB38\uC81C\uAC00 \uC788\uC2B5\uB2C8\uB2E4. \uACF5\uBC31\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uB294\uC9C0 \uD655\uC778 \uD6C4 \uACF5\uBC31\uC744 \uC81C\uAC70\uD558\uC138\uC694. \n \uB77C\uC778 \uC815\uBCF4 : {0} |
| | | EXCEL_IMPORT_MAX_ROWS_OVER = \uC5D1\uC140 \uC5C5\uB85C\uB4DC\uB85C \uC774\uC288 \uB4F1\uB85D\uC740 \uCD5C\uB300 1,000 \uAC74\uAE4C\uC9C0\uB9CC \uAC00\uB2A5\uD569\uB2C8\uB2E4. \uB9CC\uC57D \uC791\uC131\uB41C \uC5D1\uC140\uC774 1,000 \uAC74 \uC774\uD558\uC77C \uACBD\uC6B0 \uC774 \uBA54\uC2DC\uC9C0\uAC00 \uD45C\uC2DC\uB418\uBA74 \uB9C8\uC9C0\uB9C9 \uC791\uC131\uB41C \uD589\uC774\uD6C4\uC758 \uBAA8\uB4E0 \uD589\uC744 \uC0AD\uC81C\uD55C \uD6C4 \uB2E4\uC2DC \uC2DC\uB3C4\uD574\uC8FC\uC138\uC694. |
| | | RESERVATION_EMAIL_TITLE=[OWL ITS] \uC5B4\uC81C \uC774\uC288 \uBC0F \uD65C\uB3D9 \uD604\uD669\uC785\uB2C8\uB2E4. |
| | | REALTIME_EMAIL_TITLE=[OWL ITS] \uC2E4\uC2DC\uAC04 \uC774\uC288 \uBC0F \uD65C\uB3D9 \uD604\uD669\uC785\uB2C8\uB2E4. |
| | | |
| | | ISSUE_RESERVATION_VALUE_INVALID=\uC774\uC288 \uBC1C\uC0DD \uC608\uC57D\uC77C\uC774 \uC798\uBABB\uB418\uC5C8\uC2B5\uB2C8\uB2E4. |
| | | ISSUE_RESERVATION_NOT_EXIST=\uC774\uC288 \uBC1C\uC0DD \uC608\uC57D \uC815\uBCF4\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. |
| | |
| | | name: "", |
| | | phone: "", |
| | | reservationNotifyTime : "", // 이메일 알림 시간 |
| | | realtimeNotify : "", // 이메일 실시간 |
| | | profileImage : null, // 업로드하는 프로필 |
| | | profileImageName : null // 프로필 명 |
| | | } |
| | |
| | | $scope.vm.form.name = result.data.data.name; |
| | | $scope.vm.form.account = result.data.data.account; |
| | | $scope.vm.form.phone = result.data.data.phone; |
| | | $scope.vm.form.reservationNotifyTime = result.data.data.reservationNotifyTime; |
| | | if(result.data.data.reservationNotifyTime === "realTime"){ |
| | | $scope.vm.form.reservationNotifyTime = ""; |
| | | $scope.vm.form.realtimeNotify = true; |
| | | }else{ |
| | | $scope.vm.form.reservationNotifyTime = result.data.data.reservationNotifyTime; |
| | | } |
| | | } |
| | | else { |
| | | SweetAlert.swal($filter("translate")("users.failedToSelectUserDetail"), result.data.message.message, "error"); // "사용자 상세 정보 조회 실패" |
| | |
| | | content.name = $rootScope.preventXss(content.name); |
| | | content.phone = $rootScope.preventXss(content.phone); |
| | | content.profile = $scope.vm.form.profileImageName; |
| | | if(content.realtimeNotify){ |
| | | content.reservationNotifyTime = "realTime"; |
| | | }else { |
| | | content.reservationNotifyTime = $scope.vm.form.reservationNotifyTime; |
| | | } |
| | | |
| | | User.modify({ |
| | | method : "POST", |
| | |
| | | <div class="col-sm-6"> |
| | | <div class="form-group"> |
| | | <label for="userModifyForm3"><span translate="users.setEmailNotificationTime">이메일 알림 시간 설정</span> <code class="highlighter-rouge">*</code></label> |
| | | |
| | | <input class="form-control" |
| | | type="checkbox" |
| | | ng-model="vm.form.realtimeNotify"> 실시간 알림 |
| | | <input class="form-control" |
| | | type="text" |
| | | id="userModifyForm3" |
| | | date-time-picker |
| | | option="Y" |
| | | required |
| | | ng-disabled="vm.form.realtimeNotify" |
| | | ng-required="!vm.form.realtimeNotify" |
| | | ng-model="vm.form.reservationNotifyTime"> |
| | | </div> |
| | | </div> |