Examples of QqAddShareResultBean


Examples of com.qq.open.qzone.bean.result.QqAddShareResultBean

   
    // 分享结果
    String jsonData = oqu.doPost(OpenQqConstants.QQ_ADD_SHARE_URL,this.getAddSharParam(addShareBean));
   
    // 分享结果
    QqAddShareResultBean resulstBean = this.jsonToBean(jsonData);
   
    // 日志
    log.info("发布一条动态 结束....");
   
    return resulstBean;
View Full Code Here

Examples of com.qq.open.qzone.bean.result.QqAddShareResultBean

   * @param jsonData 接口返回的数据
   * @return JavaBean数据
   * @throws JSONException
   */
  private QqAddShareResultBean jsonToBean(String jsonData) throws JSONException {
    QqAddShareResultBean resultBean = new QqAddShareResultBean();
   
    // 接口返回的数据json
    JSONObject jsonObjRoot;
    try {
      jsonObjRoot = new JSONObject(jsonData);
     
      // 接口返回错误的场合
      if (jsonObjRoot.getInt("ret") != 0) {
        // 设置错误标识为真
        resultBean.setErrorFlg(true);
       
        // 设置错误编号
        resultBean.setErrorCode(jsonObjRoot.get("ret").toString());
       
        // 设置错误信息
        resultBean.setErrorMes(jsonObjRoot.getString("msg"));
      }
    } catch (JSONException e) {
      e.printStackTrace();
      log.error("addShare 异常,json数据是:" + jsonData);
      throw e;
View Full Code Here

Examples of com.qq.open.qzone.bean.result.QqAddShareResultBean

   * @param jsonData 接口返回的数据
   * @return JavaBean数据
   * @throws JSONException
   */
  private QqAddShareResultBean jsonToBean(String jsonData) throws JSONException {
    QqAddShareResultBean resultBean = new QqAddShareResultBean();
   
    // 接口返回的数据json
    JSONObject jsonObjRoot = new JSONObject(jsonData);
   
    // 接口返回错误的场合
    if (jsonObjRoot.getInt("ret") != 0) {
      // 设置错误标识为真
      resultBean.setErrorFlg(true);
     
      // 设置错误编号
      resultBean.setErrorCode(jsonObjRoot.get("ret").toString());
     
      // 设置错误信息
      resultBean.setErrorMes(jsonObjRoot.getString("msg"));
    }
   
    return resultBean;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.