阿里大鱼 BizResult为什么会为空????但是rsp.getBody()又是有的
/ 发送短信验证码 /
public static BizResult sendSmsVerifyCode(String agentphone, int code) {
TaobaoClient client = new DefaultTaobaoClient(HTTP, API_KEY, APP_SECRET);
AlibabaAliqinFcSmsNumSendRequest req = new AlibabaAliqinFcSmsNumSendRequest();
req.setSmsType("normal");
req.setSmsFreeSignName("登录验证");
// 验证码${code},您正在登录${product},若非本人操作,请勿泄露。
String content = "{\"code\":\"" + code + "\",\"product\":\"xxx\"}";
req.setSmsParamString(content);
req.setRecNum(agentphone);
req.setSmsTemplateCode("SMS_1535006");
AlibabaAliqinFcSmsNumSendResponse rsp;
try {
rsp = client.execute(req);
System.out.println("xxx==" + rsp.toString());
String body = rsp.getBody();
BizResult bizResult = rsp.getResult();
System.out.println("xxxx==" + body.toString());
// System.out.println(bizResult.getSuccess());
return bizResult;
} catch (ApiException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return null;
}
}
我写过一个文章
https://segmentfault.com/a/1190000003884148
语言不同 流程 和签名方式相同 js 人人都能看懂