update framework/src/main/java/cn/lili/modules/sms/impl/SmsUtilAliImplService.java.

抛出返回码错误
This commit is contained in:
zypy333
2022-07-08 03:57:53 +00:00
committed by Gitee
parent 4b5dcec08b
commit d185b548f7

View File

@@ -156,6 +156,9 @@ public class SmsUtilAliImplService implements SmsUtil, AliSmsUtil {
.setTemplateParam(JSONUtil.toJsonStr(param)); .setTemplateParam(JSONUtil.toJsonStr(param));
try { try {
SendSmsResponse response = client.sendSms(sendSmsRequest); SendSmsResponse response = client.sendSms(sendSmsRequest);
if (!("OK").equals(response.getBody().getCode())) {
throw new ServiceException(response.getBody().getMessage());
}
} catch (Exception e) { } catch (Exception e) {
log.error("发送短信错误", e); log.error("发送短信错误", e);
} }