update 整蛊
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class PrankGiftBean extends BaseModel{
|
||||
@SerializedName("prank_content")
|
||||
private String title;
|
||||
@SerializedName("gift_name")
|
||||
private String name;
|
||||
@SerializedName("gift_icon")
|
||||
private String icon;
|
||||
@SerializedName("gift_num")
|
||||
private int num;
|
||||
@SerializedName("gift_id")
|
||||
private String giftId;
|
||||
|
||||
public PrankGiftBean() {
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNum(int num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public String getGiftId() {
|
||||
return giftId;
|
||||
}
|
||||
|
||||
public void setGiftId(String giftId) {
|
||||
this.giftId = giftId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.bean.BaseModel;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
|
||||
public class PrankHttpTurntableBean extends BaseModel {
|
||||
@SerializedName("id")
|
||||
private int id;
|
||||
@SerializedName("anchor_id")
|
||||
private String anchor_id;
|
||||
@SerializedName("coin")
|
||||
private long coin = 1000;
|
||||
@SerializedName("hope_coin")
|
||||
private long hopeCoin = 1000;
|
||||
@SerializedName("turntable_one")
|
||||
private String turntable1;
|
||||
@SerializedName("turntable_two")
|
||||
private String turntable2;
|
||||
@SerializedName("turntable_three")
|
||||
private String turntable3;
|
||||
@SerializedName("turntable_four")
|
||||
private String turntable4;
|
||||
@SerializedName("turntable_five")
|
||||
private String turntable5;
|
||||
@SerializedName("turntable_six")
|
||||
private String turntable6;
|
||||
@SerializedName("status")
|
||||
private int status;
|
||||
|
||||
public PrankHttpTurntableBean() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getAnchor_id() {
|
||||
return anchor_id;
|
||||
}
|
||||
|
||||
public void setAnchor_id(String anchor_id) {
|
||||
this.anchor_id = anchor_id;
|
||||
}
|
||||
|
||||
public long getCoin() {
|
||||
return coin;
|
||||
}
|
||||
|
||||
public void setCoin(long coin) {
|
||||
this.coin = coin;
|
||||
}
|
||||
|
||||
public long getHopeCoin() {
|
||||
return hopeCoin;
|
||||
}
|
||||
|
||||
public void setHopeCoin(long hopeCoin) {
|
||||
this.hopeCoin = hopeCoin;
|
||||
}
|
||||
|
||||
public String getTurntable1() {
|
||||
return turntable1;
|
||||
}
|
||||
|
||||
public void setTurntable1(String turntable1) {
|
||||
this.turntable1 = turntable1;
|
||||
}
|
||||
|
||||
public String getTurntable2() {
|
||||
return turntable2;
|
||||
}
|
||||
|
||||
public void setTurntable2(String turntable2) {
|
||||
this.turntable2 = turntable2;
|
||||
}
|
||||
|
||||
public String getTurntable3() {
|
||||
return turntable3;
|
||||
}
|
||||
|
||||
public void setTurntable3(String turntable3) {
|
||||
this.turntable3 = turntable3;
|
||||
}
|
||||
|
||||
public String getTurntable4() {
|
||||
return turntable4;
|
||||
}
|
||||
|
||||
public void setTurntable4(String turntable4) {
|
||||
this.turntable4 = turntable4;
|
||||
}
|
||||
|
||||
public String getTurntable5() {
|
||||
return turntable5;
|
||||
}
|
||||
|
||||
public void setTurntable5(String turntable5) {
|
||||
this.turntable5 = turntable5;
|
||||
}
|
||||
|
||||
public String getTurntable6() {
|
||||
return turntable6;
|
||||
}
|
||||
|
||||
public void setTurntable6(String turntable6) {
|
||||
this.turntable6 = turntable6;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
|
||||
public class PrankTurntableBean extends BaseModel {
|
||||
private int id;
|
||||
private String context;
|
||||
|
||||
public PrankTurntableBean() {
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public void setContext(String context) {
|
||||
this.context = context;
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,8 @@ import com.yunbao.common.bean.NewPeopleInfo;
|
||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||
import com.yunbao.common.bean.NobleTrumpetModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.SearchModel;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.SlideInBannerModel;
|
||||
@@ -343,7 +345,7 @@ public interface PDLiveApi {
|
||||
* 获取转盘整蛊列表
|
||||
*/
|
||||
@GET("/api/public/?service=Prank.getAnchorPrankTurntable")
|
||||
Observable<ResponseModel<List<BaseModel>>> getAnchorPrankTurntable(
|
||||
Observable<ResponseModel<PrankHttpTurntableBean>> getAnchorPrankTurntable(
|
||||
@Query("anchor_id") String anchor_id
|
||||
);
|
||||
/**
|
||||
@@ -368,4 +370,31 @@ public interface PDLiveApi {
|
||||
Observable<ResponseModel<List<BaseModel>>> endPrankTurntable(
|
||||
@Query("anchor_id") String anchor_id
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* 获取整蛊列表
|
||||
*/
|
||||
@GET("/api/public/?service=Prank.prankList")
|
||||
Observable<ResponseModel<List<PrankGiftBean>>> prankList( @Query("anchor_id") String anchor_id);
|
||||
|
||||
/**
|
||||
* 设置礼物整蛊
|
||||
*/
|
||||
@GET("/api/public/?service=Prank.setPrank")
|
||||
Observable<ResponseModel<List<BaseModel>>> setPrank(
|
||||
@Query("anchor_id") String anchor_id,
|
||||
@Query("gift_id") String gift_id,
|
||||
@Query("gift_num") String gift_num,
|
||||
@Query("prank_content") String prank_content
|
||||
);
|
||||
/**
|
||||
* 删除礼物整蛊
|
||||
*/
|
||||
@GET("/api/public/?service=Prank.deletePrank")
|
||||
Observable<ResponseModel<List<BaseModel>>> deletePrank(
|
||||
@Query("anchor_id") String anchor_id,
|
||||
@Query("prank_index") String prank_index
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -18,6 +18,9 @@ import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||
import com.yunbao.common.bean.NobleRankHideUserListModel;
|
||||
import com.yunbao.common.bean.NobleTrumpetModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.PrankTurntableBean;
|
||||
import com.yunbao.common.bean.SetAttentsModel;
|
||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||
import com.yunbao.common.bean.VipModel;
|
||||
@@ -502,15 +505,17 @@ public class LiveNetManager {
|
||||
});
|
||||
}
|
||||
|
||||
public void getAnchorPrankTurntable(String mLiveUid, HttpCallback<Object> callback) {
|
||||
/**
|
||||
* 获取转盘整蛊列表
|
||||
*/
|
||||
public void getAnchorPrankTurntable(String mLiveUid, HttpCallback<PrankHttpTurntableBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getAnchorPrankTurntable(mLiveUid)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<List<BaseModel>> listResponseModel) throws Exception {
|
||||
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(responseModel.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
@@ -522,6 +527,9 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交转盘整蛊
|
||||
*/
|
||||
public void setAnchorPrankTurntable(String mLiveUid, String coin,
|
||||
String turntable_one,
|
||||
String turntable_two,
|
||||
@@ -532,13 +540,90 @@ public class LiveNetManager {
|
||||
String status,
|
||||
HttpCallback<Object> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.getAnchorPrankTurntable(mLiveUid)
|
||||
.setAnchorPrankTurntable(mLiveUid,
|
||||
coin,
|
||||
turntable_one,
|
||||
turntable_two,
|
||||
turntable_three,
|
||||
turntable_four,
|
||||
turntable_five,
|
||||
turntable_six,
|
||||
status)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(new Consumer<ResponseModel<List<BaseModel>>>() {
|
||||
|
||||
@Override
|
||||
public void accept(ResponseModel<List<BaseModel>> listResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess("");
|
||||
}
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取转盘整蛊列表
|
||||
*/
|
||||
public void getPrankGiftList(String mLiveUid, HttpCallback<List<PrankGiftBean>> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.prankList(mLiveUid)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(responseModel.getData().getInfo());
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置礼物整蛊
|
||||
*/
|
||||
public void setPrankGift(String mLiveUid, String gift_id, String gift_num, String prank_content, HttpCallback<PrankHttpTurntableBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.setPrank(mLiveUid, gift_id, gift_num, prank_content)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(null);
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onError(throwable.getMessage());
|
||||
}
|
||||
}
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除礼物整蛊
|
||||
*/
|
||||
public void deletePrankGift(String mLiveUid, String prank_index, HttpCallback<PrankHttpTurntableBean> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.deletePrank(mLiveUid, prank_index)
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe(responseModel -> {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(null);
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user