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
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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);
}