private void loadMore() { skip += pageSize; SellerOrderServer.toGetSellerReturnOrder( status, skip + "", new CallBack() { @Override public void onSimpleSuccess(Object res) { mAbPullToRefreshView.onFooterLoadFinish(); // changeUi(UiModel.showData); if (res != null) { refoundstat = (SellerRefoundstat) res; if (refoundstat != null && !refoundstat.isNull() && myOrderListAdapter != null) { alls.addAll(refoundstat.getData()); myOrderListAdapter.notifyDataSetChanged(); } else { CommonUtil.toast("已到最后一页", getActivity()); } } MyLogger.i(alls.size() + ""); } @Override public void onSimpleFailure(int code) { skip -= pageSize; // changeUi(UiModel.); mAbPullToRefreshView.onFooterLoadFinish(); MyLogger.i("failure >>>>> " + code + " ,res >>>>> "); } }); }
public void getData() { MyLogger.i("status: " + status); SellerOrderServer.toGetSellerReturnOrder( status, "0", new CallBack() { @Override public void onSimpleSuccess(Object res) { System.out.println(">>>>>>退货订单数据:" + res.toString()); mAbPullToRefreshView.onHeaderRefreshFinish(); alls.clear(); if (res != null) { changeUi(UiModel.showData); refoundstat = (SellerRefoundstat) res; if (refoundstat != null && !refoundstat.isNull()) { skip = 0; if (!refoundstat.isNull() && myOrderListAdapter != null) { alls.addAll(refoundstat.getData()); myOrderListAdapter.notifyDataSetChanged(); } } else { changeUi(UiModel.noData_noProduct); } } else { changeUi(UiModel.noData_noProduct); } } @Override public void onSimpleFailure(int code) { changeUi(UiModel.noData_noProduct); mAbPullToRefreshView.onHeaderRefreshFinish(); MyLogger.i("failure >>>>> " + code + " ,res >>>>> "); } }); }