合并接口第liu次次上传
This commit is contained in:
parent
3bdee09402
commit
7005895d90
105
common/src/main/java/com/yunbao/common/bean/GiftModel.java
Normal file
105
common/src/main/java/com/yunbao/common/bean/GiftModel.java
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class GiftModel extends BaseModel{
|
||||||
|
@SerializedName("id")
|
||||||
|
private String id;
|
||||||
|
@SerializedName("sendtype")
|
||||||
|
private String sendtype;
|
||||||
|
@SerializedName("type")
|
||||||
|
private String type;
|
||||||
|
@SerializedName("mark")
|
||||||
|
private String mark;
|
||||||
|
@SerializedName("giftname")
|
||||||
|
private String giftname;
|
||||||
|
@SerializedName("needcoin")
|
||||||
|
private String needcoin;
|
||||||
|
@SerializedName("gifticon")
|
||||||
|
private String gifticon;
|
||||||
|
@SerializedName("swf")
|
||||||
|
private String swf;
|
||||||
|
@SerializedName("gift_uid")
|
||||||
|
private String giftUid;
|
||||||
|
|
||||||
|
public String getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setId(String id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSendtype() {
|
||||||
|
return sendtype;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setSendtype(String sendtype) {
|
||||||
|
this.sendtype = sendtype;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMark() {
|
||||||
|
return mark;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setMark(String mark) {
|
||||||
|
this.mark = mark;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftname() {
|
||||||
|
return giftname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setGiftname(String giftname) {
|
||||||
|
this.giftname = giftname;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNeedcoin() {
|
||||||
|
return needcoin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setNeedcoin(String needcoin) {
|
||||||
|
this.needcoin = needcoin;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGifticon() {
|
||||||
|
return gifticon;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setGifticon(String gifticon) {
|
||||||
|
this.gifticon = gifticon;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSwf() {
|
||||||
|
return swf;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setSwf(String swf) {
|
||||||
|
this.swf = swf;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGiftUid() {
|
||||||
|
return giftUid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel setGiftUid(String giftUid) {
|
||||||
|
this.giftUid = giftUid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@ -3,12 +3,49 @@ package com.yunbao.common.bean;
|
|||||||
import com.google.gson.annotations.SerializedName;
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
public class NewPeopleTaskModel extends BaseModel {
|
public class NewPeopleTaskModel extends BaseModel {
|
||||||
// @SerializedName("task")
|
|
||||||
// private TaskModel task;
|
@SerializedName("task")
|
||||||
// @SerializedName("gift")
|
private TaskModel task;
|
||||||
// private GiftModel gift;
|
@SerializedName("gift")
|
||||||
// @SerializedName("reward_all")
|
private GiftModel gift;
|
||||||
// private RewardAllModel rewardAll;
|
@SerializedName("reward_all")
|
||||||
// @SerializedName("reward_one")
|
private RewardAllModel rewardAll;
|
||||||
// private RewardAllModel rewardOne;
|
@SerializedName("reward_one")
|
||||||
|
private RewardAllModel rewardOne;
|
||||||
|
|
||||||
|
public TaskModel getTask() {
|
||||||
|
return task;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewPeopleTaskModel setTask(TaskModel task) {
|
||||||
|
this.task = task;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GiftModel getGift() {
|
||||||
|
return gift;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewPeopleTaskModel setGift(GiftModel gift) {
|
||||||
|
this.gift = gift;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RewardAllModel getRewardAll() {
|
||||||
|
return rewardAll;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewPeopleTaskModel setRewardAll(RewardAllModel rewardAll) {
|
||||||
|
this.rewardAll = rewardAll;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RewardAllModel getRewardOne() {
|
||||||
|
return rewardOne;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NewPeopleTaskModel setRewardOne(RewardAllModel rewardOne) {
|
||||||
|
this.rewardOne = rewardOne;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,28 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class RewardAllModel extends BaseModel{
|
||||||
|
@SerializedName("gold")
|
||||||
|
private String gold;
|
||||||
|
@SerializedName("experience")
|
||||||
|
private String experience;
|
||||||
|
|
||||||
|
public String getGold() {
|
||||||
|
return gold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RewardAllModel setGold(String gold) {
|
||||||
|
this.gold = gold;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getExperience() {
|
||||||
|
return experience;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RewardAllModel setExperience(String experience) {
|
||||||
|
this.experience = experience;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
50
common/src/main/java/com/yunbao/common/bean/TaskModel.java
Normal file
50
common/src/main/java/com/yunbao/common/bean/TaskModel.java
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
package com.yunbao.common.bean;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
|
||||||
|
public class TaskModel extends BaseModel{
|
||||||
|
@SerializedName("uid")
|
||||||
|
private String uid;
|
||||||
|
@SerializedName("attent")
|
||||||
|
private String attent;
|
||||||
|
@SerializedName("illumine")
|
||||||
|
private String illumine;
|
||||||
|
@SerializedName("sendgift")
|
||||||
|
private String sendgift;
|
||||||
|
|
||||||
|
public String getUid() {
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TaskModel setUid(String uid) {
|
||||||
|
this.uid = uid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAttent() {
|
||||||
|
return attent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TaskModel setAttent(String attent) {
|
||||||
|
this.attent = attent;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIllumine() {
|
||||||
|
return illumine;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TaskModel setIllumine(String illumine) {
|
||||||
|
this.illumine = illumine;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSendgift() {
|
||||||
|
return sendgift;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TaskModel setSendgift(String sendgift) {
|
||||||
|
this.sendgift = sendgift;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
@ -39,7 +39,6 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.blankj.utilcode.util.GsonUtils;
|
|
||||||
import com.bumptech.glide.Glide;
|
import com.bumptech.glide.Glide;
|
||||||
import com.bumptech.glide.load.DataSource;
|
import com.bumptech.glide.load.DataSource;
|
||||||
import com.bumptech.glide.load.engine.GlideException;
|
import com.bumptech.glide.load.engine.GlideException;
|
||||||
@ -47,7 +46,6 @@ import com.bumptech.glide.load.resource.gif.GifDrawable;
|
|||||||
import com.bumptech.glide.request.RequestListener;
|
import com.bumptech.glide.request.RequestListener;
|
||||||
import com.bumptech.glide.request.RequestOptions;
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
import com.bumptech.glide.request.target.Target;
|
import com.bumptech.glide.request.target.Target;
|
||||||
import com.google.gson.reflect.TypeToken;
|
|
||||||
import com.makeramen.roundedimageview.RoundedImageView;
|
import com.makeramen.roundedimageview.RoundedImageView;
|
||||||
import com.ms.banner.Banner;
|
import com.ms.banner.Banner;
|
||||||
import com.ms.banner.BannerConfig;
|
import com.ms.banner.BannerConfig;
|
||||||
@ -61,6 +59,7 @@ import com.yunbao.common.Constants;
|
|||||||
import com.yunbao.common.activity.AbsActivity;
|
import com.yunbao.common.activity.AbsActivity;
|
||||||
import com.yunbao.common.bean.AiAutomaticSpeechModel;
|
import com.yunbao.common.bean.AiAutomaticSpeechModel;
|
||||||
import com.yunbao.common.bean.BannerBean;
|
import com.yunbao.common.bean.BannerBean;
|
||||||
|
import com.yunbao.common.bean.GiftModel;
|
||||||
import com.yunbao.common.bean.GuardUserModel;
|
import com.yunbao.common.bean.GuardUserModel;
|
||||||
import com.yunbao.common.bean.HourRank;
|
import com.yunbao.common.bean.HourRank;
|
||||||
import com.yunbao.common.bean.IMLoginModel;
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
@ -70,9 +69,12 @@ import com.yunbao.common.bean.LiveGiftBean;
|
|||||||
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
import com.yunbao.common.bean.LiveRoomActivityBanner;
|
||||||
import com.yunbao.common.bean.LiveUserGiftBean;
|
import com.yunbao.common.bean.LiveUserGiftBean;
|
||||||
import com.yunbao.common.bean.MsgModel;
|
import com.yunbao.common.bean.MsgModel;
|
||||||
|
import com.yunbao.common.bean.NewPeopleTaskModel;
|
||||||
import com.yunbao.common.bean.PkRankBean;
|
import com.yunbao.common.bean.PkRankBean;
|
||||||
import com.yunbao.common.bean.RankHourModel;
|
import com.yunbao.common.bean.RankHourModel;
|
||||||
|
import com.yunbao.common.bean.RewardAllModel;
|
||||||
import com.yunbao.common.bean.StarChallengeStatusModel;
|
import com.yunbao.common.bean.StarChallengeStatusModel;
|
||||||
|
import com.yunbao.common.bean.TaskModel;
|
||||||
import com.yunbao.common.bean.UserBean;
|
import com.yunbao.common.bean.UserBean;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
import com.yunbao.common.glide.ImgLoader;
|
||||||
import com.yunbao.common.http.API;
|
import com.yunbao.common.http.API;
|
||||||
@ -87,6 +89,7 @@ import com.yunbao.common.utils.Bus;
|
|||||||
import com.yunbao.common.utils.DeviceUtils;
|
import com.yunbao.common.utils.DeviceUtils;
|
||||||
import com.yunbao.common.utils.DialogUitl;
|
import com.yunbao.common.utils.DialogUitl;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
|
import com.yunbao.common.utils.MicStatusManager;
|
||||||
import com.yunbao.common.utils.RouteUtil;
|
import com.yunbao.common.utils.RouteUtil;
|
||||||
import com.yunbao.common.utils.SVGAViewUtils;
|
import com.yunbao.common.utils.SVGAViewUtils;
|
||||||
import com.yunbao.common.utils.ScreenDimenUtil;
|
import com.yunbao.common.utils.ScreenDimenUtil;
|
||||||
@ -137,7 +140,6 @@ import com.yunbao.live.presenter.LiveEnterRoomAnimPresenter;
|
|||||||
import com.yunbao.live.presenter.LiveGiftAnimPresenter;
|
import com.yunbao.live.presenter.LiveGiftAnimPresenter;
|
||||||
import com.yunbao.live.presenter.LiveLightAnimPresenter;
|
import com.yunbao.live.presenter.LiveLightAnimPresenter;
|
||||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||||
import com.yunbao.common.utils.MicStatusManager;
|
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
@ -320,6 +322,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
//接口整合新加参数
|
//接口整合新加参数
|
||||||
private GuardUserModel guardUserModel;
|
private GuardUserModel guardUserModel;
|
||||||
private ViewFlipper flipper;
|
private ViewFlipper flipper;
|
||||||
|
|
||||||
public LiveRoomViewHolder(boolean isRys, int forActivity, Context context, ViewGroup parentView, GifImageView gifImageView, SVGAImageView svgaImageView, ViewGroup liveGiftPrizePoolContainer, WindowManager windowManager) {
|
public LiveRoomViewHolder(boolean isRys, int forActivity, Context context, ViewGroup parentView, GifImageView gifImageView, SVGAImageView svgaImageView, ViewGroup liveGiftPrizePoolContainer, WindowManager windowManager) {
|
||||||
super(context, parentView);
|
super(context, parentView);
|
||||||
Contexts = context;
|
Contexts = context;
|
||||||
@ -1052,8 +1055,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
findViewById(R.id.open_sidebar).setVisibility(View.GONE);
|
findViewById(R.id.open_sidebar).setVisibility(View.GONE);
|
||||||
findViewById(R.id.btn_follow).setVisibility(View.GONE);
|
findViewById(R.id.btn_follow).setVisibility(View.GONE);
|
||||||
findViewById(R.id.live_rank_pk).setVisibility(View.GONE);
|
findViewById(R.id.live_rank_pk).setVisibility(View.GONE);
|
||||||
} else {
|
|
||||||
configBanner3();
|
|
||||||
}
|
}
|
||||||
reloadIM();
|
reloadIM();
|
||||||
initStarChallengeStatus();
|
initStarChallengeStatus();
|
||||||
@ -3161,59 +3162,53 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
/**
|
/**
|
||||||
* 初始化新人任务
|
* 初始化新人任务
|
||||||
*/
|
*/
|
||||||
private void configBanner3() {
|
public void configBanner3(NewPeopleTaskModel newPeopleTask) {
|
||||||
LiveHttpUtil.getFrontTask(IMLoginManager.get(mContext).getUserInfo().getToken(), "" + IMLoginManager.get(mContext).getUserInfo().getId(), new HttpCallback() {
|
TaskModel taskModel = newPeopleTask.getTask();
|
||||||
@Override
|
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
|
||||||
JSONObject old_obj = JSON.parseObject(info[0]);
|
|
||||||
|
|
||||||
JSONObject obj = old_obj.getJSONObject("task");
|
if (taskModel != null) {
|
||||||
if (obj != null) {
|
GiftModel giftModel = newPeopleTask.getGift();
|
||||||
JSONObject obj1 = old_obj.getJSONObject("gift");
|
RewardAllModel rewardOne = newPeopleTask.getRewardOne();
|
||||||
JSONObject reward_one = old_obj.getJSONObject("reward_one");
|
String gold = rewardOne.getGold();
|
||||||
|
String experience = rewardOne.getExperience();
|
||||||
String gold = reward_one.getString("gold");
|
|
||||||
String experience = reward_one.getString("experience");
|
|
||||||
bean1 = new LiveGiftBean();
|
bean1 = new LiveGiftBean();
|
||||||
bean1.setSwf(obj1.getString("swf"));
|
bean1.setSwf(giftModel.getSwf());
|
||||||
bean1.setChecked(false);
|
bean1.setChecked(false);
|
||||||
bean1.setIcon(obj1.getString("gifticon"));
|
bean1.setIcon(giftModel.getGifticon());
|
||||||
bean1.setId(obj1.getIntValue("id"));
|
bean1.setId(Integer.parseInt(giftModel.getId()));
|
||||||
bean1.setName(obj1.getString("giftname"));
|
bean1.setName(giftModel.getGiftname());
|
||||||
bean1.setTag("1");
|
bean1.setTag("1");
|
||||||
|
|
||||||
if (IMLoginManager.get(mContext).isisNewUserOne() == false) {
|
if (!IMLoginManager.get(mContext).isisNewUserOne()) {
|
||||||
if (obj.getString("sendgift").equals("0")) {
|
if (TextUtils.equals(taskModel.getSendgift(), "0")) {
|
||||||
IMLoginManager.get(mContext).setNewUserGif(true);
|
IMLoginManager.get(mContext).setNewUserGif(true);
|
||||||
EventBus.getDefault().post("svga_new_user_gif");
|
EventBus.getDefault().post("svga_new_user_gif");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
BannerBean banner3Bean = new BannerBean();
|
BannerBean banner3Bean = new BannerBean();
|
||||||
banner3Bean.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png");
|
banner3Bean.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png");
|
||||||
banner3Bean.setLink(obj.getString("sendgift"));
|
banner3Bean.setLink(taskModel.getSendgift());
|
||||||
mBannerList3.add(banner3Bean);
|
mBannerList3.add(banner3Bean);
|
||||||
|
|
||||||
|
|
||||||
BannerBean banner3Bean1 = new BannerBean();
|
BannerBean banner3Bean1 = new BannerBean();
|
||||||
banner3Bean1.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png");
|
banner3Bean1.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png");
|
||||||
banner3Bean1.setLink(obj.getString("attent"));
|
banner3Bean1.setLink(taskModel.getAttent());
|
||||||
mBannerList3.add(banner3Bean1);
|
mBannerList3.add(banner3Bean1);
|
||||||
|
|
||||||
BannerBean banner3Bean2 = new BannerBean();
|
BannerBean banner3Bean2 = new BannerBean();
|
||||||
banner3Bean2.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png");
|
banner3Bean2.setImageUrl("https://downs.yaoulive.com/live_Mission_box.png");
|
||||||
banner3Bean2.setLink(obj.getString("illumine"));
|
banner3Bean2.setLink(taskModel.getIllumine());
|
||||||
mBannerList3.add(banner3Bean2);
|
mBannerList3.add(banner3Bean2);
|
||||||
|
|
||||||
if (obj.getString("sendgift").equals("0") && !IMLoginManager.get(mContext).isisNewUserOne()) {
|
if (TextUtils.equals(taskModel.getSendgift(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) {
|
||||||
showBanner3(bean1);
|
showBanner3(bean1);
|
||||||
} else if (obj.getString("attent").equals("0") && !IMLoginManager.get(mContext).isisNewUserOne()) {
|
} else if (TextUtils.equals(taskModel.getAttent(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) {
|
||||||
showBanner3(bean1);
|
showBanner3(bean1);
|
||||||
} else if (obj.getString("illumine").equals("0") && !IMLoginManager.get(mContext).isisNewUserOne()) {
|
} else if (TextUtils.equals(taskModel.getIllumine(), "0") && !IMLoginManager.get(mContext).isisNewUserOne()) {
|
||||||
showBanner3(bean1);
|
showBanner3(bean1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -299,6 +299,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
isEnterRoom = true;
|
isEnterRoom = true;
|
||||||
//加入房间发送Im消息
|
//加入房间发送Im消息
|
||||||
LiveNetManager.get(mContext).userJoinRoomNew(mLiveBean.getStream(), mLiveBean.getUid());
|
LiveNetManager.get(mContext).userJoinRoomNew(mLiveBean.getStream(), mLiveBean.getUid());
|
||||||
|
//新人任務
|
||||||
|
mLiveRoomViewHolder.configBanner3(data.getNewPeopleTask());
|
||||||
//小时榜
|
//小时榜
|
||||||
mLiveRoomViewHolder.initHourRank(data.getRankHour());
|
mLiveRoomViewHolder.initHourRank(data.getRankHour());
|
||||||
//守护
|
//守护
|
||||||
|
Loading…
Reference in New Issue
Block a user