Commit a0f834c3 authored by mengcuiguang's avatar mengcuiguang

好友邀请逻辑修改

parent 4357506d
......@@ -11,12 +11,16 @@ import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import androidx.multidex.MultiDexApplication;
import com.hjq.toast.ToastUtils;
import com.orhanobut.logger.AndroidLogAdapter;
import com.orhanobut.logger.FormatStrategy;
import com.orhanobut.logger.Logger;
import com.orhanobut.logger.PrettyFormatStrategy;
import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;
import com.wenshu.aiyuebao.common.Constant;
import com.wenshu.aiyuebao.manager.KsManager;
import com.wenshu.aiyuebao.manager.LiebaoManager;
import com.wenshu.aiyuebao.manager.MhManager;
import com.wenshu.aiyuebao.manager.MiitHelper;
import com.wenshu.aiyuebao.manager.RsNewsManager;
import com.wenshu.aiyuebao.manager.TtCsjAdManager;
import com.wenshu.aiyuebao.manager.TzManager;
import com.wenshu.aiyuebao.manager.WnManager;
......@@ -27,12 +31,6 @@ import com.wenshu.aiyuebao.utils.ForegroundOrBackground;
import com.wenshu.aiyuebao.utils.LogUtil;
import com.wenshu.aiyuebao.utils.SystemUtils;
import com.wenshu.library.utils.CommonUtils;
import com.orhanobut.logger.AndroidLogAdapter;
import com.orhanobut.logger.FormatStrategy;
import com.orhanobut.logger.Logger;
import com.orhanobut.logger.PrettyFormatStrategy;
import com.umeng.analytics.MobclickAgent;
import com.umeng.commonsdk.UMConfigure;
import com.ximalaya.ting.android.opensdk.constants.ConstantsOpenSdk;
import com.ximalaya.ting.android.opensdk.datatrasfer.CommonRequest;
import com.ximalaya.ting.android.opensdk.player.service.XmPlayerConfig;
......@@ -136,9 +134,6 @@ public class WenshuApplication extends MultiDexApplication {
// 瑞狮新闻
// RsNewsManager.INSTANCE.init(this);
// 猎豹游戏初始化
// LiebaoManager.getInstance().initCmGameSdk();
// 喜马拉雅
initXmly();
......
......@@ -344,8 +344,17 @@ public class VideoAdingManager {
int wnAdCount = AppConfig.wnVideoAdCount;
int flVideoAdCount = AppConfig.flVideoAdCount;
int tzVideoAdCount = AppConfig.shVideoAdCount;
if (ylhAdCount <= 0 && csjVideoAdCount <= 0 && wnAdCount <= 0 && flVideoAdCount <= 0 && tzVideoAdCount <= 0) {
int ksVideoAdCount = AppConfig.ksVideoAdCount;
int csjFullVedioAdCount = AppConfig.csjFullVedioAdCount;
if (ylhAdCount <= 0 &&
csjVideoAdCount <= 0 &&
wnAdCount <= 0 &&
flVideoAdCount <= 0 &&
tzVideoAdCount <= 0 &&
csjFullVedioAdCount <= 0 &&
ksVideoAdCount <= 0) {
// showToast("今日视频已看完,请明天再来吧");
return true;
}
return false;
......@@ -438,6 +447,13 @@ public class VideoAdingManager {
* @param bean
*/
private void loadAdVideo(String videoAdType, VideoAdingBean bean) {
if (TextUtils.isEmpty(videoAdType)) {
if (videoAdingListener != null) {
videoAdingListener.videoAdingListenerError(bean.getCarrierType());
}
return;
}
try {
if (TextUtils.equals(videoAdType, Constant.YLH_VEDIO_AD)) {
// 优量汇
......
......@@ -76,9 +76,6 @@ public class AppConfig {
* wnVideo 剩余广告播放数
*/
public static int wnVideoAdCount = 0;
/**
* flVideo 剩余广告播放数
*/
/**
* csjFull 剩余广告播放数
*/
......
......@@ -46,7 +46,7 @@ public class TtCsjAdManager {
/*全屏视频*/
public static String TT_AD_FULLVEDIO_ALL = "946076470";// 通用
/*信息流*/
public static String TT_AD_NATIVEEXPRESS_XMLY = "946076473";//喜马拉雅信息流
public static String TT_AD_NATIVEEXPRESS_XMLY = "946087036";//喜马拉雅信息流
public static String TT_AD_NATIVEEXPRESS_AWARD = "946076481";//信息流弹窗
public static String TT_AD_NATIVEEXPRESS_WALK = "946076481";//走路
public static String TT_AD_NATIVEEXPRESS_WATER = "946076481";//喝水
......
package com.wenshu.aiyuebao.mvp.model;
import java.io.Serializable;
import java.util.List;
/**
......@@ -7,7 +8,7 @@ import java.util.List;
* @date 2021/3/22
* @des
*/
public class CashoutChallengeBean {
public class CashoutChallengeBean implements Serializable {
/**
* canRewardCoin : 0
......@@ -43,7 +44,7 @@ public class CashoutChallengeBean {
this.complete = complete;
}
public static class ListDTO {
public class ListDTO implements Serializable{
public Integer getNeedCount() {
return needCount;
}
......
......@@ -3,6 +3,7 @@ package com.wenshu.aiyuebao.mvp.presenters
import com.google.gson.JsonObject
import com.wenshu.aiyuebao.manager.AppHttpManager
import com.wenshu.aiyuebao.mvp.model.BaseResponse
import com.wenshu.aiyuebao.mvp.model.CashoutChallengeBean
import com.wenshu.aiyuebao.mvp.model.FriendHallMsgBean
import com.wenshu.aiyuebao.mvp.views.FriendsView
import com.wenshu.library.net.neterror.BaseSubscriber
......@@ -15,7 +16,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
*/
fun getFriendHallMsg() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.friendHallMsg(), object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() {
.call(
loanService.friendHallMsg(),
object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
......@@ -32,6 +35,7 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
when (baseResponse.status) {
200 -> {
sonCashoutChallengeMsg()
view.getFriendsHallMsgSuc(baseResponse.data)
}
else -> {
......@@ -47,7 +51,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
*/
fun getContributionLeaders() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.contributionLeaders(), object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() {
.call(
loanService.contributionLeaders(),
object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
......@@ -80,7 +86,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
*/
fun getContributionBigLeaders() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.contributionBigLeaders(), object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() {
.call(
loanService.contributionBigLeaders(),
object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
......@@ -112,7 +120,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
*/
fun getFriendsGiveTodayList() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.friendsGiveTodayList, object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() {
.call(
loanService.friendsGiveTodayList,
object : BaseSubscriber<BaseResponse<FriendHallMsgBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
......@@ -144,7 +154,9 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
*/
fun getContributionOutToCash() {
AppHttpManager.getInstance(loanApplication)
.call(loanService.contributionOutToCash(), object : BaseSubscriber<BaseResponse<JsonObject>>() {
.call(
loanService.contributionOutToCash(),
object : BaseSubscriber<BaseResponse<JsonObject>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
......@@ -171,6 +183,43 @@ class FriendsPresenter : BasePresenter<FriendsView>() {
})
}
/**
* 新版分红逻辑
*/
private fun sonCashoutChallengeMsg() {
AppHttpManager.getInstance(loanApplication)
.call(
loanService.sonCashoutChallengeMsg(),
object : BaseSubscriber<BaseResponse<CashoutChallengeBean>>() {
override fun onCompleted() {
if (isLinkView) return
view.hideLoading()
}
override fun onError(e: Throwable) {
if (isLinkView) return
view.hideLoading()
view.getSonCashoutChallengeMsgFail()
}
override fun onNext(baseResponse: BaseResponse<CashoutChallengeBean>) {
if (isLinkView) return
view.hideLoading()
when (baseResponse.status) {
200 -> {
view.getSonCashoutChallengeMsgSuc(baseResponse.data)
}
else -> {
view.getSonCashoutChallengeMsgFail()
view.showToast(baseResponse.message)
}
}
}
})
}
/**
* 设置邀请成功
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment