|
@@ -56,7 +56,7 @@ public class AliyunService {
|
|
|
* @param code
|
|
|
*/
|
|
|
@Async
|
|
|
- public boolean sms(String phone, String code) {
|
|
|
+ public void sms(String phone, String code) {
|
|
|
logger.info("阿里云发送验证码: {} : {}", phone, code);
|
|
|
CommonRequest request = new CommonRequest();
|
|
|
// request.setSysProtocol(ProtocolType.HTTPS);
|
|
@@ -71,11 +71,9 @@ public class AliyunService {
|
|
|
try {
|
|
|
CommonResponse response = smsClient.getCommonResponse(request);
|
|
|
logger.info("阿里云短信API返回: {}", JsonUtil.toJson(response));
|
|
|
- return Objects.nonNull(response) && Objects.nonNull(response.getData());
|
|
|
} catch (Exception e) {
|
|
|
logger.error("阿里云短信API异常", e);
|
|
|
}
|
|
|
- return false;
|
|
|
}
|
|
|
|
|
|
/**
|