示例#1
0
  /**
   * @param 订单列表
   * @return
   */
  public static List<OrderBean> OrderInfo_LineTeach(String content) {
    List<OrderBean> dates = new ArrayList<OrderBean>();
    try {
      JSONObject jsonobject = new JSONObject(content);
      OrderBean orderBean = new OrderBean();
      orderBean.allOrder = jsonobject.optInt("allOrder");
      orderBean.payed = jsonobject.optInt("payed");
      orderBean.nopay = jsonobject.optInt("nopay");
      orderBean.nocomment = jsonobject.optInt("nocomment");
      JSONArray ja = new JSONArray(jsonobject.getString("data"));
      for (int i = 0; i < ja.length(); i++) {
        dates = JSON.parseArray(ja.toString(), OrderBean.class);
      }

      return dates;
    } catch (JSONException e) {
      e.printStackTrace();
    }
    return dates;
  }
示例#2
0
  /**
   * @param 订单列表
   * @return
   */
  public static List<OrderBean> OrderInfo(String content) {
    List<OrderBean> dates = new ArrayList<OrderBean>();
    try {
      JSONObject jsonobject = new JSONObject(content);
      OrderBean orderBean = new OrderBean();
      orderBean.allOrder = jsonobject.optInt("allOrder");
      orderBean.payed = jsonobject.optInt("payed");
      orderBean.nopay = jsonobject.optInt("nopay");
      orderBean.nocomment = jsonobject.optInt("nocomment");

      Message message = new Message();
      message.obj = orderBean;
      MarkOrderTabMAinActivity.markOrderTabMAinActivity.handler.sendMessage(message);
      JSONArray ja = new JSONArray(jsonobject.getString("data"));
      for (int i = 0; i < ja.length(); i++) {
        dates = JSON.parseArray(ja.toString(), OrderBean.class);
      }

      return dates;
    } catch (JSONException e) {
      e.printStackTrace();
    }
    return dates;
  }