阿里大鱼 BizResult

阿里大鱼 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;
    }
}
阅读 5.6k
1 个回答
宣传栏