游戏列表,搜索添加字段

This commit is contained in:
18401019693 2023-11-08 14:00:05 +08:00
parent 54aa5fee67
commit b60031d2d0
6 changed files with 17 additions and 11 deletions

View File

@ -113,7 +113,7 @@ public class SudGameListPopup extends BottomPopupView {
@Override
public void loadData(int p, HttpCallback callback) {
page = p;
LiveHttpUtil.getRoomList(id, mSill, roomHolderType, mLiveUid, p - 1, callback);
LiveHttpUtil.getRoomList(id, mSill, roomHolderType, mLiveUid, "1",p - 1, callback);
}
@Override

View File

@ -31,7 +31,6 @@ import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.views.FlowLayout;
import com.yunbao.common.views.LiveSudGamePopup;
import com.yunbao.common.views.weight.ViewClicksAntiShake;
import org.greenrobot.eventbus.Subscribe;
@ -54,6 +53,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
super(context);
this.isHome = isHome;
}
@Override
public void dismiss() {
Bus.getOff(this);
@ -172,7 +172,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
private void search(String value) {
LiveNetManager.get(mContext)
.searchRoomList("0", "0,0", "0", value, 0, new HttpCallback<List<SudRoomListModel>>() {
.searchRoomList("0", "0,0", "0", value, "1", 0, new HttpCallback<List<SudRoomListModel>>() {
@Override
public void onSuccess(List<SudRoomListModel> data) {
if (data.size() > 0) {
@ -203,7 +203,7 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
}
}
}else {
} else {
findViewById(R.id.layout_history_empty).setVisibility(VISIBLE);
listRoom.setVisibility(GONE);
history.setVisibility(GONE);
@ -234,10 +234,12 @@ public class SudGameSearchDialogPopup extends AbsDialogPopupWindow {
super.onDismiss();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onSudGameListDissMissEvent(SudGameListDissMissEvent event) {
dialog.dismiss();
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onSudGameListEvent(SudRoomListModelEvent event) {
CreateSudRoomModel createSudRoomModel = new CreateSudRoomModel();

View File

@ -970,12 +970,13 @@ public class LiveHttpUtil {
}
public static void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid,int page,HttpCallback callback ) {
public static void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid,String currencyType,int page,HttpCallback callback ) {
HttpClient.getInstance().get("Sudgameserver.getRoomList", "Sudgameserver.getRoomList")
.params("sud_game_id",sudGameId)
.params("threshold",threshold)
.params("room_holder_type",roomHolderType)
.params("liveuid",liveUid)
.params("currency_type ",currencyType )
.params("page",page)
.execute(callback);
}

View File

@ -996,7 +996,7 @@ public interface PDLiveApi {
Observable<ResponseModel<CreateSudRoomModel>> createSudRoom(
@Query("room_name") String roomName,
@Query("golden_bean_number") String goldenBeanNumber,
@Query("currency_type ") String currencyType ,
@Query("currency_type ") String currencyType,
@Query("game_id") String gameId);
/**
@ -1010,6 +1010,7 @@ public interface PDLiveApi {
@Query("threshold") String threshold,
@Query("room_holder_type") String roomHolderType,
@Query("liveuid") String liveUid,
@Query("currency_type ") String currencyType,
@Query("page") int page
);
@ -1023,6 +1024,7 @@ public interface PDLiveApi {
@Query("room_holder_type") String roomHolderType,
@Query("liveuid") String liveUid,
@Query("search") String search,
@Query("currency_type ") String currencyType,
@Query("page") int page
);

View File

@ -74,6 +74,7 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
import retrofit2.http.Query;
/**
@ -2343,9 +2344,9 @@ public class LiveNetManager {
}).isDisposed();
}
public void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid, int page, HttpCallback<List<SudRoomListModel>> callback) {
public void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid, String currencyType , int page, HttpCallback<List<SudRoomListModel>> callback) {
API.get().pdLiveApi(mContext)
.getRoomList(sudGameId, threshold, roomHolderType, liveUid, page)
.getRoomList(sudGameId, threshold, roomHolderType, liveUid,currencyType, page)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<SudRoomListModel>>>() {
@ -2365,9 +2366,9 @@ public class LiveNetManager {
}).isDisposed();
}
public void searchRoomList(String sudGameId, String threshold, String roomHolderType, String search, int page, HttpCallback<List<SudRoomListModel>> callback) {
public void searchRoomList(String sudGameId, String threshold, String roomHolderType, String search, String currencyType ,int page, HttpCallback<List<SudRoomListModel>> callback) {
API.get().pdLiveApi(mContext)
.searchRoomList(sudGameId, threshold, roomHolderType, "0", search, page)
.searchRoomList(sudGameId, threshold, roomHolderType, "0", search,currencyType, page)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<SudRoomListModel>>>() {

View File

@ -109,7 +109,7 @@ public class MainHomeGameViewHolder extends AbsMainHomeChildViewHolder implement
@Override
public void loadData(int p, com.yunbao.common.http.HttpCallback callback) {
LiveHttpUtil.getRoomList(id, mSill, roomHolderType, "0", p - 1, callback);
LiveHttpUtil.getRoomList(id, mSill, roomHolderType, "0", "1", p - 1, callback);
}
@Override