红包中奖列表
This commit is contained in:
@@ -184,6 +184,7 @@ public class Constants {
|
||||
public static final String LIVE_VOTE_END = "endVote";
|
||||
public static final String LIVE_PK_END = "endPK";//结束PK,以这个PK获取到的参数为准
|
||||
public static final String RED_PACKET = "RedPacket";//红包通知
|
||||
public static final String RED_PACKET_SUPER_JACKPOT = "RedPacketSuperJackpot";//超级红包通知
|
||||
|
||||
//游戏socket
|
||||
public static final String SOCKET_GAME_ZJH = "startGame";//炸金花
|
||||
|
||||
@@ -24,15 +24,10 @@ public class RedPacketGiftModel extends BaseModel {
|
||||
private String gifticon;
|
||||
@SerializedName("gift_num")
|
||||
private String giftNum;
|
||||
|
||||
public String getGiftNum() {
|
||||
return "X" +giftNum;
|
||||
}
|
||||
|
||||
public RedPacketGiftModel setGiftNum(String giftNum) {
|
||||
this.giftNum = giftNum;
|
||||
return this;
|
||||
}
|
||||
@SerializedName("user_nicename")
|
||||
private String userNicename;
|
||||
@SerializedName("avatar")
|
||||
private String avatar;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
@@ -53,7 +48,7 @@ public class RedPacketGiftModel extends BaseModel {
|
||||
}
|
||||
|
||||
public String getNeedcoin() {
|
||||
return "X" + needcoin;
|
||||
return needcoin;
|
||||
}
|
||||
|
||||
public RedPacketGiftModel setNeedcoin(String needcoin) {
|
||||
@@ -69,4 +64,31 @@ public class RedPacketGiftModel extends BaseModel {
|
||||
this.gifticon = gifticon;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getGiftNum() {
|
||||
return giftNum;
|
||||
}
|
||||
|
||||
public RedPacketGiftModel setGiftNum(String giftNum) {
|
||||
this.giftNum = giftNum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getUserNicename() {
|
||||
return userNicename;
|
||||
}
|
||||
|
||||
public RedPacketGiftModel setUserNicename(String userNicename) {
|
||||
this.userNicename = userNicename;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public RedPacketGiftModel setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,43 @@ public class RedPacketInfoModel extends BaseModel {
|
||||
//0.未领取到 1.领取但是没抢过东西 2.已经领抢到东西
|
||||
@SerializedName("receive_status")
|
||||
private String receiveStatus;
|
||||
//超级红包ID
|
||||
@SerializedName("super_jackpot_id")
|
||||
private String superJackpotId;
|
||||
|
||||
public String getSuperJackpotId() {
|
||||
return superJackpotId;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setSuperJackpotId(String superJackpotId) {
|
||||
this.superJackpotId = superJackpotId;
|
||||
return this;
|
||||
}
|
||||
|
||||
//是否超级红包
|
||||
private boolean isSuperJackpot = false;
|
||||
|
||||
public boolean isSuperJackpot() {
|
||||
return isSuperJackpot;
|
||||
}
|
||||
|
||||
//红包id
|
||||
@SerializedName("red_packet_id")
|
||||
private String redPacketId;
|
||||
|
||||
public String getRedPacketId() {
|
||||
return redPacketId;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setRedPacketId(String redPacketId) {
|
||||
this.redPacketId = redPacketId;
|
||||
return this;
|
||||
}
|
||||
|
||||
public RedPacketInfoModel setSuperJackpot(boolean superJackpot) {
|
||||
isSuperJackpot = superJackpot;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String getIsAttention() {
|
||||
return isAttention;
|
||||
|
||||
@@ -25,6 +25,8 @@ public class RedPacketModel extends BaseModel {
|
||||
@SerializedName("conditions")
|
||||
private int conditions;
|
||||
|
||||
|
||||
|
||||
public int getIsShow() {
|
||||
return isShow;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
import com.yunbao.common.bean.RedPacketGiftModel;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.SearchModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
@@ -753,7 +754,6 @@ public interface PDLiveApi {
|
||||
);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取盲盒礼物当前数据
|
||||
*/
|
||||
@@ -763,4 +763,29 @@ public interface PDLiveApi {
|
||||
@Query("stream") String stream,
|
||||
@Query("red_packet_id") String redPacketId
|
||||
);
|
||||
|
||||
/**
|
||||
* 超级红包打开接口
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getRedPacketSuperPrize")
|
||||
Observable<ResponseModel<RedPacketInfoModel>> getRedPacketSuperPrize(
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("super_jackpot_id") String superJackpotId
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取普通红包的领取记录
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getRedPacketReceive")
|
||||
Observable<ResponseModel<List<RedPacketGiftModel>>> getRedPacketReceive(
|
||||
@Query("red_packet_id") String redPacketId
|
||||
);
|
||||
|
||||
/**
|
||||
* 获取普通红包的领取记录
|
||||
*/
|
||||
@GET("/api/public/?service=Live.getRedPacketSuperPrizeReceive")
|
||||
Observable<ResponseModel<List<RedPacketGiftModel>>> getRedPacketSuperPrizeReceive(
|
||||
@Query("super_jackpot_id") String superJackpotId
|
||||
);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
import com.yunbao.common.bean.RedPacketGiftModel;
|
||||
import com.yunbao.common.bean.RedPacketInfoModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
@@ -1609,9 +1610,9 @@ public class LiveNetManager {
|
||||
* @param liveUid 直播间id
|
||||
* @param redPacketId 红包id
|
||||
*/
|
||||
public void getRedPacket(String liveUid,String stream, String redPacketId, HttpCallback<RedPacketInfoModel> callback) {
|
||||
public void getRedPacket(String liveUid, String stream, String redPacketId, HttpCallback<RedPacketInfoModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRedPacket(liveUid, stream,redPacketId)
|
||||
.getRedPacket(liveUid, stream, redPacketId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(redPacketInfoModelResponseModel -> {
|
||||
@@ -1625,6 +1626,72 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getRedPacketSuperPrize(String liveUid, String superJackpotId, HttpCallback<RedPacketInfoModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRedPacketSuperPrize(liveUid, superJackpotId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<RedPacketInfoModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<RedPacketInfoModel> redPacketInfoModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(redPacketInfoModelResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getRedPacketReceive(String redPacketId, HttpCallback<List<RedPacketGiftModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRedPacketReceive(redPacketId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<RedPacketGiftModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<RedPacketGiftModel>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void getRedPacketSuperPrizeReceive(String redPacketId, HttpCallback<List<RedPacketGiftModel>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getRedPacketSuperPrizeReceive(redPacketId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<List<RedPacketGiftModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<RedPacketGiftModel>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(listResponseModel.getData().getInfo());
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(mContext.getString(R.string.net_error));
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 直播间取消网络请求
|
||||
*/
|
||||
|
||||
@@ -1228,4 +1228,5 @@ Limited ride And limited avatar frame</string>
|
||||
<string name="together_to_achieve_goal">來自%s的獎勵,齊心協力連成目標</string>
|
||||
<string name="red_too_bad">很遺憾</string>
|
||||
<string name="red_too_bad2">與紅包擦肩而過</string>
|
||||
<string name="check_out_your_luck">查看大家手氣</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user