From d185b548f7a45209b331efc48547eea5d68ef4fd Mon Sep 17 00:00:00 2001 From: zypy333 Date: Fri, 8 Jul 2022 03:57:53 +0000 Subject: [PATCH] =?UTF-8?q?update=20framework/src/main/java/cn/lili/module?= =?UTF-8?q?s/sms/impl/SmsUtilAliImplService.java.=20=E6=8A=9B=E5=87=BA?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=A0=81=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cn/lili/modules/sms/impl/SmsUtilAliImplService.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/src/main/java/cn/lili/modules/sms/impl/SmsUtilAliImplService.java b/framework/src/main/java/cn/lili/modules/sms/impl/SmsUtilAliImplService.java index f54982e2..4ade384c 100644 --- a/framework/src/main/java/cn/lili/modules/sms/impl/SmsUtilAliImplService.java +++ b/framework/src/main/java/cn/lili/modules/sms/impl/SmsUtilAliImplService.java @@ -156,6 +156,9 @@ public class SmsUtilAliImplService implements SmsUtil, AliSmsUtil { .setTemplateParam(JSONUtil.toJsonStr(param)); try { SendSmsResponse response = client.sendSms(sendSmsRequest); + if (!("OK").equals(response.getBody().getCode())) { + throw new ServiceException(response.getBody().getMessage()); + } } catch (Exception e) { log.error("发送短信错误", e); }