小礼物逻辑第er次上传
This commit is contained in:
@@ -39,6 +39,28 @@ public class EnterRoomNewModel extends BaseModel {
|
||||
private String sudGameRoomName;
|
||||
@SerializedName("sud_gameDate")
|
||||
private SudGameDateModel sudGameDateModel;
|
||||
@SerializedName("quick_gift_remaining_quantity")
|
||||
private int quickGiftRemainingQuantity;//剩余的小PD礼物数量
|
||||
@SerializedName("if_viewing_duration_complete")
|
||||
private int ifViewingDurationComplete;//通过观看时间获取小PD礼物的次数
|
||||
|
||||
public int getQuickGiftRemainingQuantity() {
|
||||
return quickGiftRemainingQuantity;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setQuickGiftRemainingQuantity(int quickGiftRemainingQuantity) {
|
||||
this.quickGiftRemainingQuantity = quickGiftRemainingQuantity;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIfViewingDurationComplete() {
|
||||
return ifViewingDurationComplete;
|
||||
}
|
||||
|
||||
public EnterRoomNewModel setIfViewingDurationComplete(int ifViewingDurationComplete) {
|
||||
this.ifViewingDurationComplete = ifViewingDurationComplete;
|
||||
return this;
|
||||
}
|
||||
|
||||
public SudGameDateModel getSudGameDateModel() {
|
||||
return sudGameDateModel;
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
public class QuickGiftSendGiftModel extends BaseModel {
|
||||
@SerializedName("quick_gift_remaining_quantity")
|
||||
private int quickGiftRemainingQuantity;//剩余的小PD礼物数量
|
||||
@SerializedName("if_viewing_duration_complete")
|
||||
private int ifViewingDurationComplete;//通过观看时间获取小PD礼物的次数
|
||||
|
||||
public int getQuickGiftRemainingQuantity() {
|
||||
return quickGiftRemainingQuantity;
|
||||
}
|
||||
|
||||
public QuickGiftSendGiftModel setQuickGiftRemainingQuantity(int quickGiftRemainingQuantity) {
|
||||
this.quickGiftRemainingQuantity = quickGiftRemainingQuantity;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIfViewingDurationComplete() {
|
||||
return ifViewingDurationComplete;
|
||||
}
|
||||
|
||||
public QuickGiftSendGiftModel setIfViewingDurationComplete(int ifViewingDurationComplete) {
|
||||
this.ifViewingDurationComplete = ifViewingDurationComplete;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,16 @@ import com.yunbao.common.bean.BaseModel;
|
||||
public class QuickGiftingEvent extends BaseModel {
|
||||
private int index;
|
||||
private String svgaName;
|
||||
private boolean show =false;
|
||||
|
||||
public boolean isShow() {
|
||||
return show;
|
||||
}
|
||||
|
||||
public QuickGiftingEvent setShow(boolean show) {
|
||||
this.show = show;
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
|
||||
@@ -46,6 +46,7 @@ import com.yunbao.common.bean.OpenAdModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.QuickGiftSendGiftModel;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
@@ -1061,9 +1062,23 @@ public interface PDLiveApi {
|
||||
@GET("/api/public/?service=Sudgameserver.deductMoney")
|
||||
Observable<ResponseModel<Object>> deductMoney(
|
||||
@Query("room_id") String roomId
|
||||
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=Sudgameserver.checkCurrency")
|
||||
Observable<ResponseModel<CheckCurrencyModel>> checkCurrency(
|
||||
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=Quickgift.sendGift")
|
||||
Observable<ResponseModel<QuickGiftSendGiftModel>> quickGiftSendGift(
|
||||
@Query("quick_gift_number") String quickGiftNumber,
|
||||
@Query("liveuid") String liveUid,
|
||||
@Query("stream") String stream
|
||||
);
|
||||
|
||||
@GET("/api/public/?service=Quickgift.viewingDurationGetGift")
|
||||
Observable<ResponseModel<QuickGiftSendGiftModel>> viewingDurationGetGift(
|
||||
@Query("liveuid") String liveUid
|
||||
);
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ import com.yunbao.common.bean.OpenAdModel;
|
||||
import com.yunbao.common.bean.PkRankBean;
|
||||
import com.yunbao.common.bean.PrankGiftBean;
|
||||
import com.yunbao.common.bean.PrankHttpTurntableBean;
|
||||
import com.yunbao.common.bean.QuickGiftSendGiftModel;
|
||||
import com.yunbao.common.bean.RandomPkUserBean;
|
||||
import com.yunbao.common.bean.RankPkInfoBean;
|
||||
import com.yunbao.common.bean.RedPacketDetailsBean;
|
||||
@@ -2317,21 +2318,21 @@ public class LiveNetManager {
|
||||
}
|
||||
|
||||
public void deductMoney(String roomId) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.deductMoney(roomId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<Object>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
|
||||
|
||||
}
|
||||
}, new Consumer<Throwable>() {
|
||||
@Override
|
||||
public void accept(Throwable throwable) throws Exception {
|
||||
|
||||
}
|
||||
}).isDisposed();
|
||||
// API.get().pdLiveApi(mContext)
|
||||
// .deductMoney(roomId)
|
||||
// .subscribeOn(Schedulers.io())
|
||||
// .observeOn(AndroidSchedulers.mainThread())
|
||||
// .subscribe(new Consumer<ResponseModel<Object>>() {
|
||||
// @Override
|
||||
// public void accept(ResponseModel<Object> objectResponseModel) throws Exception {
|
||||
//
|
||||
// }
|
||||
// }, new Consumer<Throwable>() {
|
||||
// @Override
|
||||
// public void accept(Throwable throwable) throws Exception {
|
||||
//
|
||||
// }
|
||||
// }).isDisposed();
|
||||
}
|
||||
|
||||
public void checkCurrency(HttpCallback<CheckCurrencyModel> callback) {
|
||||
@@ -2384,6 +2385,50 @@ public class LiveNetManager {
|
||||
}).isDisposed();
|
||||
}
|
||||
|
||||
public void viewingDurationGetGift(String liveUid, HttpCallback<QuickGiftSendGiftModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.viewingDurationGetGift(liveUid)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<QuickGiftSendGiftModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<QuickGiftSendGiftModel> quickGiftSendGiftModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(quickGiftSendGiftModelResponseModel.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 quickGiftSendGift(String quickGiftNumber, String liveUid, String stream, HttpCallback<QuickGiftSendGiftModel> callback) {
|
||||
API.get().pdLiveApi(mContext)
|
||||
.quickGiftSendGift(quickGiftNumber, liveUid, stream)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Consumer<ResponseModel<QuickGiftSendGiftModel>>() {
|
||||
@Override
|
||||
public void accept(ResponseModel<QuickGiftSendGiftModel> quickGiftSendGiftModelResponseModel) throws Exception {
|
||||
if (callback != null) {
|
||||
callback.onSuccess(quickGiftSendGiftModelResponseModel.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 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, currencyType, page)
|
||||
|
||||
@@ -14,7 +14,7 @@ public class CircleProgress2 extends View {
|
||||
private RectF mRectF;
|
||||
private int mCurrent = 1, mMax = 100;
|
||||
//圆弧(也可以说是圆环)的宽度
|
||||
private float mArcWidth =8;
|
||||
private float mArcWidth =9;
|
||||
//控件的宽度
|
||||
private float mWidth;
|
||||
|
||||
@@ -56,14 +56,14 @@ public class CircleProgress2 extends View {
|
||||
mPaint.setStyle(Paint.Style.STROKE);
|
||||
//设置圆弧的宽度(圆环的宽度)
|
||||
mPaint.setStrokeWidth(mArcWidth);
|
||||
mPaint.setColor(Color.parseColor("#FEC51B"));
|
||||
mPaint.setColor(Color.parseColor("#46433F"));
|
||||
//大圆的半径
|
||||
float bigCircleRadius = mWidth / 2;
|
||||
//小圆的半径
|
||||
float smallCircleRadius = bigCircleRadius - mArcWidth;
|
||||
//绘制小圆
|
||||
canvas.drawCircle(bigCircleRadius, bigCircleRadius, smallCircleRadius, mPaint);
|
||||
mPaint.setColor(Color.parseColor("#46433F"));
|
||||
mPaint.setColor(Color.parseColor("#FEC51B"));
|
||||
mRectF.set(mArcWidth, mArcWidth, mWidth - mArcWidth, mWidth - mArcWidth);
|
||||
//绘制圆弧
|
||||
canvas.drawArc(mRectF, -90, mCurrent * 360 / mMax, false, mPaint);
|
||||
|
||||
Reference in New Issue
Block a user