1:羽声新版本

This commit is contained in:
2025-10-24 17:52:11 +08:00
parent 437a623f81
commit a809b02ebb
827 changed files with 25795 additions and 1193698 deletions

View File

@@ -78,6 +78,9 @@ public abstract class BasePresenter<V extends IView> implements IPresenter {
* @param disposable
*/
public void addDisposable(Disposable disposable) {
if (mDisposables == null){
mDisposables = new CompositeDisposable();
}
mDisposables.add(disposable);
}

View File

@@ -21,7 +21,8 @@ public class RechargeDialogContacts {
public interface IRechargePre extends IPresenter {
void recharge();//可选充值金额列表
void bindType(String userId);
void appPay(String user_id,String money,String coin,String type);
void appPay(String user_id,String money,String coin,String type,String type_params,String type_id);
}
}

View File

@@ -47,8 +47,8 @@ public class RechargeDialogPresenter extends BasePresenter<RechargeDialogContact
}
@Override
public void appPay(String user_id, String money, String coin, String type) {
api.appPay(user_id, money, coin, type, new BaseObserver<AppPay>() {
public void appPay(String user_id, String money, String coin, String type, String type_params, String type_id) {
api.appPay(user_id, money, coin, type,type_params,type_id, new BaseObserver<AppPay>() {
@Override
public void onSubscribe(Disposable d) {
addDisposable(d);
@@ -61,4 +61,6 @@ public class RechargeDialogPresenter extends BasePresenter<RechargeDialogContact
});
}
}

View File

@@ -6,6 +6,7 @@ import com.xscm.moduleutil.activity.IPresenter;
import com.xscm.moduleutil.activity.IView;
import com.xscm.moduleutil.bean.GiftLabelBean;
import com.xscm.moduleutil.bean.GiftPackBean;
import com.xscm.moduleutil.bean.GiftPackListCount;
import com.xscm.moduleutil.bean.RewardUserBean;
import com.xscm.moduleutil.bean.RoonGiftModel;
import com.xscm.moduleutil.bean.WalletBean;
@@ -27,6 +28,10 @@ public class RewardGiftContacts {
void reward_zone();
void roomAuctionJoin(RoomAuction.AuctionListBean auctionListBean);
void giftPack(List<GiftPackBean> giftPackBean);
void getGiftPack(String s);
void getGiftPackListCount(GiftPackListCount giftPackListCount);
}
public interface IIndexPre extends IPresenter {
@@ -34,11 +39,11 @@ public class RewardGiftContacts {
void getGiftLabel(String have_hot);
void getGiftList(String id, int type);
void getGiftList(String id, int type,String roomId);
void giveGift(String user_id, String gid, String num, String to_uid, String gift_type);
void roomGift(String room_id, String gift_id, String gift_num, String to_uid, String type, String pit_number);
void roomGift(String room_id, String gift_id, String gift_num, String to_uid, String type, String pit_number,String heart_id);
void wallet();
@@ -48,5 +53,9 @@ public class RewardGiftContacts {
void roomAuctionJoin(String auction_id,String user_id, String gift_id, String num,String type);
void giftPack();
void getGiftPack(String roomId,String userId,String heart_id,String auction_id );
void getGiftPackListCount();
}
}

View File

@@ -4,6 +4,7 @@ import android.content.Context;
import com.xscm.moduleutil.bean.GiftLabelBean;
import com.xscm.moduleutil.bean.GiftPackBean;
import com.xscm.moduleutil.bean.GiftPackListCount;
import com.xscm.moduleutil.bean.RewardUserBean;
import com.xscm.moduleutil.bean.RoonGiftModel;
import com.xscm.moduleutil.bean.WalletBean;
@@ -17,6 +18,7 @@ import io.reactivex.disposables.Disposable;
public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View> implements RewardGiftContacts.IIndexPre {
RewardGiftContacts.View mView;
public RewardGiftPresenter(RewardGiftContacts.View view, Context context) {
super(view, context);
mView = view;
@@ -32,6 +34,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(List<RewardUserBean> rewardUserBeans) {
if (MvpRef == null) {
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().getRewardList(rewardUserBeans);
}
});
@@ -48,6 +53,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(List<GiftLabelBean> giftLabelBeans) {
if (MvpRef == null) {
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().getGiftLabel(giftLabelBeans);
}
});
@@ -55,8 +63,8 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
}
@Override
public void getGiftList(String id, int type) {
api.getGiftList(Integer.parseInt(id), new BaseObserver<List<RoonGiftModel>>() {
public void getGiftList(String id, int type, String roomId) {
api.getGiftList(Integer.parseInt(id), roomId, new BaseObserver<List<RoonGiftModel>>() {
@Override
public void onSubscribe(Disposable d) {
@@ -65,6 +73,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(List<RoonGiftModel> roonGiftModels) {
if (MvpRef == null) {
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().setGiftList(roonGiftModels, type);
}
});
@@ -81,14 +92,17 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(String s) {
if (MvpRef == null) {
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().giveGift();
}
});
}
@Override
public void roomGift(String room_id, String gift_id, String gift_num, String to_uid, String type, String pit_number) {
api.roomGift(room_id, gift_id, gift_num, to_uid, type, pit_number, new BaseObserver<String>() {
public void roomGift(String room_id, String gift_id, String gift_num, String to_uid, String type, String pit_number, String heart_id) {
api.roomGift(room_id, gift_id, gift_num, to_uid, type, pit_number, heart_id, new BaseObserver<String>() {
@Override
public void onSubscribe(Disposable d) {
@@ -97,7 +111,7 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(String s) {
if (MvpRef==null){
if (MvpRef == null) {
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().giveGift();
@@ -115,6 +129,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(WalletBean walletBean) {
if (MvpRef == null) {
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().wallet(walletBean);
}
});
@@ -131,6 +148,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(String s) {
if (MvpRef == null) {
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().reward_zone();
}
});
@@ -146,6 +166,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(String s) {
if (MvpRef == null) {
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().reward_zone();
}
});
@@ -161,6 +184,9 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(RoomAuction.AuctionListBean auctionListBean) {
if (MvpRef == null) {
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().roomAuctionJoin(auctionListBean);
}
});
@@ -177,8 +203,51 @@ public class RewardGiftPresenter extends BasePresenter<RewardGiftContacts.View>
@Override
public void onNext(List<GiftPackBean> giftPackBeans) {
if (MvpRef == null) {
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().giftPack(giftPackBeans);
}
});
}
@Override
public void getGiftPack(String roomId, String userId, String heart_id, String auction_id) {
api.getGiftPack(roomId, userId, heart_id, auction_id, new BaseObserver<String>() {
@Override
public void onSubscribe(Disposable d) {
addDisposable(d);
}
@Override
public void onNext(String s) {
if (MvpRef == null) {
MvpRef = new WeakReference<>(mView);
}
if (s == null) {
MvpRef.get().getGiftPack(null);
} else {
MvpRef.get().getGiftPack(s);
}
}
});
}
@Override
public void getGiftPackListCount() {
api.getGiftPackListCount(new BaseObserver<GiftPackListCount>() {
@Override
public void onSubscribe(Disposable d) {
addDisposable(d);
}
@Override
public void onNext(GiftPackListCount giftPackListCount) {
if (MvpRef == null) {
MvpRef = new WeakReference<>(mView);
}
MvpRef.get().getGiftPackListCount(giftPackListCount);
}
});
}
}