Exemplo n.º 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]);
          }
        });
  }
Exemplo n.º 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]);
          }
        });
  }
Exemplo n.º 3
0
  /**
   * @Description:我的心愿赞助答复录入
   *
   * @param handler
   * @date:2015-2-12
   */
  public static void replayMyWishSponsor(
      Handler handler, Map<String, String> params, final int... attachments) {
    if (params == null) {
      return;
    }
    params.put(NetRequest.REQUEST_URL, MYWISH_REPLAY_URL);

    NetRequest.doGetRequest(
        params,
        new RequestResult<BaseModel>(BaseModel.class, handler) {

          @Override
          public void getData(NetEntityBase netEntityBase, BaseModel t, Handler handler) {
            HandlerConstants.sendMessage(
                handler, t, attachments[0], HandlerConstants.RESULT_OK, attachments[1]);
          }

          @Override
          public void onFailure(HttpException arg0, String arg1) {}
        });
  }
Exemplo n.º 4
0
  /**
   * @Description:心愿详情信息
   *
   * @param handler
   * @date:2015-2-12
   */
  public static void getWishLiveDetail(
      final Handler handler, Map<String, String> params, final int... attachments) {
    if (params == null) {
      return;
    }
    params.put(NetRequest.REQUEST_URL, WISH_DETAIL_URL);

    NetRequest.doGetRequest(
        params,
        new RequestResult<WishDetailModel>(WishDetailModel.class, handler) {

          @Override
          public void getData(NetEntityBase netEntityBase, WishDetailModel 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]);
          }
        });
  }