コード例 #1
0
  /**
   * @Description:心愿现场讨论区列表
   *
   * @param handler
   * @author: lz
   * @date:2015-2-12
   */
  public static void getWishTalkRead(
      final Handler handler, Map<String, String> params, final int... attachments) {
    if (params == null) {
      return;
    }
    params.put(NetRequest.REQUEST_URL, WISH_LIVE_TALK_URL);

    NetRequest.doGetRequestList(
        params,
        new RequestResultList<SubjectListModel>(SubjectListModel.class, handler) {

          @Override
          public void getDataList(
              NetEntityBase netEntityBase, List<SubjectListModel> t, Handler handler) {
            HandlerConstants.sendMessage(
                handler, t, attachments[0], HandlerConstants.RESULT_OK, attachments[1]);
          }

          @Override
          public void onFailure(HttpException arg0, String arg1) {
            HandlerConstants.sendMessage(
                handler, null, attachments[0], HandlerConstants.RESULT_FAIL, attachments[1]);
          }
        });
  }
コード例 #2
0
  /**
   * @Description:我的心愿赞助列表
   *
   * @param handler
   * @date:2015-2-12
   */
  public static void getMyWishSponsorList(
      final Handler handler, Map<String, String> params, final int... attachments) {
    if (params == null) {
      return;
    }
    params.put(NetRequest.REQUEST_URL, WISH_SPONOR_CHECKLIST);

    NetRequest.doGetRequestList(
        params,
        new RequestResultList<MyWishSponsorListModel>(MyWishSponsorListModel.class, handler) {

          @Override
          public void getDataList(
              NetEntityBase netEntityBase, List<MyWishSponsorListModel> t, Handler handler) {
            HandlerConstants.sendMessage(
                handler, t, attachments[0], HandlerConstants.RESULT_OK, attachments[1]);
          }

          @Override
          public void onFailure(HttpException error, String msg) {
            HandlerConstants.sendMessage(
                handler, null, attachments[0], HandlerConstants.RESULT_FAIL, attachments[1]);
          }
        });
  }