保誠-保戶業務員媒合平台
wayne
2021-12-29 de5237577689d6294a82e8541768f00f11a2b2cb
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);
        }
@@ -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);
        }