|
|
|
@@ -34,7 +34,7 @@ public class AliyunSMS implements SMSExcutor { |
|
|
|
sms.setSignName(signature); |
|
|
|
Result result = this.sendSms(sms); |
|
|
|
if(result.getSendSmsResponse().getCode() != null |
|
|
|
&& result.getSendSmsResponse().getCode().equals("ok")){ |
|
|
|
&& result.getSendSmsResponse().getCode().equalsIgnoreCase("ok")){ |
|
|
|
SMSResult.setRet("1"); |
|
|
|
SMSResult.setData(result.getSendSmsResponse().getBizId()); |
|
|
|
} |
|
|
|
@@ -50,7 +50,7 @@ public class AliyunSMS implements SMSExcutor { |
|
|
|
smsTemplate.setTemplateType(templateType); |
|
|
|
smsTemplate.setRemark(remark); |
|
|
|
AddSmsTemplateResponse addSmsTemplateResponse = this.addSmsTemplate(smsTemplate); |
|
|
|
if(addSmsTemplateResponse.getCode() != null && addSmsTemplateResponse.getCode().equals("ok")){ |
|
|
|
if(addSmsTemplateResponse.getCode() != null && addSmsTemplateResponse.getCode().equalsIgnoreCase("ok")){ |
|
|
|
SMSResult.setRet("1"); |
|
|
|
SMSResult.setAliyunModelCode(addSmsTemplateResponse.getTemplateCode()); |
|
|
|
} |
|
|
|
@@ -97,6 +97,7 @@ public class AliyunSMS implements SMSExcutor { |
|
|
|
log.error("添加签名发生错误。错误代码是 [{}],错误消息是 [{}],错误请求ID是 [{}],错误Msg是 [{}],错误类型是 [{}]", |
|
|
|
e.getErrCode(), e.getMessage(), e.getRequestId(), e.getErrMsg(), e.getErrorType()); |
|
|
|
} |
|
|
|
log.info("添加签名-----" + response.getCode() + "----" + response.getMessage()); |
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -115,6 +116,7 @@ public class AliyunSMS implements SMSExcutor { |
|
|
|
log.error("删除签名发生错误。错误代码是 [{}],错误消息是 [{}],错误请求ID是 [{}],错误Msg是 [{}],错误类型是 [{}]", |
|
|
|
e.getErrCode(), e.getMessage(), e.getRequestId(), e.getErrMsg(), e.getErrorType()); |
|
|
|
} |
|
|
|
log.info("删除签名-----" + response.getCode() + "----" + response.getMessage()); |
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -135,6 +137,7 @@ public class AliyunSMS implements SMSExcutor { |
|
|
|
log.error("修改签名发生错误。错误代码是 [{}],错误消息是 [{}],错误请求ID是 [{}],错误Msg是 [{}],错误类型是 [{}]", |
|
|
|
e.getErrCode(), e.getMessage(), e.getRequestId(), e.getErrMsg(), e.getErrorType()); |
|
|
|
} |
|
|
|
log.info("修改签名----" + response.getCode() + "----" + response.getMessage()); |
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -153,6 +156,7 @@ public class AliyunSMS implements SMSExcutor { |
|
|
|
log.error("查询签名发生错误。错误代码是 [{}],错误消息是 [{}],错误请求ID是 [{}],错误Msg是 [{}],错误类型是 [{}]", |
|
|
|
e.getErrCode(), e.getMessage(), e.getRequestId(), e.getErrMsg(), e.getErrorType()); |
|
|
|
} |
|
|
|
log.info("查询签名----" + response.getCode() + "----" + response.getMessage()); |
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -171,9 +175,10 @@ public class AliyunSMS implements SMSExcutor { |
|
|
|
try { |
|
|
|
response = acsClient.getAcsResponse(request); |
|
|
|
} catch (ClientException e) { |
|
|
|
log.error("添加签名发生错误。错误代码是 [{}],错误消息是 [{}],错误请求ID是 [{}],错误Msg是 [{}],错误类型是 [{}]", |
|
|
|
log.error(" 添加模板发生错误。错误代码是 [{}],错误消息是 [{}],错误请求ID是 [{}],错误Msg是 [{}],错误类型是 [{}]", |
|
|
|
e.getErrCode(), e.getMessage(), e.getRequestId(), e.getErrMsg(), e.getErrorType()); |
|
|
|
} |
|
|
|
log.info(" 添加模板----" + response.getCode() + "----" + response.getMessage()); |
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -189,9 +194,10 @@ public class AliyunSMS implements SMSExcutor { |
|
|
|
try { |
|
|
|
response = acsClient.getAcsResponse(request); |
|
|
|
} catch (ClientException e) { |
|
|
|
log.error("删除签名发生错误。错误代码是 [{}],错误消息是 [{}],错误请求ID是 [{}],错误Msg是 [{}],错误类型是 [{}]", |
|
|
|
log.error("删除模板发生错误。错误代码是 [{}],错误消息是 [{}],错误请求ID是 [{}],错误Msg是 [{}],错误类型是 [{}]", |
|
|
|
e.getErrCode(), e.getMessage(), e.getRequestId(), e.getErrMsg(), e.getErrorType()); |
|
|
|
} |
|
|
|
log.info(" 删除模板----" + response.getCode() + "----" + response.getMessage()); |
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -211,9 +217,10 @@ public class AliyunSMS implements SMSExcutor { |
|
|
|
try { |
|
|
|
response = acsClient.getAcsResponse(request); |
|
|
|
} catch (ClientException e) { |
|
|
|
log.error("修改签名发生错误。错误代码是 [{}],错误消息是 [{}],错误请求ID是 [{}],错误Msg是 [{}],错误类型是 [{}]", |
|
|
|
log.error("修改模板发生错误。错误代码是 [{}],错误消息是 [{}],错误请求ID是 [{}],错误Msg是 [{}],错误类型是 [{}]", |
|
|
|
e.getErrCode(), e.getMessage(), e.getRequestId(), e.getErrMsg(), e.getErrorType()); |
|
|
|
} |
|
|
|
log.info(" 修改模板----" + response.getCode() + "----" + response.getMessage()); |
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
@@ -229,9 +236,10 @@ public class AliyunSMS implements SMSExcutor { |
|
|
|
try { |
|
|
|
response = acsClient.getAcsResponse(request); |
|
|
|
} catch (ClientException e) { |
|
|
|
log.error("查询签名发生错误。错误代码是 [{}],错误消息是 [{}],错误请求ID是 [{}],错误Msg是 [{}],错误类型是 [{}]", |
|
|
|
log.error("查询模板发生错误。错误代码是 [{}],错误消息是 [{}],错误请求ID是 [{}],错误Msg是 [{}],错误类型是 [{}]", |
|
|
|
e.getErrCode(), e.getMessage(), e.getRequestId(), e.getErrMsg(), e.getErrorType()); |
|
|
|
} |
|
|
|
log.info(" 查询模板----" + response.getCode() + "----" + response.getMessage()); |
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
|