From e08e0d877a40db15ff667337ee34c2c1ab219d1c Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期一, 10 一月 2022 12:06:58 +0800 Subject: [PATCH] update: TODO#133824 企業識別Logo調整 --- pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java b/pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java index b624ba0..f79a9c8 100644 --- a/pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java +++ b/pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java @@ -189,11 +189,11 @@ String consultantMobile = consultantService.findByAgentNo(appointment.getAgentNo()).getPhoneNumber(); try { - if(StringUtils.hasText(consultantMobile)) { - sendMsgService.sendMsgBySMS(consultantMobile, msg); + if(!StringUtils.hasText(consultantMobile)) { + throw new SendSMSFailException("the consultant does not have mobile!"); } - throw new SendSMSFailException("the consultant does not have mobile!"); + sendMsgService.sendMsgBySMS(consultantMobile, msg); } catch (SendSMSFailException e) { log.warn("send appointment notify by sms was fail, appointment Id = {}", appointment.getId(), e); } @@ -202,13 +202,13 @@ private String getAppointmentNotifyWording(Appointment appointment) { String normalContent; if(StringUtils.hasText(appointment.getPhone())) { - normalContent = "閬芣��“��憟踝����蝑�靽�犖憯賢��像��������恥�����Ⅳ�" + appointment.getPhone() + "\n\n"; + normalContent = "閬芣��“��憟踝����蝑�靽�犖憯賢��像��������恥�����Ⅳ�" + appointment.getPhone(); } else { - normalContent = "閬芣��“��憟踝����蝑�靽�犖憯賢��像�����n\n"; + normalContent = "閬芣��“��憟踝����蝑�靽�犖憯賢��像������"; } - String urlContent = "隢��雯��嚗�" + getAppointmentDetailUrl(appointment.getId()) + " ����蒂摰�蝯∟赤隢�����"; + String urlContent = "嚗���雯��嚗�" + getAppointmentDetailUrl(appointment.getId()) + "����蒂摰�蝯∟赤隢�����"; return normalContent + urlContent; } @@ -219,10 +219,10 @@ String normalContent; if(StringUtils.hasText(customerMobile)) { - normalContent = "閬芣��“��憟踝����蝑�靽�犖憯賢��像��������恥�����Ⅳ�" + customerMobile + ""; + normalContent = "閬芣��“��憟踝����蝑�靽�犖憯賢��像��������恥�����Ⅳ�" + customerMobile + "嚗�"; } else { - normalContent = "閬芣��“��憟踝����蝑�靽�犖憯賢��像������"; + normalContent = "閬芣��“��憟踝����蝑�靽�犖憯賢��像�������"; } Context context = new Context(); @@ -231,11 +231,11 @@ String content = springTemplateEngine.process("mail/appointmentNotifyEmail", context); try { - if(StringUtils.hasText(consultantEmail)) { - sendMsgService.sendMsgByEmail(senderEmail, consultantEmail, NOTIFY_EMAIL_SUBJECT, content, true); + if(!StringUtils.hasText(consultantEmail)) { + throw new SendEmailFailException("the consultant does not have email!"); } - throw new SendEmailFailException("the consultant does not have email!"); + sendMsgService.sendMsgByEmail(senderEmail, consultantEmail, NOTIFY_EMAIL_SUBJECT, content, true); } catch (SendEmailFailException e) { log.warn("send appointment notify by email was fail, appointment Id = {}", appointment.getId(), e); } -- Gitblit v1.8.0