补充删除夺宝相关代码
This commit is contained in:
@@ -116,7 +116,6 @@ android {
|
||||
'src/module_lottery_dialog/java',
|
||||
'src/module_bank_card/java',
|
||||
'src/module_super_admin/java',
|
||||
'src/module_treasure_box/java',
|
||||
'src/module_album/java',
|
||||
|
||||
]
|
||||
@@ -133,7 +132,6 @@ android {
|
||||
'src/module_lottery_dialog/res',
|
||||
'src/module_bank_card/res',
|
||||
'src/module_super_admin/res',
|
||||
'src/module_treasure_box/res',
|
||||
'src/module_album/res',
|
||||
|
||||
]
|
||||
|
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:state_pressed="true" android:drawable="@drawable/auto_open_box_pressed"/>
|
||||
<item android:state_focused="true" android:drawable="@drawable/auto_open_box_pressed"/>
|
||||
<item android:drawable="@drawable/auto_open_box_normal"/>
|
||||
</selector>
|
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
<item android:state_pressed="true" android:drawable="@drawable/auto_open_honour_box_pressed"/>
|
||||
<item android:state_focused="true" android:drawable="@drawable/auto_open_honour_box_pressed"/>
|
||||
<item android:drawable="@drawable/auto_open_honour_box_normal"/>
|
||||
</selector>
|
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@drawable/choose_box_bg_disable" android:state_enabled="false" />
|
||||
<item android:drawable="@drawable/choose_box_bg" android:state_enabled="true" />
|
||||
</selector>
|
@@ -1,43 +0,0 @@
|
||||
package com.chwl.core.treasure_box.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 宝箱开放状态
|
||||
*/
|
||||
public class BoxOpenStatusInfo implements Serializable{
|
||||
|
||||
/**
|
||||
* opening : false
|
||||
* startTime : 12:00
|
||||
* endTime : 02:00
|
||||
*/
|
||||
|
||||
private boolean opening;
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
|
||||
public boolean isOpening() {
|
||||
return opening;
|
||||
}
|
||||
|
||||
public void setOpening(boolean opening) {
|
||||
this.opening = opening;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
@@ -1,31 +0,0 @@
|
||||
package com.chwl.core.treasure_box.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ConfigImgUrl implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
* ruleUrl : xxxx
|
||||
* backgroundUrl :
|
||||
*/
|
||||
|
||||
private String ruleUrl;
|
||||
private String backgroundUrl;
|
||||
|
||||
public String getRuleUrl() {
|
||||
return ruleUrl;
|
||||
}
|
||||
|
||||
public void setRuleUrl(String ruleUrl) {
|
||||
this.ruleUrl = ruleUrl;
|
||||
}
|
||||
|
||||
public String getBackgroundUrl() {
|
||||
return backgroundUrl;
|
||||
}
|
||||
|
||||
public void setBackgroundUrl(String backgroundUrl) {
|
||||
this.backgroundUrl = backgroundUrl;
|
||||
}
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
package com.chwl.core.treasure_box.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 购买钻石宝箱钥匙
|
||||
*/
|
||||
public class HonourBuyKeyResultInfo implements Serializable {
|
||||
|
||||
/**
|
||||
* keyNum : 11
|
||||
* goldNum : 11
|
||||
*/
|
||||
|
||||
private int keyNum;
|
||||
private int goldNum;
|
||||
|
||||
public int getKeyNum() {
|
||||
return keyNum;
|
||||
}
|
||||
|
||||
public void setKeyNum(int keyNum) {
|
||||
this.keyNum = keyNum;
|
||||
}
|
||||
|
||||
public int getGoldNum() {
|
||||
return goldNum;
|
||||
}
|
||||
|
||||
public void setGoldNum(int goldNum) {
|
||||
this.goldNum = goldNum;
|
||||
}
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
package com.chwl.core.treasure_box.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 获取用户钻石宝箱钥匙数+钻石宝箱钥匙价格
|
||||
*/
|
||||
public class HonourKeyInfo implements Serializable {
|
||||
|
||||
/**
|
||||
* keyPrice : 11
|
||||
* keyNum : 11
|
||||
*/
|
||||
|
||||
private int keyPrice;
|
||||
private int keyNum;
|
||||
|
||||
public int getKeyPrice() {
|
||||
return keyPrice;
|
||||
}
|
||||
|
||||
public void setKeyPrice(int keyPrice) {
|
||||
this.keyPrice = keyPrice;
|
||||
}
|
||||
|
||||
public int getKeyNum() {
|
||||
return keyNum;
|
||||
}
|
||||
|
||||
public void setKeyNum(int keyNum) {
|
||||
this.keyNum = keyNum;
|
||||
}
|
||||
}
|
@@ -1,48 +0,0 @@
|
||||
package com.chwl.core.treasure_box.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class KeyInfo implements Serializable {
|
||||
|
||||
/**
|
||||
* keyPrice : 11
|
||||
* keyNum : 11
|
||||
*/
|
||||
|
||||
private int keyPrice;
|
||||
private int keyNum;
|
||||
private double goldNum;//用户余额
|
||||
private int sendMessageSwitchLevel;
|
||||
|
||||
public int getKeyPrice() {
|
||||
return keyPrice;
|
||||
}
|
||||
|
||||
public void setKeyPrice(int keyPrice) {
|
||||
this.keyPrice = keyPrice;
|
||||
}
|
||||
|
||||
public int getKeyNum() {
|
||||
return keyNum;
|
||||
}
|
||||
|
||||
public void setKeyNum(int keyNum) {
|
||||
this.keyNum = keyNum;
|
||||
}
|
||||
|
||||
public double getGoldNum() {
|
||||
return goldNum;
|
||||
}
|
||||
|
||||
public void setGoldNum(double goldNum) {
|
||||
this.goldNum = goldNum;
|
||||
}
|
||||
|
||||
public int getSendMessageSwitchLevel() {
|
||||
return sendMessageSwitchLevel;
|
||||
}
|
||||
|
||||
public void setSendMessageSwitchLevel(int sendMessageSwitchLevel) {
|
||||
this.sendMessageSwitchLevel = sendMessageSwitchLevel;
|
||||
}
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
package com.chwl.core.treasure_box.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class OpenBoxDrawResult implements Serializable {
|
||||
|
||||
private List<PrizeNewInfo> prizeItemList;
|
||||
|
||||
public List<PrizeNewInfo> getPrizeItemList() {
|
||||
return prizeItemList;
|
||||
}
|
||||
|
||||
public void setPrizeItemList(List<PrizeNewInfo> prizeItemList) {
|
||||
this.prizeItemList = prizeItemList;
|
||||
}
|
||||
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
package com.chwl.core.treasure_box.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class OpenBoxHonourResult implements Serializable {
|
||||
private List<PrizeInfo> prizeItemList;
|
||||
private int remainKeyNum;
|
||||
private int spendGold;// 花费钻石数(能量值)
|
||||
|
||||
public List<PrizeInfo> getPrizeItemList() {
|
||||
return prizeItemList;
|
||||
}
|
||||
|
||||
public void setPrizeItemList(List<PrizeInfo> prizeItemList) {
|
||||
this.prizeItemList = prizeItemList;
|
||||
}
|
||||
|
||||
public int getRemainKeyNum() {
|
||||
return remainKeyNum;
|
||||
}
|
||||
|
||||
public void setRemainKeyNum(int remainKeyNum) {
|
||||
this.remainKeyNum = remainKeyNum;
|
||||
}
|
||||
|
||||
public int getSpendGold() {
|
||||
return spendGold;
|
||||
}
|
||||
|
||||
public void setSpendGold(int spendGold) {
|
||||
this.spendGold = spendGold;
|
||||
}
|
||||
}
|
@@ -1,35 +0,0 @@
|
||||
package com.chwl.core.treasure_box.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class OpenBoxResult implements Serializable {
|
||||
|
||||
private List<PrizeInfo> prizeItemList;
|
||||
private int remainKeyNum;
|
||||
private boolean specialStatus;
|
||||
|
||||
public List<PrizeInfo> getPrizeItemList() {
|
||||
return prizeItemList;
|
||||
}
|
||||
|
||||
public void setPrizeItemList(List<PrizeInfo> prizeItemList) {
|
||||
this.prizeItemList = prizeItemList;
|
||||
}
|
||||
|
||||
public int getRemainKeyNum() {
|
||||
return remainKeyNum;
|
||||
}
|
||||
|
||||
public void setRemainKeyNum(int remainKeyNum) {
|
||||
this.remainKeyNum = remainKeyNum;
|
||||
}
|
||||
|
||||
public boolean isSpecialStatus() {
|
||||
return specialStatus;
|
||||
}
|
||||
|
||||
public void setSpecialStatus(boolean specialStatus) {
|
||||
this.specialStatus = specialStatus;
|
||||
}
|
||||
}
|
@@ -1,95 +0,0 @@
|
||||
package com.chwl.core.treasure_box.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class PrizeInfo implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
* prizeName :
|
||||
* prizeImgUrl :
|
||||
* prizeLevel : 1
|
||||
* drawTime : 11111
|
||||
*/
|
||||
|
||||
private String prizeName;
|
||||
private String prizeImgUrl;
|
||||
private int prizeLevel;
|
||||
private String createTime;
|
||||
private int keyNum;
|
||||
private int platformValue;
|
||||
private int prizeNum;
|
||||
private String showRate;
|
||||
|
||||
public PrizeInfo() {
|
||||
}
|
||||
|
||||
public int getPlatformValue() {
|
||||
return platformValue;
|
||||
}
|
||||
|
||||
public void setPlatformValue(int platformValue) {
|
||||
this.platformValue = platformValue;
|
||||
}
|
||||
|
||||
public PrizeInfo(String prizeImgUrl, int prizeLevel) {
|
||||
this.prizeImgUrl = prizeImgUrl;
|
||||
this.prizeLevel = prizeLevel;
|
||||
}
|
||||
|
||||
public String getPrizeName() {
|
||||
return prizeName;
|
||||
}
|
||||
|
||||
public void setPrizeName(String prizeName) {
|
||||
this.prizeName = prizeName;
|
||||
}
|
||||
|
||||
public String getPrizeImgUrl() {
|
||||
return prizeImgUrl;
|
||||
}
|
||||
|
||||
public void setPrizeImgUrl(String prizeImgUrl) {
|
||||
this.prizeImgUrl = prizeImgUrl;
|
||||
}
|
||||
|
||||
public int getPrizeLevel() {
|
||||
return prizeLevel;
|
||||
}
|
||||
|
||||
public void setPrizeLevel(int prizeLevel) {
|
||||
this.prizeLevel = prizeLevel;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public int getPrizeNum() {
|
||||
return prizeNum;
|
||||
}
|
||||
|
||||
public void setPrizeNum(int prizeNum) {
|
||||
this.prizeNum = prizeNum;
|
||||
}
|
||||
|
||||
public int getKeyNum() {
|
||||
return keyNum;
|
||||
}
|
||||
|
||||
public void setKeyNum(int keyNum) {
|
||||
this.keyNum = keyNum;
|
||||
}
|
||||
|
||||
public String getShowRate() {
|
||||
return showRate;
|
||||
}
|
||||
|
||||
public void setShowRate(String showRate) {
|
||||
this.showRate = showRate;
|
||||
}
|
||||
}
|
@@ -1,69 +0,0 @@
|
||||
package com.chwl.core.treasure_box.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class PrizeNewInfo implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
* prizeName :
|
||||
* prizeImgUrl :
|
||||
* prizeLevel : 1
|
||||
* drawTime : 11111
|
||||
*/
|
||||
|
||||
private int rewardId;
|
||||
private String rewardName;
|
||||
private String picUrl;
|
||||
private int diamonds;
|
||||
private int num;
|
||||
private int level;
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public int getRewardId() {
|
||||
return rewardId;
|
||||
}
|
||||
|
||||
public void setRewardId(int rewardId) {
|
||||
this.rewardId = rewardId;
|
||||
}
|
||||
|
||||
public String getRewardName() {
|
||||
return rewardName;
|
||||
}
|
||||
|
||||
public void setRewardName(String rewardName) {
|
||||
this.rewardName = rewardName;
|
||||
}
|
||||
|
||||
public String getPicUrl() {
|
||||
return picUrl;
|
||||
}
|
||||
|
||||
public void setPicUrl(String picUrl) {
|
||||
this.picUrl = picUrl;
|
||||
}
|
||||
|
||||
public int getDiamonds() {
|
||||
return diamonds;
|
||||
}
|
||||
|
||||
public void setDiamonds(int diamonds) {
|
||||
this.diamonds = diamonds;
|
||||
}
|
||||
|
||||
public int getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNum(int num) {
|
||||
this.num = num;
|
||||
}
|
||||
}
|
@@ -1,8 +0,0 @@
|
||||
package com.chwl.core.treasure_box.bean
|
||||
|
||||
data class UserTicketInfo(
|
||||
val diamond: Double = 0.0,
|
||||
var ticketNum: Int = 0,
|
||||
val ticketPrice: Double = 0.0,
|
||||
val uid: Int = 0
|
||||
)
|
@@ -1,22 +0,0 @@
|
||||
package com.chwl.core.treasure_box.event;
|
||||
|
||||
import com.chwl.core.treasure_box.bean.OpenBoxResult;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AutoOpenBoxEvent {
|
||||
|
||||
private boolean isRunning;
|
||||
private OpenBoxResult openBoxResult;
|
||||
|
||||
public AutoOpenBoxEvent setRunning(boolean running) {
|
||||
isRunning = running;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AutoOpenBoxEvent setOpenBoxResult(OpenBoxResult openBoxResult) {
|
||||
this.openBoxResult = openBoxResult;
|
||||
return this;
|
||||
}
|
||||
}
|
@@ -1,22 +0,0 @@
|
||||
package com.chwl.core.treasure_box.event;
|
||||
|
||||
import com.chwl.core.treasure_box.bean.OpenBoxHonourResult;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AutoOpenHonourBoxEvent {
|
||||
|
||||
private boolean isRunning;
|
||||
private OpenBoxHonourResult openBoxResult;
|
||||
|
||||
public AutoOpenHonourBoxEvent setRunning(boolean running) {
|
||||
isRunning = running;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AutoOpenHonourBoxEvent setOpenBoxResult(OpenBoxHonourResult openBoxResult) {
|
||||
this.openBoxResult = openBoxResult;
|
||||
return this;
|
||||
}
|
||||
}
|
@@ -1,40 +0,0 @@
|
||||
package com.chwl.core.treasure_box.event;
|
||||
|
||||
import com.chwl.core.treasure_box.bean.KeyInfo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BoxBuyKeyEvent {
|
||||
|
||||
private boolean isSuccess;
|
||||
private boolean isKeyDeficiency;
|
||||
private int count;
|
||||
private int code;
|
||||
private KeyInfo keyInfo;
|
||||
|
||||
public BoxBuyKeyEvent setSuccess(boolean success) {
|
||||
isSuccess = success;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BoxBuyKeyEvent setKeyDeficiency(boolean keyDeficiency) {
|
||||
isKeyDeficiency = keyDeficiency;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BoxBuyKeyEvent setCount(int count) {
|
||||
this.count = count;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BoxBuyKeyEvent setCode(int code) {
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BoxBuyKeyEvent setKeyInfo(KeyInfo keyInfo) {
|
||||
this.keyInfo = keyInfo;
|
||||
return this;
|
||||
}
|
||||
}
|
@@ -1,40 +0,0 @@
|
||||
package com.chwl.core.treasure_box.event;
|
||||
|
||||
import com.chwl.core.treasure_box.bean.HonourBuyKeyResultInfo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HonourBoxBuyKeyEvent {
|
||||
|
||||
private boolean isSuccess;
|
||||
private boolean isKeyDeficiency;
|
||||
private int count;
|
||||
private int code;
|
||||
private HonourBuyKeyResultInfo keyInfo;
|
||||
|
||||
public HonourBoxBuyKeyEvent setSuccess(boolean success) {
|
||||
isSuccess = success;
|
||||
return this;
|
||||
}
|
||||
|
||||
public HonourBoxBuyKeyEvent setKeyDeficiency(boolean keyDeficiency) {
|
||||
isKeyDeficiency = keyDeficiency;
|
||||
return this;
|
||||
}
|
||||
|
||||
public HonourBoxBuyKeyEvent setCount(int count) {
|
||||
this.count = count;
|
||||
return this;
|
||||
}
|
||||
|
||||
public HonourBoxBuyKeyEvent setCode(int code) {
|
||||
this.code = code;
|
||||
return this;
|
||||
}
|
||||
|
||||
public HonourBoxBuyKeyEvent setKeyInfo(HonourBuyKeyResultInfo keyInfo) {
|
||||
this.keyInfo = keyInfo;
|
||||
return this;
|
||||
}
|
||||
}
|
@@ -1,339 +0,0 @@
|
||||
package com.chwl.core.treasure_box.model;
|
||||
|
||||
import com.chwl.core.treasure_box.bean.BoxOpenStatusInfo;
|
||||
import com.chwl.core.treasure_box.bean.ConfigImgUrl;
|
||||
import com.chwl.core.treasure_box.bean.HonourBuyKeyResultInfo;
|
||||
import com.chwl.core.treasure_box.bean.HonourKeyInfo;
|
||||
import com.chwl.core.treasure_box.bean.KeyInfo;
|
||||
import com.chwl.core.treasure_box.bean.PrizeNewInfo;
|
||||
import com.chwl.core.treasure_box.bean.UserTicketInfo;
|
||||
import com.chwl.core.treasure_box.bean.OpenBoxHonourResult;
|
||||
import com.chwl.core.treasure_box.bean.OpenBoxResult;
|
||||
import com.chwl.core.treasure_box.bean.PrizeInfo;
|
||||
import com.chwl.core.R;
|
||||
import com.chwl.core.auth.AuthModel;
|
||||
import com.chwl.core.base.BaseModel;
|
||||
import com.chwl.core.bean.response.ServiceResult;
|
||||
import com.chwl.core.exception.FailReasonException;
|
||||
import com.chwl.core.manager.AvRoomDataManager;
|
||||
import com.chwl.core.utils.net.BalanceNotEnoughExeption;
|
||||
import com.chwl.core.utils.net.RxHelper;
|
||||
import com.chwl.library.net.rxnet.RxNet;
|
||||
import com.chwl.library.utils.ResUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.Single;
|
||||
import io.reactivex.SingleSource;
|
||||
import io.reactivex.functions.Function;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public class BoxModel extends BaseModel implements IBoxModel {
|
||||
|
||||
/**
|
||||
* 钻石不足
|
||||
*/
|
||||
public static final int ERROR_CODE_DIAMOND = 31005;
|
||||
|
||||
private Api api;
|
||||
|
||||
private BoxModel() {
|
||||
api = RxNet.create(Api.class);
|
||||
}
|
||||
|
||||
public static IBoxModel get() {
|
||||
return BoxModelHelper.instance;
|
||||
}
|
||||
|
||||
private static class BoxModelHelper {
|
||||
private static IBoxModel instance = new BoxModel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<ConfigImgUrl> getRule() {
|
||||
return api.getRule()
|
||||
.compose(RxHelper.handleBeanData())
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<List<PrizeNewInfo>> openBoxDraw(int keyNum, boolean sendMessage) {
|
||||
if (AvRoomDataManager.get().mCurrentRoomInfo == null) {
|
||||
return Single.error(new Throwable(ResUtil.getString(R.string.treasure_box_model_boxmodel_01)));
|
||||
}
|
||||
return api.openBoxDraw(keyNum, sendMessage, AvRoomDataManager.get().mCurrentRoomInfo.getUid())
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.flatMap(openBoxResultServiceResult -> {
|
||||
if (openBoxResultServiceResult == null) {
|
||||
return Single.error(new Throwable("no response"));
|
||||
}
|
||||
if (openBoxResultServiceResult.isSuccess()) {
|
||||
if (openBoxResultServiceResult.getData() != null) {
|
||||
return Single.just(openBoxResultServiceResult.getData());
|
||||
} else {
|
||||
return Single.error(new Throwable("data is null"));
|
||||
}
|
||||
}
|
||||
return Single.error(new FailReasonException(openBoxResultServiceResult.getMessage(),
|
||||
openBoxResultServiceResult.getCode()));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<UserTicketInfo> getUserTicket() {
|
||||
return api.getUserTicket()
|
||||
.compose(RxHelper.handleBeanData())
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<UserTicketInfo> buyTicket(int num) {
|
||||
return api.buyTicket(num)
|
||||
.compose(RxHelper.handleCommon())
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<OpenBoxResult> openBox(int boxType, int keyNum, boolean sendMessage) {
|
||||
if (AvRoomDataManager.get().mCurrentRoomInfo == null) {
|
||||
return Single.error(new Throwable(ResUtil.getString(R.string.treasure_box_model_boxmodel_01)));
|
||||
}
|
||||
return api.openBox(boxType, keyNum, sendMessage, AuthModel.get().getCurrentUid(),
|
||||
AvRoomDataManager.get().mCurrentRoomInfo.getUid())
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.flatMap(openBoxResultServiceResult -> {
|
||||
if (openBoxResultServiceResult == null) {
|
||||
return Single.error(new Throwable("no response"));
|
||||
}
|
||||
if (openBoxResultServiceResult.isSuccess()) {
|
||||
if (openBoxResultServiceResult.getData() != null) {
|
||||
return Single.just(openBoxResultServiceResult.getData());
|
||||
} else {
|
||||
return Single.error(new Throwable("data is null"));
|
||||
}
|
||||
}
|
||||
return Single.error(new FailReasonException(openBoxResultServiceResult.getMessage(),
|
||||
openBoxResultServiceResult.getCode()));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<ServiceResult<List<PrizeInfo>>> getPrizeRecord(int page,
|
||||
int pageSize,
|
||||
String sortType,
|
||||
long uid) {
|
||||
return api.getPrizeRecord(page, pageSize, sortType, uid)
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<KeyInfo> buyKey(int keyNum) {
|
||||
return api.buyKey(keyNum, AuthModel.get().getCurrentUid())
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.flatMap(new Function<ServiceResult<KeyInfo>, SingleSource<KeyInfo>>() {
|
||||
@Override
|
||||
public SingleSource<KeyInfo> apply(ServiceResult<KeyInfo> result) throws Exception {
|
||||
if (result.isSuccess() && result.getData() != null) {
|
||||
return Single.just(result.getData());
|
||||
}
|
||||
if (result.getCode() == BalanceNotEnoughExeption.code) {
|
||||
return Single.error(new BalanceNotEnoughExeption(ResUtil.getString(R.string.treasure_box_model_boxmodel_02)));
|
||||
}
|
||||
return Single.error(new Throwable(RxHelper.getValidMessage(result)));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<KeyInfo> getKeyInfo(int boxType) {
|
||||
return api.getKeyInfo(boxType, AuthModel.get().getCurrentUid())
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.compose(RxHelper.handleBeanData());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<ServiceResult<List<PrizeInfo>>> getPrizes() {
|
||||
return api.getPrizes()
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<BoxOpenStatusInfo> getBoxOpenStatusInfo(int type) {
|
||||
return api.getBoxOpenStatusInfo(type)
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.compose(RxHelper.handleBeanData());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<HonourKeyInfo> getHonourKeyInfo(long uid) {
|
||||
return api.getHonourKeyInfo(uid)
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.compose(RxHelper.handleBeanData());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<OpenBoxHonourResult> openHonourBox(long uid, boolean sendMessage, long roomUid,
|
||||
int keyNum, String ticket) {
|
||||
return api.openHonourBox(uid, sendMessage, roomUid, keyNum, ticket)
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.compose(RxHelper.handleBeanData());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<HonourBuyKeyResultInfo> buyHonourKey(long uid, int keyNum, String ticket) {
|
||||
return api.buyHonourKey(uid, keyNum, ticket)
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.compose(RxHelper.handleBeanData());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<ServiceResult<List<PrizeInfo>>> getHonourBoxJackpotInfo() {
|
||||
return api.getHonourBoxJackpotInfo()
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
|
||||
private interface Api {
|
||||
/**
|
||||
* 中奖记录列表
|
||||
*
|
||||
* @param page
|
||||
* @param pageSize
|
||||
* @param sortType 排序类型:按时间:time,按价值:worth
|
||||
* @param uid
|
||||
* @return 中奖纪录列表
|
||||
*/
|
||||
@GET("box/drawrecord")
|
||||
Single<ServiceResult<List<PrizeInfo>>> getPrizeRecord(@Query("page") int page,
|
||||
@Query("pageSize") int pageSize,
|
||||
@Query("sortType") String sortType,
|
||||
@Query("uid") long uid);
|
||||
|
||||
/**
|
||||
* 获取用户vo(门票)
|
||||
*
|
||||
*/
|
||||
@GET("/findLove/user")
|
||||
Single<ServiceResult<UserTicketInfo>> getUserTicket();
|
||||
|
||||
/**
|
||||
* 购买门票
|
||||
*
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/findLove/buyTicket")
|
||||
Single<ServiceResult<UserTicketInfo>> buyTicket(@Field("num") int num);
|
||||
|
||||
/**
|
||||
* 寻爱抽奖
|
||||
*
|
||||
* @param num
|
||||
* @param sendMessage
|
||||
* @param roomUid
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/findLove/draw")
|
||||
Single<ServiceResult<List<PrizeNewInfo>>> openBoxDraw(@Field("num") int num,
|
||||
@Field("sendMessage") boolean sendMessage,
|
||||
@Field("roomUid") long roomUid);
|
||||
|
||||
/**
|
||||
* 开宝箱
|
||||
*
|
||||
* @param keyNum
|
||||
* @param sendMessage
|
||||
* @param uid
|
||||
* @param roomUid
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("box/draw")
|
||||
Single<ServiceResult<OpenBoxResult>> openBox(@Field("boxType") int boxType,
|
||||
@Field("keyNum") int keyNum,
|
||||
@Field("sendMessage") boolean sendMessage,
|
||||
@Field("uid") long uid,
|
||||
@Field("roomUid") long roomUid);
|
||||
|
||||
/**
|
||||
* 购买钥匙
|
||||
*
|
||||
* @param keyNum
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("box/buykey")
|
||||
Single<ServiceResult<KeyInfo>> buyKey(@Field("keyNum") int keyNum,
|
||||
@Field("uid") long uid);
|
||||
|
||||
/**
|
||||
* 获取用户钥匙数 + 钥匙价格
|
||||
*
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
@GET("box/userkey")
|
||||
Single<ServiceResult<KeyInfo>> getKeyInfo(@Query("boxType") int boxType,
|
||||
@Query("uid") long uid);
|
||||
|
||||
/**
|
||||
* 获取开箱子配置图片
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET("box/configimgurl")
|
||||
Single<ServiceResult<ConfigImgUrl>> getRule();
|
||||
|
||||
/**
|
||||
* 获取奖品列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET("box/prizes/withRate")
|
||||
Single<ServiceResult<List<PrizeInfo>>> getPrizes();
|
||||
|
||||
/**
|
||||
* 宝箱开放状态
|
||||
*/
|
||||
@GET("box/open/status")
|
||||
Single<ServiceResult<BoxOpenStatusInfo>> getBoxOpenStatusInfo(@Query("type") int type);
|
||||
|
||||
/**
|
||||
* 获取用户至尊宝箱钥匙数+至尊宝箱钥匙价格
|
||||
*/
|
||||
@GET("box/diamond/userkey")
|
||||
Single<ServiceResult<HonourKeyInfo>> getHonourKeyInfo(@Query("uid") long uid);
|
||||
|
||||
/**
|
||||
* 至尊蛋抽奖
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("box/diamond/draw")
|
||||
Single<ServiceResult<OpenBoxHonourResult>> openHonourBox(@Field("uid") long uid,
|
||||
@Field("sendMessage") boolean sendMessage,
|
||||
@Field("roomUid") long roomUid,
|
||||
@Field("keyNum") int keyNum,
|
||||
@Field("ticket") String ticket);
|
||||
|
||||
/**
|
||||
* 购买钻石宝箱钥匙
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("box/diamond/buykey")
|
||||
Single<ServiceResult<HonourBuyKeyResultInfo>> buyHonourKey(@Field("uid") long uid,
|
||||
@Field("keyNum") int keyNum,
|
||||
@Field("ticket") String ticket);
|
||||
|
||||
/**
|
||||
* 至尊蛋本期奖池
|
||||
*/
|
||||
@GET("box/diamond/prizes/withRate")
|
||||
Single<ServiceResult<List<PrizeInfo>>> getHonourBoxJackpotInfo();
|
||||
}
|
||||
}
|
@@ -1,130 +0,0 @@
|
||||
package com.chwl.core.treasure_box.model;
|
||||
|
||||
import com.chwl.core.treasure_box.bean.ConfigImgUrl;
|
||||
import com.chwl.core.treasure_box.bean.HonourBuyKeyResultInfo;
|
||||
import com.chwl.core.treasure_box.bean.HonourKeyInfo;
|
||||
import com.chwl.core.treasure_box.bean.KeyInfo;
|
||||
import com.chwl.core.treasure_box.bean.PrizeNewInfo;
|
||||
import com.chwl.core.treasure_box.bean.UserTicketInfo;
|
||||
import com.chwl.core.treasure_box.bean.BoxOpenStatusInfo;
|
||||
import com.chwl.core.treasure_box.bean.OpenBoxHonourResult;
|
||||
import com.chwl.core.treasure_box.bean.OpenBoxResult;
|
||||
import com.chwl.core.treasure_box.bean.PrizeInfo;
|
||||
import com.chwl.core.base.IModel;
|
||||
import com.chwl.core.bean.response.ServiceResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.Single;
|
||||
|
||||
public interface IBoxModel extends IModel {
|
||||
|
||||
/**
|
||||
* 获取开箱子配置图片
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Single<ConfigImgUrl> getRule();
|
||||
|
||||
/**
|
||||
* 寻爱抽奖
|
||||
*
|
||||
* @param keyNum
|
||||
* @param sendMessage
|
||||
* @return
|
||||
*/
|
||||
Single<List<PrizeNewInfo>> openBoxDraw(int keyNum, boolean sendMessage);
|
||||
|
||||
/**
|
||||
* 获取用户vo(门票)
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Single<UserTicketInfo> getUserTicket();
|
||||
|
||||
/**
|
||||
* 购买门票
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Single<UserTicketInfo> buyTicket(int num);
|
||||
|
||||
/**
|
||||
* 开箱子
|
||||
*
|
||||
* @param keyNum
|
||||
* @param sendMessage
|
||||
* @return
|
||||
*/
|
||||
Single<OpenBoxResult> openBox(int boxType,int keyNum, boolean sendMessage);
|
||||
|
||||
/**
|
||||
* 获取中奖记录
|
||||
*
|
||||
* @param page
|
||||
* @param pageSize
|
||||
* @param sortType
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
Single<ServiceResult<List<PrizeInfo>>> getPrizeRecord(int page,
|
||||
int pageSize,
|
||||
String sortType,
|
||||
long uid);
|
||||
|
||||
/**
|
||||
* 购买钥匙
|
||||
*
|
||||
* @param keyNum
|
||||
* @return
|
||||
*/
|
||||
Single<KeyInfo> buyKey(int keyNum);
|
||||
|
||||
/**
|
||||
* 获取用户钥匙数 + 钥匙价格
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Single<KeyInfo> getKeyInfo(int boxType);
|
||||
|
||||
/**
|
||||
* 获取奖品列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Single<ServiceResult<List<PrizeInfo>>> getPrizes();
|
||||
|
||||
int BOX_TYPE_NORMAL = 1;// 普通蛋
|
||||
int BOX_TYPE_HONOUR = 2;// 至尊蛋
|
||||
|
||||
/**
|
||||
* 蛋开放状态
|
||||
*/
|
||||
Single<BoxOpenStatusInfo> getBoxOpenStatusInfo(int type);
|
||||
|
||||
/**
|
||||
* 获取用户至尊蛋钥匙数+至尊蛋钥匙价格
|
||||
*/
|
||||
Single<HonourKeyInfo> getHonourKeyInfo(long uid);
|
||||
|
||||
/**
|
||||
* 至尊蛋抽奖
|
||||
*/
|
||||
Single<OpenBoxHonourResult> openHonourBox(long uid,
|
||||
boolean sendMessage,
|
||||
long roomUid,
|
||||
int keyNum,
|
||||
String ticket);
|
||||
|
||||
/**
|
||||
* 购买至尊蛋钥匙
|
||||
*/
|
||||
Single<HonourBuyKeyResultInfo> buyHonourKey(long uid,
|
||||
int keyNum,
|
||||
String ticket);
|
||||
|
||||
/**
|
||||
* 至尊蛋本期奖池
|
||||
*/
|
||||
Single<ServiceResult<List<PrizeInfo>>> getHonourBoxJackpotInfo();
|
||||
}
|
@@ -1,61 +0,0 @@
|
||||
package com.chwl.core.treasure_box.model;
|
||||
|
||||
import com.chwl.core.treasure_box.bean.KeyInfo;
|
||||
import com.chwl.core.treasure_box.bean.BoxOpenStatusInfo;
|
||||
import com.chwl.core.treasure_box.bean.OpenBoxResult;
|
||||
import com.chwl.core.treasure_box.bean.PrizeInfo;
|
||||
import com.chwl.core.base.IModel;
|
||||
import com.chwl.core.bean.response.ServiceResult;
|
||||
import com.chwl.core.room.treasure_box.bean.BoxRankingInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.Single;
|
||||
|
||||
public interface IRadishModel extends IModel {
|
||||
|
||||
/**
|
||||
* 开箱子
|
||||
*
|
||||
* @param keyNum
|
||||
* @param sendMessage
|
||||
* @return
|
||||
*/
|
||||
Single<OpenBoxResult> openBox(int boxType,int keyNum, boolean sendMessage);
|
||||
|
||||
/**
|
||||
* 获取中奖记录
|
||||
*
|
||||
* @param page
|
||||
* @param pageSize
|
||||
* @param sortType
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
Single<ServiceResult<List<PrizeInfo>>> getPrizeRecord(int page,
|
||||
int pageSize,
|
||||
String sortType,
|
||||
long uid);
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户钥匙数 + 钥匙价格
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Single<KeyInfo> getKeyInfo(int boxType);
|
||||
|
||||
/**
|
||||
* 获取奖品列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
Single<ServiceResult<List<PrizeInfo>>> getPrizes();
|
||||
|
||||
/**
|
||||
* 蛋开放状态
|
||||
*/
|
||||
Single<BoxOpenStatusInfo> getBoxOpenStatusInfo(int type);
|
||||
|
||||
Single<BoxRankingInfo> getBoxRankingList(int datetype, int page, int pageSize);
|
||||
}
|
@@ -1,187 +0,0 @@
|
||||
package com.chwl.core.treasure_box.model;
|
||||
|
||||
import com.chwl.core.R;
|
||||
import com.chwl.core.treasure_box.bean.KeyInfo;
|
||||
import com.chwl.core.treasure_box.bean.BoxOpenStatusInfo;
|
||||
import com.chwl.core.treasure_box.bean.OpenBoxResult;
|
||||
import com.chwl.core.treasure_box.bean.PrizeInfo;
|
||||
import com.chwl.core.auth.AuthModel;
|
||||
import com.chwl.core.base.BaseModel;
|
||||
import com.chwl.core.bean.response.ServiceResult;
|
||||
import com.chwl.core.community.CommunityConstant;
|
||||
import com.chwl.core.exception.FailReasonException;
|
||||
import com.chwl.core.manager.AvRoomDataManager;
|
||||
import com.chwl.core.room.treasure_box.bean.BoxRankingInfo;
|
||||
import com.chwl.core.utils.net.RxHelper;
|
||||
import com.chwl.library.net.rxnet.RxNet;
|
||||
import com.chwl.library.utils.ResUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.reactivex.Single;
|
||||
import retrofit2.http.Field;
|
||||
import retrofit2.http.FormUrlEncoded;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public class RadishModel extends BaseModel implements IRadishModel {
|
||||
|
||||
/**
|
||||
* 锤子数(钥匙数)不足
|
||||
*/
|
||||
public static final int ERROR_CODE_KEY_NUM_NOT_ENOUGH = 10000;
|
||||
|
||||
private Api api;
|
||||
|
||||
private RadishModel() {
|
||||
api = RxNet.create(Api.class);
|
||||
}
|
||||
|
||||
public static IRadishModel get() {
|
||||
return BoxModelHelper.instance;
|
||||
}
|
||||
|
||||
private static class BoxModelHelper {
|
||||
private static IRadishModel instance = new RadishModel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<OpenBoxResult> openBox(int boxType,int keyNum, boolean sendMessage) {
|
||||
if (AvRoomDataManager.get().mCurrentRoomInfo == null) {
|
||||
return Single.error(new Throwable(ResUtil.getString(R.string.treasure_box_model_radishmodel_01)));
|
||||
}
|
||||
return api.openBox(boxType,keyNum, sendMessage, AuthModel.get().getCurrentUid(),
|
||||
AvRoomDataManager.get().mCurrentRoomInfo.getUid())
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.flatMap(openBoxResultServiceResult -> {
|
||||
if (openBoxResultServiceResult == null) {
|
||||
return Single.error(new Throwable("no response"));
|
||||
}
|
||||
if (openBoxResultServiceResult.isSuccess()) {
|
||||
if (openBoxResultServiceResult.getData() != null) {
|
||||
return Single.just(openBoxResultServiceResult.getData());
|
||||
} else {
|
||||
return Single.error(new Throwable("data is null"));
|
||||
}
|
||||
}
|
||||
return Single.error(new FailReasonException(openBoxResultServiceResult.getMessage(),
|
||||
openBoxResultServiceResult.getCode()));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<ServiceResult<List<PrizeInfo>>> getPrizeRecord(int page,
|
||||
int pageSize,
|
||||
String sortType,
|
||||
long uid) {
|
||||
return api.getPrizeRecord(page, pageSize, sortType, uid)
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<KeyInfo> getKeyInfo(int boxType) {
|
||||
return api.getKeyInfo(boxType,AuthModel.get().getCurrentUid())
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.compose(RxHelper.handleBeanData());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<ServiceResult<List<PrizeInfo>>> getPrizes() {
|
||||
return api.getPrizes()
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<BoxOpenStatusInfo> getBoxOpenStatusInfo(int type) {
|
||||
return api.getBoxOpenStatusInfo(type)
|
||||
.compose(RxHelper.handleSchedulers())
|
||||
.compose(RxHelper.handleBeanData());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<BoxRankingInfo> getBoxRankingList(int datetype,int page,int pageSize) {
|
||||
return api.apiNewbieList(String.valueOf(AuthModel.get().getCurrentUid()),
|
||||
CommunityConstant.VERSION_VALID_TYPE,
|
||||
AuthModel.get().getTicket(),
|
||||
datetype,
|
||||
page,
|
||||
pageSize)
|
||||
.compose(RxHelper.handleBeanData())
|
||||
.compose(RxHelper.handleSchedulers());
|
||||
}
|
||||
|
||||
private interface Api {
|
||||
/**
|
||||
* 中奖记录列表
|
||||
*
|
||||
* @param page
|
||||
* @param pageSize
|
||||
* @param sortType 排序类型:按时间:time,按价值:worth
|
||||
* @param uid
|
||||
* @return 中奖纪录列表
|
||||
*/
|
||||
@GET("linearlyPool/drawrecord")
|
||||
Single<ServiceResult<List<PrizeInfo>>> getPrizeRecord(@Query("page") int page,
|
||||
@Query("pageSize") int pageSize,
|
||||
@Query("sortType") String sortType,
|
||||
@Query("uid") long uid);
|
||||
|
||||
/**
|
||||
* 开宝箱
|
||||
*
|
||||
* @param keyNum
|
||||
* @param sendMessage
|
||||
* @param uid
|
||||
* @param roomUid
|
||||
* @return
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("/linearlyPool/draw")
|
||||
Single<ServiceResult<OpenBoxResult>> openBox(@Field("boxType") int boxType,
|
||||
@Field("keyNum") int keyNum,
|
||||
@Field("sendMessage") boolean sendMessage,
|
||||
@Field("uid") long uid,
|
||||
@Field("roomUid") long roomUid);
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户钥匙数 + 钥匙价格
|
||||
*
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
@GET("linearlyPool/userkey")
|
||||
Single<ServiceResult<KeyInfo>> getKeyInfo(@Query("boxType") int boxType,
|
||||
@Query("uid") long uid);
|
||||
|
||||
/**
|
||||
* 获取奖品列表
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GET("linearlyPool/prizes/withRate")
|
||||
Single<ServiceResult<List<PrizeInfo>>> getPrizes();
|
||||
|
||||
/**
|
||||
* 宝箱开放状态
|
||||
*/
|
||||
@GET("linearlyPool/open/status")
|
||||
Single<ServiceResult<BoxOpenStatusInfo>> getBoxOpenStatusInfo(@Query("type") int type);
|
||||
|
||||
/**
|
||||
* 首页动态
|
||||
*
|
||||
* @return -
|
||||
*/
|
||||
@GET("/linearlyPool/rankings")
|
||||
Single<ServiceResult<BoxRankingInfo>> apiNewbieList(
|
||||
@Query("uid") String uid,
|
||||
@Query("types") String types,
|
||||
@Query("ticket") String ticket,
|
||||
@Query("datetype") int datetype,
|
||||
@Query("page") int page,
|
||||
@Query("pageSize") int pageSize);
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user