糖果树UI升级:规则页面
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
package com.mango.treasure_box.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class BoxRuleItemInfo implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
* prizeName :
|
||||
* prizeImgUrl :
|
||||
* prizeLevel : 1
|
||||
* drawTime : 11111
|
||||
*/
|
||||
|
||||
private String prizeName;
|
||||
private String prizeUrl;
|
||||
private int prizeLevel;
|
||||
private long createTime;
|
||||
private int keyNum;
|
||||
private int platformValue;
|
||||
private int prizeNum;
|
||||
private String showRate;
|
||||
|
||||
public BoxRuleItemInfo() {
|
||||
}
|
||||
|
||||
public int getPlatformValue() {
|
||||
return platformValue;
|
||||
}
|
||||
|
||||
public void setPlatformValue(int platformValue) {
|
||||
this.platformValue = platformValue;
|
||||
}
|
||||
|
||||
|
||||
public String getPrizeName() {
|
||||
return prizeName;
|
||||
}
|
||||
|
||||
public void setPrizeName(String prizeName) {
|
||||
this.prizeName = prizeName;
|
||||
}
|
||||
|
||||
public String getPrizeUrl() {
|
||||
return prizeUrl;
|
||||
}
|
||||
|
||||
public void setPrizeUrl(String prizeImgUrl) {
|
||||
this.prizeUrl = prizeImgUrl;
|
||||
}
|
||||
|
||||
public int getPrizeLevel() {
|
||||
return prizeLevel;
|
||||
}
|
||||
|
||||
public void setPrizeLevel(int prizeLevel) {
|
||||
this.prizeLevel = prizeLevel;
|
||||
}
|
||||
|
||||
public long getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(long 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,6 +1,7 @@
|
||||
package com.mango.treasure_box.model;
|
||||
|
||||
import com.mango.treasure_box.bean.BoxOpenStatusInfo;
|
||||
import com.mango.treasure_box.bean.BoxRuleItemInfo;
|
||||
import com.mango.treasure_box.bean.HonourBuyKeyResultInfo;
|
||||
import com.mango.treasure_box.bean.HonourKeyInfo;
|
||||
import com.mango.treasure_box.bean.OpenBoxHonourResult;
|
||||
@@ -85,6 +86,13 @@ public class BoxModel extends BaseModel implements IBoxModel {
|
||||
.compose(RxHelper.handleCommon());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<List<BoxRuleItemInfo>> getOpenBoxRule() {
|
||||
return api.getOpenBoxRule(2)
|
||||
.compose(RxHelper.handleCommon());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Single<KeyInfo> buyKey(int keyNum) {
|
||||
return api.buyKey(keyNum, AuthModel.get().getCurrentUid())
|
||||
@@ -169,6 +177,14 @@ public class BoxModel extends BaseModel implements IBoxModel {
|
||||
@Query("sortType") String sortType,
|
||||
@Query("uid") long uid);
|
||||
|
||||
/**
|
||||
* 中奖记录列表
|
||||
*
|
||||
* @return 中奖纪录列表
|
||||
*/
|
||||
@GET("box/getOpenBoxRule ")
|
||||
Single<ServiceResult<List<BoxRuleItemInfo>>> getOpenBoxRule(@Query("boxType") int boxType);
|
||||
|
||||
/**
|
||||
* 开宝箱
|
||||
*
|
||||
|
@@ -1,6 +1,7 @@
|
||||
package com.mango.treasure_box.model;
|
||||
|
||||
import com.mango.treasure_box.bean.BoxOpenStatusInfo;
|
||||
import com.mango.treasure_box.bean.BoxRuleItemInfo;
|
||||
import com.mango.treasure_box.bean.HonourBuyKeyResultInfo;
|
||||
import com.mango.treasure_box.bean.HonourKeyInfo;
|
||||
import com.mango.treasure_box.bean.OpenBoxHonourResult;
|
||||
@@ -17,6 +18,9 @@ import io.reactivex.Single;
|
||||
|
||||
public interface IBoxModel extends IModel {
|
||||
|
||||
int BOX_TYPE_NORMAL = 1;// 普通蛋
|
||||
int BOX_TYPE_HONOUR = 2;// 至尊蛋
|
||||
|
||||
/**
|
||||
* 获取开箱子配置图片
|
||||
*
|
||||
@@ -31,7 +35,7 @@ public interface IBoxModel extends IModel {
|
||||
* @param sendMessage
|
||||
* @return
|
||||
*/
|
||||
Single<OpenBoxResult> openBox(int boxType,int keyNum, boolean sendMessage);
|
||||
Single<OpenBoxResult> openBox(int boxType, int keyNum, boolean sendMessage);
|
||||
|
||||
/**
|
||||
* 获取中奖记录
|
||||
@@ -43,9 +47,11 @@ public interface IBoxModel extends IModel {
|
||||
* @return
|
||||
*/
|
||||
Single<List<PrizeInfo>> getPrizeRecord(int page,
|
||||
int pageSize,
|
||||
String sortType,
|
||||
long uid);
|
||||
int pageSize,
|
||||
String sortType,
|
||||
long uid);
|
||||
|
||||
Single<List<BoxRuleItemInfo>> getOpenBoxRule();
|
||||
|
||||
/**
|
||||
* 购买钥匙
|
||||
@@ -69,9 +75,6 @@ public interface IBoxModel extends IModel {
|
||||
*/
|
||||
Single<ServiceResult<List<PrizeInfo>>> getPrizes();
|
||||
|
||||
int BOX_TYPE_NORMAL = 1;// 普通蛋
|
||||
int BOX_TYPE_HONOUR = 2;// 至尊蛋
|
||||
|
||||
/**
|
||||
* 蛋开放状态
|
||||
*/
|
||||
@@ -86,17 +89,17 @@ public interface IBoxModel extends IModel {
|
||||
* 至尊蛋抽奖
|
||||
*/
|
||||
Single<OpenBoxHonourResult> openHonourBox(long uid,
|
||||
boolean sendMessage,
|
||||
long roomUid,
|
||||
int keyNum,
|
||||
String ticket);
|
||||
boolean sendMessage,
|
||||
long roomUid,
|
||||
int keyNum,
|
||||
String ticket);
|
||||
|
||||
/**
|
||||
* 购买至尊蛋钥匙
|
||||
*/
|
||||
Single<HonourBuyKeyResultInfo> buyHonourKey(long uid,
|
||||
int keyNum,
|
||||
String ticket);
|
||||
int keyNum,
|
||||
String ticket);
|
||||
|
||||
/**
|
||||
* 至尊蛋本期奖池
|
||||
|
Reference in New Issue
Block a user