|
@@ -82,16 +82,19 @@ public class SmsVerServiceImpl implements SmsVerService {
|
|
|
//request.setSmsUpExtendCode("90997");
|
|
|
//可选:outId为提供给业务方扩展字段,最终在短信回执消息中将此值带回给调用者
|
|
|
//request.setOutId("yourOutId");
|
|
|
+ String strRsp = "";
|
|
|
try {
|
|
|
//此处可能会抛出异常,注意catch
|
|
|
SendSmsResponse rsp = acsClient.getAcsResponse(request);
|
|
|
- System.out.println(GsonUtil.toJson(rsp));
|
|
|
+ strRsp = GsonUtil.toJson(rsp);
|
|
|
+ log.info(strRsp);
|
|
|
if ((null == rsp) || !(rsp.getCode().equals("OK"))) {
|
|
|
+ log.error("发送短信错误 【" + strRsp + "】");
|
|
|
throw new CommonException(ServiceErrorCode.SMS_SEND_ERROR);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
- log.error("发送短信错误 【" + e.getMessage() + "】");
|
|
|
+ log.error("发送短信错误 【" + strRsp + "】");
|
|
|
throw new CommonException(ServiceErrorCode.SMS_SEND_ERROR);
|
|
|
}
|
|
|
return code;
|