From b60031d2d00e2d15f30cf51affba5d39fc6295ea Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Wed, 8 Nov 2023 14:00:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E5=88=97=E8=A1=A8=EF=BC=8C?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/common/dialog/SudGameListPopup.java | 2 +- .../yunbao/common/dialog/SudGameSearchDialogPopup.java | 8 +++++--- .../main/java/com/yunbao/common/http/LiveHttpUtil.java | 3 ++- .../src/main/java/com/yunbao/common/http/PDLiveApi.java | 4 +++- .../java/com/yunbao/common/http/live/LiveNetManager.java | 9 +++++---- .../com/yunbao/main/views/MainHomeGameViewHolder.java | 2 +- 6 files changed, 17 insertions(+), 11 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java b/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java index 3a7fcca68..d38c8abdd 100644 --- a/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java +++ b/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java @@ -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 diff --git a/common/src/main/java/com/yunbao/common/dialog/SudGameSearchDialogPopup.java b/common/src/main/java/com/yunbao/common/dialog/SudGameSearchDialogPopup.java index 20b7010c0..ba47fd92c 100644 --- a/common/src/main/java/com/yunbao/common/dialog/SudGameSearchDialogPopup.java +++ b/common/src/main/java/com/yunbao/common/dialog/SudGameSearchDialogPopup.java @@ -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>() { + .searchRoomList("0", "0,0", "0", value, "1", 0, new HttpCallback>() { @Override public void onSuccess(List 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(); diff --git a/common/src/main/java/com/yunbao/common/http/LiveHttpUtil.java b/common/src/main/java/com/yunbao/common/http/LiveHttpUtil.java index 6db78ebd0..8c57cfd10 100644 --- a/common/src/main/java/com/yunbao/common/http/LiveHttpUtil.java +++ b/common/src/main/java/com/yunbao/common/http/LiveHttpUtil.java @@ -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); } diff --git a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java index 1240eb605..5a0d68686 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -996,7 +996,7 @@ public interface PDLiveApi { Observable> 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 ); diff --git a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java index 8a66006db..ac263a3d9 100644 --- a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java @@ -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> callback) { + public void getRoomList(String sudGameId, String threshold, String roomHolderType, String liveUid, String currencyType , int page, HttpCallback> 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>>() { @@ -2365,9 +2366,9 @@ public class LiveNetManager { }).isDisposed(); } - public void searchRoomList(String sudGameId, String threshold, String roomHolderType, String search, int page, HttpCallback> callback) { + public void searchRoomList(String sudGameId, String threshold, String roomHolderType, String search, String currencyType ,int page, HttpCallback> 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>>() { diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java index df25a4345..e1f24b3b5 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeGameViewHolder.java @@ -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