!208 解决短信发送失败 时,前端无感知问题。from zypy333/N/A

Merge pull request !208 from zypy333/N/A
This commit is contained in:
Chopper711 2022-07-11 03:51:16 +00:00 committed by Gitee
commit d14b87729a
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);
}