保誠-保戶業務員媒合平台
HelenHuang
2021-12-24 1d8e72674b2d14270fe5c2ba6fe3be4efa28a924
Merge branch 'master' of https://dev.pollex.com.tw:8443/r/pcalife/PAM
修改7個檔案
28 ■■■■■ 已變更過的檔案
pamapi/src/main/java/com/pollex/pam/config/ApplicationProperties.java 9 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/service/SendMsgService.java 4 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/web/rest/TestSendMsgResource.java 5 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/resources/config/application-dev.yml 1 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/resources/config/application-pollex.yml 1 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/resources/config/application-sit.yml 5 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/resources/config/application-uat.yml 3 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/config/ApplicationProperties.java
@@ -116,6 +116,7 @@
        private String sourceCode;
        private String sender;
        private String smsType;
        private String subject;
        public String getUrl() {
            return url;
@@ -148,6 +149,14 @@
        public void setSmsType(String smsType) {
            this.smsType = smsType;
        }
        public String getSubject() {
            return subject;
        }
        public void setSubject(String subject) {
            this.subject = subject;
        }
    }
    public static class Email {
pamapi/src/main/java/com/pollex/pam/service/SendMsgService.java
@@ -131,7 +131,7 @@
        sendSMSRequest.setSender(smsProperties.getSender());
        sendSMSRequest.setMsgTypeSet(smsProperties.getSmsType());
        sendSMSRequest.setSendTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:00")));
        sendSMSRequest.setSubject("");
        sendSMSRequest.setSubject(encoder.encodeToString(smsProperties.getSubject().getBytes(StandardCharsets.UTF_8)));
        sendSMSRequest.setActivityId("");
        SMSDetail smsDetail = new SMSDetail();
@@ -194,7 +194,7 @@
            SendMailResponse sendMailResponse = new ObjectMapper().readValue(responseEntity.getBody(), SendMailResponse.class);
            log.debug("sendMailResponse = {}", sendMailResponse);
//            if(sendMailResponse == null || sendMailResponse.getData() == null || "ADDED".equalsIgnoreCase(sendMailResponse.getData().getMessageStatus())) {
//            if(sendMailResponse == null || sendMailResponse.getData() == null || !"ADDED".equalsIgnoreCase(sendMailResponse.getData().getMessageStatus())) {
//                throw new SendEmailFailException();
//            }
pamapi/src/main/java/com/pollex/pam/web/rest/TestSendMsgResource.java
@@ -41,9 +41,4 @@
    ) {
        return ResponseEntity.ok(sendMsgService.sendMsgByHtmlTestTemplateEmail(from, to));
    }
    @GetMapping("/appointment/{appointmentId}")
    public void sendAppointmentNotify(@PathVariable Long appointmentId) {
        sendMsgService.sendAppointmentNotify(appointmentRepository.findById(appointmentId).get());
    }
}
pamapi/src/main/resources/config/application-dev.yml
@@ -126,6 +126,7 @@
    source-code: ePos
    sender: POS
    sms-type: '0017'
    subject: '媒合平台通知'
  email:
    url: https://localhost:8081/testEmail
    function-id: epos
pamapi/src/main/resources/config/application-pollex.yml
@@ -124,6 +124,7 @@
    source-code: ePos
    sender: POS
    sms-type: '0017'
    subject: '媒合平台通知'
  email:
    url: https://localhost:8081/testEmail
    function-id: epos
pamapi/src/main/resources/config/application-sit.yml
@@ -118,12 +118,13 @@
  e-service-login-func: ValidateUsrLogin
  e-service-login-sys: epos
  front-end-domain: https://vtwlifeopensyssit.pru.intranet.asia/pam
  send-notify-msg: true
  send-notify-msg: false
  sms:
    url: https://vtwlifewinbo66.pru.intranet.asia/MesgQueueMgmnt/rest/smsSendMsgResource
    url: https://vtwlifeopensysuat.pru.intranet.asia/MesgQueueMgmnt/rest/smsSendMsgResource
    source-code: ePos
    sender: POS
    sms-type: '0017'
    subject: '媒合平台通知'
  email:
    url: https://vtwlifeopensysuat.pru.intranet.asia/tsgw/mq/mqSendMail
    function-id: epos
pamapi/src/main/resources/config/application-uat.yml
@@ -120,10 +120,11 @@
  front-end-domain: https://vtwlifeopensysuat.pru.intranet.asia/pam
  send-notify-msg: true
  sms:
    url: https://vtwlifewinbo66.pru.intranet.asia/MesgQueueMgmnt/rest/smsSendMsgResource
    url: https://vtwlifeopensysuat.pru.intranet.asia/MesgQueueMgmnt/rest/smsSendMsgResource
    source-code: ePos
    sender: POS
    sms-type: '0017'
    subject: '媒合平台通知'
  email:
    url: https://vtwlifeopensysuat.pru.intranet.asia/tsgw/mq/mqSendMail
    function-id: epos