合并接口第一次上传

This commit is contained in:
18401019693
2022-11-25 16:26:56 +08:00
parent 6bd29ec63e
commit 450047aae2
40 changed files with 2197 additions and 327 deletions

View File

@@ -10,6 +10,8 @@ import java.util.List;
*/
public class Constants {
public static final String NEW_ENTER_ROOM = "enterRoom";
public static final String URL = "url";
public static final String PAYLOAD = "payload";
public static final String SEX = "sex";

View File

@@ -75,7 +75,7 @@ public class AnchorRecommendItemModel extends BaseModel {
private String avatarThumb = "";
@SerializedName("avatar2")
private String avatar2 = "";
@SerializedName("user_nicename")
@SerializedName(value = "user_nicename", alternate = "userNiceName")
private String userNicename = "";
@SerializedName("level")
private String level = "";

View File

@@ -0,0 +1,53 @@
package com.yunbao.common.bean;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
public class CheckLiveModel extends BaseModel {
@SerializedName("type")
private int type;
@SerializedName("type_val")
private String typeVal;
@SerializedName("type_msg")
private String typeMsg;
@SerializedName("live_sdk")
private String liveSdk;
public static CheckLiveModel objectFromData(String str) {
return new Gson().fromJson(str, CheckLiveModel.class);
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getTypeVal() {
return typeVal;
}
public void setTypeVal(String typeVal) {
this.typeVal = typeVal;
}
public String getTypeMsg() {
return typeMsg;
}
public void setTypeMsg(String typeMsg) {
this.typeMsg = typeMsg;
}
public String getLiveSdk() {
return liveSdk;
}
public void setLiveSdk(String liveSdk) {
this.liveSdk = liveSdk;
}
}

View File

@@ -0,0 +1,540 @@
package com.yunbao.common.bean;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import java.util.List;
public class EnterRoomInfoModel extends BaseModel {
@SerializedName("votestotal")
private String votestotal;
@SerializedName("medalRankNum")
private String medalRankNum;
@SerializedName("barrage_fee")
private String barrageFee;
@SerializedName("userlist_time")
private String userlistTime;
@SerializedName("chatserver")
private String chatserver;
@SerializedName("linkmic_uid")
private String linkmicUid;
@SerializedName("linkmic_pull")
private String linkmicPull;
@SerializedName("nums")
private String nums;
@SerializedName("game")
private List<?> game;
@SerializedName("gamebet")
private List<String> gamebet;
@SerializedName("gametime")
private String gametime;
@SerializedName("gameid")
private String gameid;
@SerializedName("gameaction")
private String gameaction;
@SerializedName("game_bankerid")
private String gameBankerid;
@SerializedName("game_banker_name")
private String gameBankerName;
@SerializedName("game_banker_avatar")
private String gameBankerAvatar;
@SerializedName("game_banker_coin")
private String gameBankerCoin;
@SerializedName("game_banker_limit")
private String gameBankerLimit;
@SerializedName("shut_time")
private String shutTime;
@SerializedName("kick_time")
private String kickTime;
@SerializedName("speak_limit")
private String speakLimit;
@SerializedName("barrage_limit")
private String barrageLimit;
@SerializedName("coin")
private String coin;
@SerializedName("vip")
private VipModel vip;
@SerializedName("liang")
private LiangModel liang;
@SerializedName("medal_level")
private String medalLevel;
@SerializedName("medal_name")
private String medalName;
@SerializedName("issuper")
private String issuper;
@SerializedName("usertype")
private String usertype;
@SerializedName("front_task")
private String frontTask;
@SerializedName("ismic")
private String ismic;
@SerializedName("isattention")
private String isattention;
@SerializedName("userlists")
private List<LiveUserGiftBean> userlists;
@SerializedName("guard")
private GuardModel guard;
@SerializedName("guard_nums")
private String guardNums;
@SerializedName("pkinfo")
private PkinfoModel pkinfo;
@SerializedName("lminfo")
private LminfoModel lminfo;
@SerializedName("isred")
private String isred;
@SerializedName("is_fans")
private String isFans;
@SerializedName("count_fans")
private String countFans;
@SerializedName("isconnection")
private String isconnection;
@SerializedName("isleave")
private String isleave;
@SerializedName("landscape")
private String landscape;
@SerializedName("un_charge")
private String unCharge;
@SerializedName("see_time")
private String seeTime;
@SerializedName("greetings")
private List<String> greetings;
@SerializedName("live_bg")
private String liveBg;
@SerializedName("anchor_goodnum")
private String anchorGoodnum;
public String getVotestotal() {
return votestotal;
}
public EnterRoomInfoModel setVotestotal(String votestotal) {
this.votestotal = votestotal;
return this;
}
public String getMedalRankNum() {
return medalRankNum;
}
public EnterRoomInfoModel setMedalRankNum(String medalRankNum) {
this.medalRankNum = medalRankNum;
return this;
}
public String getBarrageFee() {
return barrageFee;
}
public EnterRoomInfoModel setBarrageFee(String barrageFee) {
this.barrageFee = barrageFee;
return this;
}
public String getUserlistTime() {
return userlistTime;
}
public EnterRoomInfoModel setUserlistTime(String userlistTime) {
this.userlistTime = userlistTime;
return this;
}
public String getChatserver() {
return chatserver;
}
public EnterRoomInfoModel setChatserver(String chatserver) {
this.chatserver = chatserver;
return this;
}
public String getLinkmicUid() {
return linkmicUid;
}
public EnterRoomInfoModel setLinkmicUid(String linkmicUid) {
this.linkmicUid = linkmicUid;
return this;
}
public String getLinkmicPull() {
return linkmicPull;
}
public EnterRoomInfoModel setLinkmicPull(String linkmicPull) {
this.linkmicPull = linkmicPull;
return this;
}
public String getNums() {
return nums;
}
public EnterRoomInfoModel setNums(String nums) {
this.nums = nums;
return this;
}
public List<?> getGame() {
return game;
}
public EnterRoomInfoModel setGame(List<?> game) {
this.game = game;
return this;
}
public List<String> getGamebet() {
return gamebet;
}
public EnterRoomInfoModel setGamebet(List<String> gamebet) {
this.gamebet = gamebet;
return this;
}
public String getGametime() {
return gametime;
}
public EnterRoomInfoModel setGametime(String gametime) {
this.gametime = gametime;
return this;
}
public String getGameid() {
return gameid;
}
public EnterRoomInfoModel setGameid(String gameid) {
this.gameid = gameid;
return this;
}
public String getGameaction() {
return gameaction;
}
public EnterRoomInfoModel setGameaction(String gameaction) {
this.gameaction = gameaction;
return this;
}
public String getGameBankerid() {
return gameBankerid;
}
public EnterRoomInfoModel setGameBankerid(String gameBankerid) {
this.gameBankerid = gameBankerid;
return this;
}
public String getGameBankerName() {
return gameBankerName;
}
public EnterRoomInfoModel setGameBankerName(String gameBankerName) {
this.gameBankerName = gameBankerName;
return this;
}
public String getGameBankerAvatar() {
return gameBankerAvatar;
}
public EnterRoomInfoModel setGameBankerAvatar(String gameBankerAvatar) {
this.gameBankerAvatar = gameBankerAvatar;
return this;
}
public String getGameBankerCoin() {
return gameBankerCoin;
}
public EnterRoomInfoModel setGameBankerCoin(String gameBankerCoin) {
this.gameBankerCoin = gameBankerCoin;
return this;
}
public String getGameBankerLimit() {
return gameBankerLimit;
}
public EnterRoomInfoModel setGameBankerLimit(String gameBankerLimit) {
this.gameBankerLimit = gameBankerLimit;
return this;
}
public String getShutTime() {
return shutTime;
}
public EnterRoomInfoModel setShutTime(String shutTime) {
this.shutTime = shutTime;
return this;
}
public String getKickTime() {
return kickTime;
}
public EnterRoomInfoModel setKickTime(String kickTime) {
this.kickTime = kickTime;
return this;
}
public String getSpeakLimit() {
return speakLimit;
}
public EnterRoomInfoModel setSpeakLimit(String speakLimit) {
this.speakLimit = speakLimit;
return this;
}
public String getBarrageLimit() {
return barrageLimit;
}
public EnterRoomInfoModel setBarrageLimit(String barrageLimit) {
this.barrageLimit = barrageLimit;
return this;
}
public String getCoin() {
return coin;
}
public EnterRoomInfoModel setCoin(String coin) {
this.coin = coin;
return this;
}
public VipModel getVip() {
return vip;
}
public EnterRoomInfoModel setVip(VipModel vip) {
this.vip = vip;
return this;
}
public LiangModel getLiang() {
return liang;
}
public EnterRoomInfoModel setLiang(LiangModel liang) {
this.liang = liang;
return this;
}
public String getMedalLevel() {
return medalLevel;
}
public EnterRoomInfoModel setMedalLevel(String medalLevel) {
this.medalLevel = medalLevel;
return this;
}
public String getMedalName() {
return medalName;
}
public EnterRoomInfoModel setMedalName(String medalName) {
this.medalName = medalName;
return this;
}
public String getIssuper() {
return issuper;
}
public EnterRoomInfoModel setIssuper(String issuper) {
this.issuper = issuper;
return this;
}
public String getUsertype() {
return usertype;
}
public EnterRoomInfoModel setUsertype(String usertype) {
this.usertype = usertype;
return this;
}
public String getFrontTask() {
return frontTask;
}
public EnterRoomInfoModel setFrontTask(String frontTask) {
this.frontTask = frontTask;
return this;
}
public String getIsmic() {
return ismic;
}
public EnterRoomInfoModel setIsmic(String ismic) {
this.ismic = ismic;
return this;
}
public String getIsattention() {
return isattention;
}
public EnterRoomInfoModel setIsattention(String isattention) {
this.isattention = isattention;
return this;
}
public List<LiveUserGiftBean> getUserlists() {
return userlists;
}
public EnterRoomInfoModel setUserlists(List<LiveUserGiftBean> userlists) {
this.userlists = userlists;
return this;
}
public GuardModel getGuard() {
return guard;
}
public EnterRoomInfoModel setGuard(GuardModel guard) {
this.guard = guard;
return this;
}
public String getGuardNums() {
return guardNums;
}
public EnterRoomInfoModel setGuardNums(String guardNums) {
this.guardNums = guardNums;
return this;
}
public PkinfoModel getPkinfo() {
return pkinfo;
}
public EnterRoomInfoModel setPkinfo(PkinfoModel pkinfo) {
this.pkinfo = pkinfo;
return this;
}
public LminfoModel getLminfo() {
return lminfo;
}
public EnterRoomInfoModel setLminfo(LminfoModel lminfo) {
this.lminfo = lminfo;
return this;
}
public String getIsred() {
return isred;
}
public EnterRoomInfoModel setIsred(String isred) {
this.isred = isred;
return this;
}
public String getIsFans() {
return isFans;
}
public EnterRoomInfoModel setIsFans(String isFans) {
this.isFans = isFans;
return this;
}
public String getCountFans() {
return countFans;
}
public EnterRoomInfoModel setCountFans(String countFans) {
this.countFans = countFans;
return this;
}
public String getIsconnection() {
return isconnection;
}
public EnterRoomInfoModel setIsconnection(String isconnection) {
this.isconnection = isconnection;
return this;
}
public String getIsleave() {
return isleave;
}
public EnterRoomInfoModel setIsleave(String isleave) {
this.isleave = isleave;
return this;
}
public String getLandscape() {
return landscape;
}
public EnterRoomInfoModel setLandscape(String landscape) {
this.landscape = landscape;
return this;
}
public String getUnCharge() {
return unCharge;
}
public EnterRoomInfoModel setUnCharge(String unCharge) {
this.unCharge = unCharge;
return this;
}
public String getSeeTime() {
return seeTime;
}
public EnterRoomInfoModel setSeeTime(String seeTime) {
this.seeTime = seeTime;
return this;
}
public List<String> getGreetings() {
return greetings;
}
public EnterRoomInfoModel setGreetings(List<String> greetings) {
this.greetings = greetings;
return this;
}
public String getLiveBg() {
return liveBg;
}
public EnterRoomInfoModel setLiveBg(String liveBg) {
this.liveBg = liveBg;
return this;
}
public String getAnchorGoodnum() {
return anchorGoodnum;
}
public EnterRoomInfoModel setAnchorGoodnum(String anchorGoodnum) {
this.anchorGoodnum = anchorGoodnum;
return this;
}
}

View File

@@ -0,0 +1,111 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.List;
/**
* 整合进入直播间接口
*/
public class EnterRoomNewModel extends BaseModel {
@SerializedName("liveInfo")
private LiveInfoModel liveInfo;//直播间信息
@SerializedName("enterRoomInfo")
private EnterRoomInfoModel enterRoomInfo;//原接口进入直播间数据返回
@SerializedName("rankHour")
private RankHourModel rankHour;//.热度卡
@SerializedName("newPeopleTask")
private NewPeopleTaskModel newPeopleTask;//新人任务
@SerializedName("wishList")
private WishListModel wishList;//心愿单
@SerializedName("guardUser")
private GuardUserModel guardUserAvatar;//守护
@SerializedName("activeList")
private List<ActiveModel> activeList;//活动列表
@SerializedName("isUseHotCard")
private String isUseHotCard;//是否使用热度卡
@SerializedName("liveRoomActivity")
private List<LiveRoomActivityModel> liveRoomActivityModels;//活动列表
public List<LiveRoomActivityModel> getLiveRoomActivityModels() {
return liveRoomActivityModels;
}
public EnterRoomNewModel setLiveRoomActivityModels(List<LiveRoomActivityModel> liveRoomActivityModels) {
this.liveRoomActivityModels = liveRoomActivityModels;
return this;
}
public LiveInfoModel getLiveInfo() {
return liveInfo;
}
public EnterRoomNewModel setLiveInfo(LiveInfoModel liveInfo) {
this.liveInfo = liveInfo;
return this;
}
public EnterRoomInfoModel getEnterRoomInfo() {
return enterRoomInfo;
}
public EnterRoomNewModel setEnterRoomInfo(EnterRoomInfoModel enterRoomInfo) {
this.enterRoomInfo = enterRoomInfo;
return this;
}
public RankHourModel getRankHour() {
return rankHour;
}
public EnterRoomNewModel setRankHour(RankHourModel rankHour) {
this.rankHour = rankHour;
return this;
}
public NewPeopleTaskModel getNewPeopleTask() {
return newPeopleTask;
}
public EnterRoomNewModel setNewPeopleTask(NewPeopleTaskModel newPeopleTask) {
this.newPeopleTask = newPeopleTask;
return this;
}
public WishListModel getWishList() {
return wishList;
}
public EnterRoomNewModel setWishList(WishListModel wishList) {
this.wishList = wishList;
return this;
}
public GuardUserModel getGuardUserAvatar() {
return guardUserAvatar;
}
public EnterRoomNewModel setGuardUserAvatar(GuardUserModel guardUserAvatar) {
this.guardUserAvatar = guardUserAvatar;
return this;
}
public List<ActiveModel> getActiveList() {
return activeList;
}
public EnterRoomNewModel setActiveList(List<ActiveModel> activeList) {
this.activeList = activeList;
return this;
}
public String getIsUseHotCard() {
return isUseHotCard;
}
public EnterRoomNewModel setIsUseHotCard(String isUseHotCard) {
this.isUseHotCard = isUseHotCard;
return this;
}
}

View File

@@ -0,0 +1,29 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class GuardModel extends BaseModel {
@SerializedName("type")
private String type;
@SerializedName("endtime")
private String endtime;
public String getType() {
return type;
}
public GuardModel setType(String type) {
this.type = type;
return this;
}
public String getEndtime() {
return endtime;
}
public GuardModel setEndtime(String endtime) {
this.endtime = endtime;
return this;
}
}

View File

@@ -0,0 +1,33 @@
package com.yunbao.common.bean;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
public class GuardUserModel extends BaseModel{
@SerializedName("guardUserAvatar")
private String guardUserAvatar;
@SerializedName("guardType")
private String guardType;
public static GuardUserModel objectFromData(String str) {
return new Gson().fromJson(str, GuardUserModel.class);
}
public String getGuardUserAvatar() {
return guardUserAvatar;
}
public void setGuardUserAvatar(String guardUserAvatar) {
this.guardUserAvatar = guardUserAvatar;
}
public String getGuardType() {
return guardType;
}
public void setGuardType(String guardType) {
this.guardType = guardType;
}
}

View File

@@ -66,6 +66,7 @@ public class IMLoginModel extends BaseModel {
* noble_name : 贵族
* sex : 1
* slide : [{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"首充特惠大禮包","slide_id":91,"slide_name":"首充特惠大禮包","slide_pic":"https://qny.shayucm.com/20220531/90f6942fb928c3034baeb380b9c4003d.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/activity/firstTopUp/newUp.html"},{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"充值反饋活動","slide_id":88,"slide_name":"充值反饋活動","slide_pic":"https://qny.shayucm.com/20220511/faacb51d5a45f7ff24a6f0314df133fb.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/GuildTournament/202204/Tournament.html"}]
* slide : [{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"首充特惠大禮包","slide_id":91,"slide_name":"首充特惠大禮包","slide_pic":"https://qny.shayucm.com/20220531/90f6942fb928c3034baeb380b9c4003d.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/activity/firstTopUp/newUp.html"},{"listorder":0,"slide_cid":4,"slide_content":"","slide_des":"充值反饋活動","slide_id":88,"slide_name":"充值反饋活動","slide_pic":"https://qny.shayucm.com/20220511/faacb51d5a45f7ff24a6f0314df133fb.gif","slide_status":1,"slide_url":"https://ceshi.yaoulive.com/h5/GuildTournament/202204/Tournament.html"}]
* users_type : A
* votes : 0.00
* votestotal : 0
@@ -224,6 +225,126 @@ public class IMLoginModel extends BaseModel {
//超皇字体颜色
@SerializedName("contentColor")
private String contentColor = "";
//创建时间
@SerializedName("create_time")
private String createTime = "";
@SerializedName("is_guess")
private String isGuess = "";
@SerializedName("goodnum_expire_time")
private String goodnumExpireTime = "";
@SerializedName("version")
private String version = "";
@SerializedName("max_noble_end_time")
private String maxNobleEndTime = "";
@SerializedName("custom_color_id")
private String customColorId = "";
@SerializedName("is_chat")
private String isChat = "";
@SerializedName("is_rong")
private String isRong = "";
@SerializedName("contribution")
private String contribution = "";
@SerializedName("guard_type")
private String guardType = "";
public String getCreateTime() {
return createTime;
}
public IMLoginModel setCreateTime(String createTime) {
this.createTime = createTime;
return this;
}
public String getIsGuess() {
return isGuess;
}
public IMLoginModel setIsGuess(String isGuess) {
this.isGuess = isGuess;
return this;
}
public String getGoodnumExpireTime() {
return goodnumExpireTime;
}
public IMLoginModel setGoodnumExpireTime(String goodnumExpireTime) {
this.goodnumExpireTime = goodnumExpireTime;
return this;
}
public String getVersion() {
return version;
}
public IMLoginModel setVersion(String version) {
this.version = version;
return this;
}
public String getMaxNobleEndTime() {
return maxNobleEndTime;
}
public IMLoginModel setMaxNobleEndTime(String maxNobleEndTime) {
this.maxNobleEndTime = maxNobleEndTime;
return this;
}
public String getCustomColorId() {
return customColorId;
}
public IMLoginModel setCustomColorId(String customColorId) {
this.customColorId = customColorId;
return this;
}
public String getIsChat() {
return isChat;
}
public IMLoginModel setIsChat(String isChat) {
this.isChat = isChat;
return this;
}
public String getIsRong() {
return isRong;
}
public IMLoginModel setIsRong(String isRong) {
this.isRong = isRong;
return this;
}
public String getContribution() {
return contribution;
}
public IMLoginModel setContribution(String contribution) {
this.contribution = contribution;
return this;
}
public String getGuardType() {
return guardType;
}
public IMLoginModel setGuardType(String guardType) {
this.guardType = guardType;
return this;
}
public String getNobleEndTime() {
return nobleEndTime;

View File

@@ -5,8 +5,6 @@ import android.os.Parcelable;
import android.text.TextUtils;
import com.alibaba.fastjson.annotation.JSONField;
import com.yunbao.common.R;
import com.yunbao.common.utils.WordUtil;
import java.util.ArrayList;
import java.util.List;
@@ -380,25 +378,26 @@ public class LiveBean implements Parcelable {
if (!TextUtils.isEmpty(this.goodNum) && !"0".equals(this.goodNum)) {
return this.goodNum;
}
return this.uid;
return this.uid;
}
public LiveBean() {
}
private LiveBean(Parcel in) {
this.uid = in.readString();
this.avatar = in.readString();
this.avatarThumb = in.readString();
this.userNiceName = in.readString();
this.sex = in.readInt();
this.title = in.readString();
this.city = in.readString();
this.stream = in.readString();
this.pull = in.readString();
this.thumb = in.readString();
this.nums = in.readString();
this.sex = in.readInt();
this.distance = in.readString();
this.levelAnchor = in.readInt();
this.type = in.readInt();
@@ -406,6 +405,23 @@ public class LiveBean implements Parcelable {
this.goodNum = in.readString();
this.gameAction = in.readInt();
this.game = in.readString();
this.islive = in.readString();
this.isTop = in.readString();
this.pk_avatar_thumb = in.readString();
this.landscape = in.readInt();
this.hot_num = in.readString();
this.content_pic_size_one = in.readString();
this.content_pic_size_two = in.readString();
this.content_pic_size_three = in.readString();
this.is_week = in.readString();
this.img = in.readString();
this.url = in.readString();
this.drpk_status = in.readString();
this.is_rong = in.readInt();
this.isattention = in.readString();
this.recommendCardtype = in.readString();
this.recommendCardIconSizeTwo = in.readString();
this.recommendCardIconSizeThree = in.readString();
}
@Override
@@ -419,13 +435,13 @@ public class LiveBean implements Parcelable {
dest.writeString(this.avatar);
dest.writeString(this.avatarThumb);
dest.writeString(this.userNiceName);
dest.writeInt(this.sex);
dest.writeString(this.title);
dest.writeString(this.city);
dest.writeString(this.stream);
dest.writeString(this.pull);
dest.writeString(this.thumb);
dest.writeString(this.nums);
dest.writeInt(this.sex);
dest.writeString(this.distance);
dest.writeInt(this.levelAnchor);
dest.writeInt(this.type);
@@ -433,6 +449,23 @@ public class LiveBean implements Parcelable {
dest.writeString(this.goodNum);
dest.writeInt(this.gameAction);
dest.writeString(this.game);
dest.writeString(this.islive);
dest.writeString(this.isTop);
dest.writeString(this.pk_avatar_thumb);
dest.writeInt(this.landscape);
dest.writeString(this.hot_num);
dest.writeString(this.content_pic_size_one);
dest.writeString(this.content_pic_size_two);
dest.writeString(this.content_pic_size_three);
dest.writeString(this.is_week);
dest.writeString(this.img);
dest.writeString(this.url);
dest.writeString(this.drpk_status);
dest.writeInt(this.is_rong);
dest.writeString(this.isattention);
dest.writeString(this.recommendCardtype);
dest.writeString(this.recommendCardIconSizeTwo);
dest.writeString(this.recommendCardIconSizeThree);
}
public static final Creator<LiveBean> CREATOR = new Creator<LiveBean>() {

View File

@@ -0,0 +1,66 @@
package com.yunbao.common.bean;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
/**
* 活动列表
*/
public class LiveRoomActivityModel extends BaseModel {
@SerializedName("name")
private String name;
@SerializedName("img")
private String img;
@SerializedName("link")
private String link;
@SerializedName("is_hidden")
private String isHidden;
@SerializedName("show_type")
private String showType;
public String getName() {
return name;
}
public LiveRoomActivityModel setName(String name) {
this.name = name;
return this;
}
public String getImg() {
return img;
}
public LiveRoomActivityModel setImg(String img) {
this.img = img;
return this;
}
public String getLink() {
return link;
}
public LiveRoomActivityModel setLink(String link) {
this.link = link;
return this;
}
public String getIsHidden() {
return isHidden;
}
public LiveRoomActivityModel setIsHidden(String isHidden) {
this.isHidden = isHidden;
return this;
}
public String getShowType() {
return showType;
}
public LiveRoomActivityModel setShowType(String showType) {
this.showType = showType;
return this;
}
}

View File

@@ -0,0 +1,64 @@
package com.yunbao.common.bean;
import android.os.Parcel;
import android.text.TextUtils;
import android.util.Log;
import com.alibaba.fastjson.annotation.JSONField;
import com.yunbao.common.bean.UserBean;
/**
* Created by cxf on 2018/10/27.
* 直播间用户列表实体类
*/
public class LiveUserGiftBean extends UserBean {
private String contribution;
private int guardType;
private int nub;
public int getNub() {
return nub;
}
public void setNub(int nub) {
this.nub = nub;
}
public String getContribution() {
return contribution;
}
public void setContribution(String contribution) {
this.contribution = contribution;
}
/**
* 是否送过礼物
*/
public boolean hasContribution() {
return !TextUtils.isEmpty(this.contribution) && !"0".equals(this.contribution);
}
@JSONField(name = "guard_type")
public int getGuardType() {
return guardType;
}
@JSONField(name = "guard_type")
public void setGuardType(int guardType) {
this.guardType = guardType;
}
public LiveUserGiftBean(Parcel in) {
super(in);
}
@Override
public void writeToParcel(Parcel dest, int flags) {
super.writeToParcel(dest, flags);
}
}

View File

@@ -0,0 +1,23 @@
package com.yunbao.common.bean;
import com.google.gson.Gson;
import com.google.gson.annotations.SerializedName;
public class LminfoModel extends BaseModel{
@SerializedName("status")
private int status;
public static LminfoModel objectFromData(String str) {
return new Gson().fromJson(str, LminfoModel.class);
}
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
}

View File

@@ -0,0 +1,14 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class NewPeopleTaskModel extends BaseModel {
// @SerializedName("task")
// private TaskModel task;
// @SerializedName("gift")
// private GiftModel gift;
// @SerializedName("reward_all")
// private RewardAllModel rewardAll;
// @SerializedName("reward_one")
// private RewardAllModel rewardOne;
}

View File

@@ -0,0 +1,39 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class PKTopThreeModel extends BaseModel {
@SerializedName("uid")
private String uid;
@SerializedName("img")
private String img;
@SerializedName("liveuid")
private String liveuid;
public String getUid() {
return uid;
}
public PKTopThreeModel setUid(String uid) {
this.uid = uid;
return this;
}
public String getImg() {
return img;
}
public PKTopThreeModel setImg(String img) {
this.img = img;
return this;
}
public String getLiveuid() {
return liveuid;
}
public PKTopThreeModel setLiveuid(String liveuid) {
this.liveuid = liveuid;
return this;
}
}

View File

@@ -0,0 +1,18 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class PkTopUsersModel extends BaseModel {
@SerializedName("red_one")
private PKTopThreeModel redOne;
@SerializedName("red_two")
private PKTopThreeModel redTwo;
@SerializedName("red_three")
private PKTopThreeModel redThree;
@SerializedName("blue_one")
private PKTopThreeModel blueOne;
@SerializedName("blue_two")
private PKTopThreeModel blueTwo;
@SerializedName("blue_three")
private PKTopThreeModel blueThree;
}

View File

@@ -0,0 +1,161 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class PkinfoModel extends BaseModel {
@SerializedName("pkuid")
private String pkuid;
@SerializedName("pkuname")
private String pkuname;
@SerializedName("pkuimg")
private String pkuimg;
@SerializedName("pkpull")
private String pkpull;
@SerializedName("ifpk")
private String ifpk;
@SerializedName("pk_time")
private String pkTime;
@SerializedName("end_pk_time")
private String endPkTime;
@SerializedName("pk_gift_liveuid")
private String pkGiftLiveuid;
@SerializedName("pk_gift_pkuid")
private String pkGiftPkuid;
@SerializedName("anyway")
private String anyway;
@SerializedName("drpk_status")
private String drpkStatus;
@SerializedName("drpk_roomid")
private String drpkRoomid;
@SerializedName("drpk_time")
private String drpkTime;
@SerializedName("pk_top_users")
private PkTopUsersModel pkTopUsers;
public String getPkuid() {
return pkuid;
}
public PkinfoModel setPkuid(String pkuid) {
this.pkuid = pkuid;
return this;
}
public String getPkuname() {
return pkuname;
}
public PkinfoModel setPkuname(String pkuname) {
this.pkuname = pkuname;
return this;
}
public String getPkuimg() {
return pkuimg;
}
public PkinfoModel setPkuimg(String pkuimg) {
this.pkuimg = pkuimg;
return this;
}
public String getPkpull() {
return pkpull;
}
public PkinfoModel setPkpull(String pkpull) {
this.pkpull = pkpull;
return this;
}
public String getIfpk() {
return ifpk;
}
public PkinfoModel setIfpk(String ifpk) {
this.ifpk = ifpk;
return this;
}
public String getPkTime() {
return pkTime;
}
public PkinfoModel setPkTime(String pkTime) {
this.pkTime = pkTime;
return this;
}
public String getEndPkTime() {
return endPkTime;
}
public PkinfoModel setEndPkTime(String endPkTime) {
this.endPkTime = endPkTime;
return this;
}
public String getPkGiftLiveuid() {
return pkGiftLiveuid;
}
public PkinfoModel setPkGiftLiveuid(String pkGiftLiveuid) {
this.pkGiftLiveuid = pkGiftLiveuid;
return this;
}
public String getPkGiftPkuid() {
return pkGiftPkuid;
}
public PkinfoModel setPkGiftPkuid(String pkGiftPkuid) {
this.pkGiftPkuid = pkGiftPkuid;
return this;
}
public String getAnyway() {
return anyway;
}
public PkinfoModel setAnyway(String anyway) {
this.anyway = anyway;
return this;
}
public String getDrpkStatus() {
return drpkStatus;
}
public PkinfoModel setDrpkStatus(String drpkStatus) {
this.drpkStatus = drpkStatus;
return this;
}
public String getDrpkRoomid() {
return drpkRoomid;
}
public PkinfoModel setDrpkRoomid(String drpkRoomid) {
this.drpkRoomid = drpkRoomid;
return this;
}
public String getDrpkTime() {
return drpkTime;
}
public PkinfoModel setDrpkTime(String drpkTime) {
this.drpkTime = drpkTime;
return this;
}
public PkTopUsersModel getPkTopUsers() {
return pkTopUsers;
}
public PkinfoModel setPkTopUsers(PkTopUsersModel pkTopUsers) {
this.pkTopUsers = pkTopUsers;
return this;
}
}

View File

@@ -0,0 +1,61 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class RankHourModel extends BaseModel {
@SerializedName("liveuid")
private String liveuid;
@SerializedName("hourchart_h5_url")
private String hourchartH5Url;
@SerializedName("rank")
private String rank;
@SerializedName("starlightVal")
private String starlightVal;
@SerializedName("isshow")
private String isshow;
public String getLiveuid() {
return liveuid;
}
public RankHourModel setLiveuid(String liveuid) {
this.liveuid = liveuid;
return this;
}
public String getHourchartH5Url() {
return hourchartH5Url;
}
public RankHourModel setHourchartH5Url(String hourchartH5Url) {
this.hourchartH5Url = hourchartH5Url;
return this;
}
public String getRank() {
return rank;
}
public RankHourModel setRank(String rank) {
this.rank = rank;
return this;
}
public String getStarlightVal() {
return starlightVal;
}
public RankHourModel setStarlightVal(String starlightVal) {
this.starlightVal = starlightVal;
return this;
}
public String getIsshow() {
return isshow;
}
public RankHourModel setIsshow(String isshow) {
this.isshow = isshow;
return this;
}
}

View File

@@ -0,0 +1,30 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
import java.util.List;
public class WishListModel extends BaseModel {
@SerializedName("wishList")
private List<WishModel> wishList;
@SerializedName("img")
private String img;
public List<WishModel> getWishList() {
return wishList;
}
public WishListModel setWishList(List<WishModel> wishList) {
this.wishList = wishList;
return this;
}
public String getImg() {
return img;
}
public WishListModel setImg(String img) {
this.img = img;
return this;
}
}

View File

@@ -0,0 +1,106 @@
package com.yunbao.common.bean;
import com.google.gson.annotations.SerializedName;
public class WishModel extends BaseModel {
@SerializedName("id")
private String id;
@SerializedName("dtime")
private String dtime;
@SerializedName("luid")
private String luid;
@SerializedName("lid")
private String lid;
@SerializedName("wishlist_icon")
private String wishlistIcon;
@SerializedName("wishlist_num")
private String wishlistNum;
@SerializedName("wishlist_progress")
private String wishlistProgress;
@SerializedName("wishlist_name")
private String wishlistName;
@SerializedName("create_time")
private String createTime;
public String getId() {
return id;
}
public WishModel setId(String id) {
this.id = id;
return this;
}
public String getDtime() {
return dtime;
}
public WishModel setDtime(String dtime) {
this.dtime = dtime;
return this;
}
public String getLuid() {
return luid;
}
public WishModel setLuid(String luid) {
this.luid = luid;
return this;
}
public String getLid() {
return lid;
}
public WishModel setLid(String lid) {
this.lid = lid;
return this;
}
public String getWishlistIcon() {
return wishlistIcon;
}
public WishModel setWishlistIcon(String wishlistIcon) {
this.wishlistIcon = wishlistIcon;
return this;
}
public String getWishlistNum() {
return wishlistNum;
}
public WishModel setWishlistNum(String wishlistNum) {
this.wishlistNum = wishlistNum;
return this;
}
public String getWishlistProgress() {
return wishlistProgress;
}
public WishModel setWishlistProgress(String wishlistProgress) {
this.wishlistProgress = wishlistProgress;
return this;
}
public String getWishlistName() {
return wishlistName;
}
public WishModel setWishlistName(String wishlistName) {
this.wishlistName = wishlistName;
return this;
}
public String getCreateTime() {
return createTime;
}
public WishModel setCreateTime(String createTime) {
this.createTime = createTime;
return this;
}
}

View File

@@ -3,8 +3,10 @@ package com.yunbao.common.http;
import com.yunbao.common.bean.ActiveModel;
import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.CheckLiveModel;
import com.yunbao.common.bean.ContributeModel;
import com.yunbao.common.bean.CustomSidebarInfoModel;
import com.yunbao.common.bean.EnterRoomNewModel;
import com.yunbao.common.bean.FaceBookUpModel;
import com.yunbao.common.bean.HourRank;
import com.yunbao.common.bean.IMLoginModel;
@@ -268,17 +270,58 @@ public interface PDLiveApi {
* PK排位赛接口
*/
@GET("/api/public/?service=Ranking.getAnchorRankData")
Observable<ResponseModel<PkRankBean>> getPkRanksList(@Query("anchor_id") String anchorId,@Query("anchor_id2")String pkUid); /**
Observable<ResponseModel<PkRankBean>> getPkRanksList(@Query("anchor_id") String anchorId, @Query("anchor_id2") String pkUid);
/**
* PK排位赛接口
*/
@GET("/api/public/?service=Live.createDrLm")
Observable<ResponseModel<BaseModel>> createDrLm();
/* PK排位赛接口
*/
@GET("/api/public/?service=Live.delDrLm")
Observable<ResponseModel<BaseModel>> delDrLm();
/* PK排位赛接口
*/
@GET("/api/public/?service=Live.killDrLm")
Observable<ResponseModel<BaseModel>> killDrLm(@Query("uid")String uid,@Query("roomid")String roomId);
Observable<ResponseModel<BaseModel>> killDrLm(@Query("uid") String uid, @Query("roomid") String roomId);
/**
* 新进入房间接口
*
* @param groupId 房间名 g+liveUid
* @param stream
* @param liveUid
* @param city
* @return
*/
@GET("/api/public/?service=Live.enterRoomNew")
Observable<ResponseModel<EnterRoomNewModel>> enterRoomNew(
@Query("GroupId") String groupId,
@Query("stream") String stream,
@Query("liveuid") String liveUid,
@Query("city") String city
);
/**
* 检查直播间状态
*
* @return
*/
@GET("/api/public/?service=Live.checkLive")
Observable<ResponseModel<List<CheckLiveModel>>> checkLive(
@Query("liveuid") String liveUid,
@Query("stream") String stream
);
/**
* 加入房间推送Im欢迎语
*/
@GET("/api/public/?service=Tx.userJoinRoomNew")
Observable<ResponseModel<String>> userJoinRoomNew(
@Query("GroupId") String GroupId,
@Query("stream") String stream
);
}

View File

@@ -0,0 +1,30 @@
package com.yunbao.common.http.base;
import com.yunbao.common.bean.CheckLiveModel;
/**
* 直播间类型返回
*/
public interface CheckLiveCallBack {
/**
* ;普通房
*/
void forwardNormalRoom(CheckLiveModel model);
/**
* 密码房
*/
void forwardPwdRoom(CheckLiveModel model);
/**
* 收费房
*/
void forwardPayRoom(CheckLiveModel model);
/**
* 请求失败
*
* @param error
*/
void onError(String error);
}

View File

@@ -3,10 +3,13 @@ package com.yunbao.common.http.live;
import android.content.Context;
import android.text.TextUtils;
import com.yunbao.common.Constants;
import com.yunbao.common.R;
import com.yunbao.common.bean.ActiveModel;
import com.yunbao.common.bean.BaseModel;
import com.yunbao.common.bean.CheckLiveModel;
import com.yunbao.common.bean.CustomSidebarInfoModel;
import com.yunbao.common.bean.EnterRoomNewModel;
import com.yunbao.common.bean.LiveInfoModel;
import com.yunbao.common.bean.LiveRoomActivityBanner;
import com.yunbao.common.bean.NobleRankHideUserListModel;
@@ -16,11 +19,11 @@ import com.yunbao.common.bean.StarChallengeStatusModel;
import com.yunbao.common.bean.VipModel;
import com.yunbao.common.http.API;
import com.yunbao.common.http.ResponseModel;
import com.yunbao.common.http.base.CheckLiveCallBack;
import com.yunbao.common.http.base.HttpCallback;
import java.util.List;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;
@@ -291,4 +294,116 @@ public class LiveNetManager {
}
}, throwable -> callback.onError(throwable.getMessage())).isDisposed();
}
/**
* 检查直播间状态
*
* @param liveUid
* @param stream
* @param callBack
*/
public void checkLive(String liveUid, String stream, CheckLiveCallBack callBack) {
API.get().pdLiveApi(mContext)
.checkLive(liveUid, stream)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<List<CheckLiveModel>>>() {
@Override
public void accept(ResponseModel<List<CheckLiveModel>> listResponseModel) throws Exception {
if (listResponseModel.getData().getCode() == 0) {
List<CheckLiveModel> checkLiveModels = listResponseModel.getData().getInfo();
if (checkLiveModels.size() > 0) {
CheckLiveModel liveModel = checkLiveModels.get(0);
switch (liveModel.getType()) {
case Constants.LIVE_TYPE_NORMAL:
if (callBack != null) {
callBack.forwardNormalRoom(liveModel);
}
break;
case Constants.LIVE_TYPE_PWD:
if (callBack != null) {
callBack.forwardPwdRoom(liveModel);
}
break;
case Constants.LIVE_TYPE_PAY:
case Constants.LIVE_TYPE_TIME:
if (callBack != null) {
callBack.forwardPayRoom(liveModel);
}
break;
}
} else {
if (callBack != null) {
callBack.onError(listResponseModel.getData().getMsg());
}
}
} else {
if (callBack != null) {
callBack.onError(listResponseModel.getData().getMsg());
}
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callBack != null) {
callBack.onError(throwable.getMessage());
}
}
}).isDisposed();
}
/**
* 新进入直播间接口
*
* @param stream
* @param liveUid
* @param city
* @param callback
*/
public void enterRoomNew(String stream, String liveUid, String city, HttpCallback<EnterRoomNewModel> callback) {
API.get().pdLiveApi(mContext)
.enterRoomNew("g" + liveUid, stream, liveUid, city)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<EnterRoomNewModel>>() {
@Override
public void accept(ResponseModel<EnterRoomNewModel> enterRoomNewModelResponseModel) throws Exception {
if (callback != null) {
callback.onSuccess(enterRoomNewModelResponseModel.getData().getInfo());
}
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
if (callback != null) {
callback.onError(throwable.getMessage());
}
}
}).isDisposed();
}
/**
* 加入房间推送IM消息
*
* @param stream
* @param liveUid
*/
public void userJoinRoomNew(String stream, String liveUid) {
API.get().pdLiveApi(mContext)
.userJoinRoomNew("g" + liveUid, stream)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Consumer<ResponseModel<String>>() {
@Override
public void accept(ResponseModel<String> stringResponseModel) throws Exception {
}
}, new Consumer<Throwable>() {
@Override
public void accept(Throwable throwable) throws Exception {
}
}).isDisposed();
}
}

View File

@@ -100,7 +100,7 @@ public class RouteUtil {
}
Constants.myUrl = url + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&t=" + System.currentTimeMillis();
ARouter.getInstance().build(PATH_MYWEBVIEWACTIVTITY)
.withString(Constants.URL,url)
.withString(Constants.URL, url)
.navigation();
}
@@ -186,6 +186,7 @@ public class RouteUtil {
*/
public static void forwardLiveAudienceActivity(LiveBean mLiveBean, int mLiveType, int mLiveSDK, int mLiveTypeVal) {
ARouter.getInstance().build(PATH_LIVE_AUDIENCE)
.withBoolean(Constants.NEW_ENTER_ROOM, false)
.withParcelable(Constants.LIVE_BEAN, mLiveBean)
.withInt(Constants.LIVE_TYPE, mLiveType)
.withInt(Constants.LIVE_SDK, mLiveSDK)
@@ -193,6 +194,8 @@ public class RouteUtil {
.navigation();
}
/**
* 举报个人
*/