Пример #1
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) {}
        });
  }
Пример #2
0
  /**
   * @Description:心愿赞助清单
   *
   * @param handler
   * @date:2015-2-12
   */
  public static void getWishSponsorChecklist(
      final Handler handler, Map<String, String> params, final int... attachments) {
    if (params == null) {
      return;
    }
    params.put(NetRequest.REQUEST_URL, WISH_SPONOR_CHECKLIST);

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

          @Override
          public void getData(NetEntityBase netEntityBase, WishItemModel 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]);
          }
        });
  }
Пример #3
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]);
          }
        });
  }