Examples of QqAddTopicResultBean


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

   
    // 请求接口,获取发布心情结果
    String jsonData = oqu.doPost(OpenQqConstants.QQ_ADD_TOPIC_URL,this.getAddTopicParam(addTopicBean));
   
    // 接口数据
    QqAddTopicResultBean resultBean = this.jsonToBean(jsonData);
   
    // 日志
    log.info("发布心情 开始...");
   
    return resultBean;
View Full Code Here

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

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

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

   * @param jsonData 接口返回的数据
   * @return javaBean
   * @throws JSONException
   */
  private QqAddTopicResultBean jsonToBean(String jsonData) throws JSONException {
    QqAddTopicResultBean resultBean = new QqAddTopicResultBean();
   
    JSONObject jsonObjRoot;
    try {
      jsonObjRoot = new JSONObject(jsonData);
     
      // 接口返回错误的场合
      if (jsonObjRoot.getInt("ret") != 0) {
        // 设置错误标识为真
        resultBean.setErrorFlg(true);
        // 设置错误编号
        resultBean.setErrorCode(jsonObjRoot.get("errcode").toString());
        // 设置错误内容
        resultBean.setErrorMes(jsonObjRoot.getString("msg"));
      }
    } catch (JSONException e) {
      e.printStackTrace();
      throw e;
    }
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.