公会功能,firebase和adjust埋点,充值页面修改
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
package com.yizhuan.erban.application;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by wushaocheng on 2022/11/10.
|
||||||
|
*/
|
||||||
|
public interface IReportConstants {
|
||||||
|
|
||||||
|
String CHANNEL_NAME = "ChannelName";
|
||||||
|
String ADJUST_REGISTER = "yly8k0";
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,41 @@
|
|||||||
|
package com.yizhuan.erban.application;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by logwee on 2018/10/10.
|
||||||
|
*/
|
||||||
|
public interface IReportService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置FirebaseAnalytics公共属性
|
||||||
|
*
|
||||||
|
* @param bundle 公共属性
|
||||||
|
*/
|
||||||
|
void setFirebaseAnalyticsDefaultEventParameters(Bundle bundle);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 埋点,不需要字事件
|
||||||
|
*
|
||||||
|
* @param eventId 事件名称
|
||||||
|
*/
|
||||||
|
void reportEvent(String eventId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 埋点
|
||||||
|
*
|
||||||
|
* @param eventId 事件名称
|
||||||
|
* @param map 事件参数和值
|
||||||
|
*/
|
||||||
|
void reportEvent(String eventId, Map<String, Object> map);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adjust埋点
|
||||||
|
*
|
||||||
|
* @param eventId 事件名称
|
||||||
|
*/
|
||||||
|
void reportAdjustEvent(String eventId);
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,114 @@
|
|||||||
|
package com.yizhuan.erban.application;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import com.adjust.sdk.Adjust;
|
||||||
|
import com.adjust.sdk.AdjustConfig;
|
||||||
|
import com.adjust.sdk.AdjustEvent;
|
||||||
|
import com.adjust.sdk.LogLevel;
|
||||||
|
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||||
|
import com.google.gson.Gson;
|
||||||
|
import com.orhanobut.logger.Logger;
|
||||||
|
import com.yizhuan.xchat_android_constants.XChatConstants;
|
||||||
|
import com.yizhuan.xchat_android_library.utils.AppMetaDataUtil;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统一埋点事件
|
||||||
|
* create by lvzebiao @2019/8/14
|
||||||
|
*/
|
||||||
|
public class ReportManager implements IReportService{
|
||||||
|
|
||||||
|
private static final String TAG = "ReportManager";
|
||||||
|
|
||||||
|
private ReportManager() {}
|
||||||
|
|
||||||
|
private static final class Helper {
|
||||||
|
private static final ReportManager INSTANCE = new ReportManager();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ReportManager get() {
|
||||||
|
return Helper.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void init() {
|
||||||
|
initFirebase();
|
||||||
|
initAdjust();
|
||||||
|
}
|
||||||
|
|
||||||
|
// FirebaseAnalytics注册公共属性
|
||||||
|
private void initFirebase() {
|
||||||
|
Bundle params = new Bundle();
|
||||||
|
params.putString(IReportConstants.CHANNEL_NAME, AppMetaDataUtil.getChannelID());
|
||||||
|
setFirebaseAnalyticsDefaultEventParameters(params);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Adjust初始化
|
||||||
|
private void initAdjust() {
|
||||||
|
String appToken = XChatConstants.ADJUST_APP_TOKEN;
|
||||||
|
String environment = AdjustConfig.ENVIRONMENT_PRODUCTION;
|
||||||
|
AdjustConfig config = new AdjustConfig(XChatApplication.instance(), appToken, environment);
|
||||||
|
config.setLogLevel(LogLevel.VERBOSE);
|
||||||
|
Adjust.onCreate(config);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置FirebaseAnalytics公共属性
|
||||||
|
*
|
||||||
|
* @param bundle 公共属性
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void setFirebaseAnalyticsDefaultEventParameters(Bundle bundle) {
|
||||||
|
if (bundle != null) {
|
||||||
|
FirebaseAnalytics.getInstance(XChatApplication.instance()).setDefaultEventParameters(bundle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 埋点,不需要上报网络质量和事件耗时
|
||||||
|
*
|
||||||
|
* @param eventId 事件名称
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void reportEvent(String eventId) {
|
||||||
|
reportEvent(eventId, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 埋点
|
||||||
|
*
|
||||||
|
* @param eventId 事件名称
|
||||||
|
* @param map 事件参数和值
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void reportEvent(String eventId, Map<String, Object> map) {
|
||||||
|
try {
|
||||||
|
Logger.i(TAG, "reportEvent: eventId=%s, map=%s", eventId, new Gson().toJson(map));
|
||||||
|
Bundle bundle = null;
|
||||||
|
if (map != null) {
|
||||||
|
bundle = new Bundle();
|
||||||
|
for (Map.Entry<String, Object> item : map.entrySet()) {
|
||||||
|
String key = item.getKey();
|
||||||
|
Object value = item.getValue();
|
||||||
|
if (!TextUtils.isEmpty(key) && value != null) {
|
||||||
|
bundle.putString(key, String.valueOf(value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//所有事件都上报到Google Analytics
|
||||||
|
FirebaseAnalytics.getInstance(XChatApplication.instance()).logEvent(eventId, bundle);
|
||||||
|
} catch (Exception e) {
|
||||||
|
Logger.e(TAG, "reportEvent", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void reportAdjustEvent(String eventId) {
|
||||||
|
AdjustEvent adjustEvent = new AdjustEvent(eventId);
|
||||||
|
Adjust.trackEvent(adjustEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@@ -17,12 +17,8 @@ import android.util.Log;
|
|||||||
|
|
||||||
import androidx.multidex.MultiDex;
|
import androidx.multidex.MultiDex;
|
||||||
|
|
||||||
import com.adjust.sdk.Adjust;
|
|
||||||
import com.adjust.sdk.AdjustConfig;
|
|
||||||
import com.adjust.sdk.LogLevel;
|
|
||||||
import com.bumptech.glide.request.target.ViewTarget;
|
import com.bumptech.glide.request.target.ViewTarget;
|
||||||
import com.coorchice.library.utils.LogUtils;
|
import com.coorchice.library.utils.LogUtils;
|
||||||
import com.google.firebase.analytics.FirebaseAnalytics;
|
|
||||||
import com.hjq.toast.ToastUtils;
|
import com.hjq.toast.ToastUtils;
|
||||||
import com.mob.MobSDK;
|
import com.mob.MobSDK;
|
||||||
import com.mob.moblink.MobLink;
|
import com.mob.moblink.MobLink;
|
||||||
@@ -278,13 +274,6 @@ public class XChatApplication extends Application {
|
|||||||
UMConfigure.setEncryptEnabled(true);
|
UMConfigure.setEncryptEnabled(true);
|
||||||
// 集成测试
|
// 集成测试
|
||||||
UMConfigure.setLogEnabled(BuildConfig.DEBUG);
|
UMConfigure.setLogEnabled(BuildConfig.DEBUG);
|
||||||
|
|
||||||
//Adjust
|
|
||||||
String appToken = XChatConstants.ADJUST_APP_TOKEN;
|
|
||||||
String environment = AdjustConfig.ENVIRONMENT_SANDBOX;
|
|
||||||
AdjustConfig config = new AdjustConfig(instance, appToken, environment);
|
|
||||||
config.setLogLevel(LogLevel.VERBOSE);
|
|
||||||
Adjust.onCreate(config);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LogUtils.d("init time = " + (System.currentTimeMillis() - startTime) + "ms");
|
LogUtils.d("init time = " + (System.currentTimeMillis() - startTime) + "ms");
|
||||||
@@ -498,6 +487,8 @@ public class XChatApplication extends Application {
|
|||||||
|
|
||||||
InitialModel.get().init(true).subscribe();
|
InitialModel.get().init(true).subscribe();
|
||||||
|
|
||||||
|
//上报平台初始化
|
||||||
|
ReportManager.get().init();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void initNimUIKit() {
|
private static void initNimUIKit() {
|
||||||
@@ -537,7 +528,6 @@ public class XChatApplication extends Application {
|
|||||||
initOtherSDK();
|
initOtherSDK();
|
||||||
}
|
}
|
||||||
initContext(this);
|
initContext(this);
|
||||||
FirebaseAnalytics.getInstance(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1,14 +1,12 @@
|
|||||||
package com.yizhuan.erban.association.adapter;
|
package com.yizhuan.erban.association.adapter;
|
||||||
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.chad.library.adapter.base.BaseQuickAdapter;
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
import com.chad.library.adapter.base.BaseViewHolder;
|
import com.chad.library.adapter.base.BaseViewHolder;
|
||||||
import com.yizhuan.erban.R;
|
import com.yizhuan.erban.R;
|
||||||
import com.yizhuan.erban.ui.utils.ImageLoadUtilsV2;
|
import com.yizhuan.erban.ui.utils.ImageLoadUtilsV2;
|
||||||
import com.yizhuan.xchat_android_core.association.ClanListInfo;
|
|
||||||
import com.yizhuan.xchat_android_core.association.HallListInfo;
|
import com.yizhuan.xchat_android_core.association.HallListInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -44,15 +42,16 @@ public class AssociationRoomAdapter extends BaseQuickAdapter<HallListInfo, BaseV
|
|||||||
|
|
||||||
ImageLoadUtilsV2.loadAvatar(helper.getView(R.id.iv_guild_icon), item.getOwnerAvatar());
|
ImageLoadUtilsV2.loadAvatar(helper.getView(R.id.iv_guild_icon), item.getOwnerAvatar());
|
||||||
helper.setText(R.id.tv_name, item.getHallName());
|
helper.setText(R.id.tv_name, item.getHallName());
|
||||||
|
helper.setText(R.id.tv_room_id, mContext.getString(R.string.association_room_id, String.valueOf(item.getOwnerErbanNo())));
|
||||||
|
|
||||||
TextView tvApply = helper.getView(R.id.tvApply);
|
TextView tvApply = helper.getView(R.id.tvApply);
|
||||||
if(item.getApplyBtnStatus() == 0){
|
if (item.getApplyBtnStatus() == 0) {
|
||||||
tvApply.setVisibility(View.GONE);
|
tvApply.setVisibility(View.GONE);
|
||||||
}else if(item.getApplyBtnStatus() == 1){
|
} else if (item.getApplyBtnStatus() == 1) {
|
||||||
tvApply.setVisibility(View.VISIBLE);
|
tvApply.setVisibility(View.VISIBLE);
|
||||||
tvApply.setSelected(true);
|
tvApply.setSelected(true);
|
||||||
tvApply.setText(mContext.getString(R.string.apply_join));
|
tvApply.setText(mContext.getString(R.string.apply_join));
|
||||||
}else if(item.getApplyBtnStatus() == 2){
|
} else if (item.getApplyBtnStatus() == 2) {
|
||||||
tvApply.setVisibility(View.VISIBLE);
|
tvApply.setVisibility(View.VISIBLE);
|
||||||
tvApply.setSelected(false);
|
tvApply.setSelected(false);
|
||||||
tvApply.setText(mContext.getString(R.string.have_apply));
|
tvApply.setText(mContext.getString(R.string.have_apply));
|
||||||
|
@@ -50,6 +50,10 @@ class AssociationFragment : BaseViewBindingFragment<FragmentAssociationBinding>(
|
|||||||
associationAdapter.setOnItemChildClickListener { adapter, view, position ->
|
associationAdapter.setOnItemChildClickListener { adapter, view, position ->
|
||||||
val bean = associationAdapter.getItem(position)
|
val bean = associationAdapter.getItem(position)
|
||||||
bean?.let {
|
bean?.let {
|
||||||
|
if(it.applyBtnStatus == 2){
|
||||||
|
toast(getString(R.string.can_not_apply_3_day))
|
||||||
|
return@let
|
||||||
|
}
|
||||||
dialogManager.showProgressDialog(context)
|
dialogManager.showProgressDialog(context)
|
||||||
HallModel.get().applyJoinClan(it.clanId.toLong())
|
HallModel.get().applyJoinClan(it.clanId.toLong())
|
||||||
.compose(RxHelper.bindFragment(this))
|
.compose(RxHelper.bindFragment(this))
|
||||||
|
@@ -1,10 +1,14 @@
|
|||||||
package com.yizhuan.erban.association.fragment
|
package com.yizhuan.erban.association.fragment
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.text.Editable
|
||||||
import android.text.TextUtils
|
import android.text.TextUtils
|
||||||
|
import android.text.TextWatcher
|
||||||
import android.view.KeyEvent
|
import android.view.KeyEvent
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
|
import android.view.inputmethod.InputMethodManager
|
||||||
import android.widget.TextView
|
import android.widget.TextView
|
||||||
import androidx.fragment.app.viewModels
|
import androidx.fragment.app.viewModels
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
@@ -38,29 +42,53 @@ class AssociationRoomFragment : BaseViewBindingFragment<FragmentAssociationRoomB
|
|||||||
private lateinit var associationRoomAdapter: AssociationRoomAdapter
|
private lateinit var associationRoomAdapter: AssociationRoomAdapter
|
||||||
private lateinit var rvDelegate: RVDelegate<HallListInfo>
|
private lateinit var rvDelegate: RVDelegate<HallListInfo>
|
||||||
|
|
||||||
|
private var list : MutableList<HallListInfo> = ArrayList()
|
||||||
|
|
||||||
private val associationViewModel: AssociationViewModel by viewModels()
|
private val associationViewModel: AssociationViewModel by viewModels()
|
||||||
|
|
||||||
override fun init() {
|
override fun init() {
|
||||||
binding.mTvSearch.setOnClickListener {
|
binding.mTvSearch.setOnClickListener {
|
||||||
if (!TextUtils.isEmpty(binding.etSearch.text.toString())) {
|
if (!TextUtils.isEmpty(binding.etSearch.text.toString())) {
|
||||||
val hallList = rvDelegate.adapter.data
|
val hallList = list
|
||||||
val list = hallList.filter { it.hallName.contains(binding.mTvSearch.text.toString()) }
|
val list = hallList.filter { it.hallName.contains(binding.etSearch.text.toString()) || it.hallId.toString().contains(binding.etSearch.text.toString()) }
|
||||||
|
if(list.isEmpty()){
|
||||||
|
rvDelegate.adapter.emptyView.findViewById<TextView>(R.id.tv_hint).text = getString(R.string.no_search_room)
|
||||||
|
}
|
||||||
rvDelegate.setNewData(list)
|
rvDelegate.setNewData(list)
|
||||||
}else{
|
}else{
|
||||||
toast(getString(R.string.search_input_room_or_id))
|
rvDelegate.adapter.emptyView.findViewById<TextView>(R.id.tv_hint).text = getString(R.string.association_hall_list_empty)
|
||||||
|
rvDelegate.setNewData(list)
|
||||||
}
|
}
|
||||||
|
hideSoftInput()
|
||||||
}
|
}
|
||||||
|
binding.etSearch.addTextChangedListener(object : TextWatcher {
|
||||||
|
override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
|
||||||
|
override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun afterTextChanged(s: Editable) {
|
||||||
|
if (s.toString() == "") {
|
||||||
|
rvDelegate.adapter.emptyView.findViewById<TextView>(R.id.tv_hint).text = getString(R.string.association_hall_list_empty)
|
||||||
|
rvDelegate.setNewData(list)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
binding.etSearch.setOnEditorActionListener(TextView.OnEditorActionListener { v, actionId, event -> //以下方法防止两次发送请求
|
binding.etSearch.setOnEditorActionListener(TextView.OnEditorActionListener { v, actionId, event -> //以下方法防止两次发送请求
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH && event != null || event != null && event.keyCode == KeyEvent.KEYCODE_ENTER) {
|
if (actionId == EditorInfo.IME_ACTION_SEARCH && event != null || event != null && event.keyCode == KeyEvent.KEYCODE_ENTER) {
|
||||||
if (event.action == KeyEvent.ACTION_UP) { //发送请求
|
if (event.action == KeyEvent.ACTION_UP) { //发送请求
|
||||||
val newStr: String = binding.etSearch.text.toString().trim { it <= ' ' }
|
val newStr: String = binding.etSearch.text.toString().trim { it <= ' ' }
|
||||||
if (!TextUtils.isEmpty(newStr)) {
|
if (!TextUtils.isEmpty(newStr)) {
|
||||||
val hallList = rvDelegate.adapter.data
|
val hallList = list
|
||||||
val list = hallList.filter { it.hallName.contains(newStr) }
|
val list = hallList.filter { it.hallName.contains(newStr) || it.hallId.toString().contains(newStr)}
|
||||||
|
if(list.isEmpty()){
|
||||||
|
rvDelegate.adapter.emptyView.findViewById<TextView>(R.id.tv_hint).text = getString(R.string.no_search_room)
|
||||||
|
}
|
||||||
rvDelegate.setNewData(list)
|
rvDelegate.setNewData(list)
|
||||||
} else {
|
} else {
|
||||||
toast(getString(R.string.search_input_room_or_id))
|
rvDelegate.adapter.emptyView.findViewById<TextView>(R.id.tv_hint).text = getString(R.string.association_hall_list_empty)
|
||||||
|
rvDelegate.setNewData(list)
|
||||||
}
|
}
|
||||||
|
hideSoftInput()
|
||||||
return@OnEditorActionListener true //自己消费
|
return@OnEditorActionListener true //自己消费
|
||||||
}
|
}
|
||||||
return@OnEditorActionListener true
|
return@OnEditorActionListener true
|
||||||
@@ -80,6 +108,10 @@ class AssociationRoomFragment : BaseViewBindingFragment<FragmentAssociationRoomB
|
|||||||
associationRoomAdapter.setOnItemChildClickListener { adapter, view, position ->
|
associationRoomAdapter.setOnItemChildClickListener { adapter, view, position ->
|
||||||
val bean = associationRoomAdapter.getItem(position)
|
val bean = associationRoomAdapter.getItem(position)
|
||||||
bean?.let {
|
bean?.let {
|
||||||
|
if(it.applyBtnStatus == 2){
|
||||||
|
toast(getString(R.string.can_not_apply_7_day))
|
||||||
|
return@let
|
||||||
|
}
|
||||||
dialogManager.showProgressDialog(context)
|
dialogManager.showProgressDialog(context)
|
||||||
HallModel.get().applyJoinHall(it.hallId)
|
HallModel.get().applyJoinHall(it.hallId)
|
||||||
.compose(RxHelper.bindFragment(this))
|
.compose(RxHelper.bindFragment(this))
|
||||||
@@ -111,14 +143,21 @@ class AssociationRoomFragment : BaseViewBindingFragment<FragmentAssociationRoomB
|
|||||||
.build()
|
.build()
|
||||||
|
|
||||||
associationViewModel.hallListLiveData.observe(this) {
|
associationViewModel.hallListLiveData.observe(this) {
|
||||||
|
list = it as MutableList<HallListInfo>
|
||||||
rvDelegate.setNewData(it)
|
rvDelegate.setNewData(it)
|
||||||
}
|
}
|
||||||
|
|
||||||
associationViewModel.getHallList()
|
associationViewModel.getHallList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun hideSoftInput() {
|
||||||
|
val imm = context?.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||||
|
imm.hideSoftInputFromWindow(binding.etSearch.windowToken, InputMethodManager.HIDE_NOT_ALWAYS)
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
|
list.clear()
|
||||||
dialogManager.dismissDialog()
|
dialogManager.dismissDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -16,10 +16,12 @@ import android.widget.TextView;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
|
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||||
import com.netease.nim.uikit.StatusBarUtil;
|
import com.netease.nim.uikit.StatusBarUtil;
|
||||||
import com.tongdaxing.erban.upgrade.AppUpgradeHelper;
|
import com.tongdaxing.erban.upgrade.AppUpgradeHelper;
|
||||||
import com.trello.rxlifecycle3.android.ActivityEvent;
|
import com.trello.rxlifecycle3.android.ActivityEvent;
|
||||||
import com.yizhuan.erban.R;
|
import com.yizhuan.erban.R;
|
||||||
|
import com.yizhuan.erban.application.ReportManager;
|
||||||
import com.yizhuan.erban.base.BaseActivity;
|
import com.yizhuan.erban.base.BaseActivity;
|
||||||
import com.yizhuan.erban.common.widget.OriginalDrawStatusClickSpan;
|
import com.yizhuan.erban.common.widget.OriginalDrawStatusClickSpan;
|
||||||
import com.yizhuan.erban.ui.login.helper.LogoutHelper;
|
import com.yizhuan.erban.ui.login.helper.LogoutHelper;
|
||||||
@@ -35,6 +37,8 @@ import org.greenrobot.eventbus.EventBus;
|
|||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
import io.reactivex.SingleObserver;
|
import io.reactivex.SingleObserver;
|
||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
|
|
||||||
@@ -144,6 +148,9 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(String s) {
|
public void onSuccess(String s) {
|
||||||
|
HashMap<String, Object> map = new HashMap<>(2);
|
||||||
|
map.put(FirebaseAnalytics.Param.METHOD, getString(R.string.login_facebook));
|
||||||
|
ReportManager.get().reportEvent(FirebaseAnalytics.Event.LOGIN, map);
|
||||||
getDialogManager().dismissDialog();
|
getDialogManager().dismissDialog();
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
@@ -167,6 +174,9 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(String s) {
|
public void onSuccess(String s) {
|
||||||
|
HashMap<String, Object> map = new HashMap<>(2);
|
||||||
|
map.put(FirebaseAnalytics.Param.METHOD, getString(R.string.login_line));
|
||||||
|
ReportManager.get().reportEvent(FirebaseAnalytics.Event.LOGIN, map);
|
||||||
getDialogManager().dismissDialog();
|
getDialogManager().dismissDialog();
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
@@ -191,6 +201,9 @@ public class LoginActivity extends BaseActivity implements View.OnClickListener
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(String s) {
|
public void onSuccess(String s) {
|
||||||
|
HashMap<String, Object> map = new HashMap<>(2);
|
||||||
|
map.put(FirebaseAnalytics.Param.METHOD, getString(R.string.login_google));
|
||||||
|
ReportManager.get().reportEvent(FirebaseAnalytics.Event.LOGIN, map);
|
||||||
getDialogManager().dismissDialog();
|
getDialogManager().dismissDialog();
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
@@ -9,8 +9,10 @@ import android.text.TextWatcher;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
|
||||||
|
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||||
import com.netease.nim.uikit.StatusBarUtil;
|
import com.netease.nim.uikit.StatusBarUtil;
|
||||||
import com.yizhuan.erban.R;
|
import com.yizhuan.erban.R;
|
||||||
|
import com.yizhuan.erban.application.ReportManager;
|
||||||
import com.yizhuan.erban.base.BaseActivity;
|
import com.yizhuan.erban.base.BaseActivity;
|
||||||
import com.yizhuan.erban.ui.login.helper.LogoutHelper;
|
import com.yizhuan.erban.ui.login.helper.LogoutHelper;
|
||||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||||
@@ -21,6 +23,8 @@ import org.greenrobot.eventbus.EventBus;
|
|||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
import io.reactivex.SingleObserver;
|
import io.reactivex.SingleObserver;
|
||||||
import io.reactivex.disposables.Disposable;
|
import io.reactivex.disposables.Disposable;
|
||||||
|
|
||||||
@@ -105,6 +109,9 @@ public class LoginPasswordActivity extends BaseActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(String s) {
|
public void onSuccess(String s) {
|
||||||
|
HashMap<String, Object> map = new HashMap<>(2);
|
||||||
|
map.put(FirebaseAnalytics.Param.METHOD, getString(R.string.login_account));
|
||||||
|
ReportManager.get().reportEvent(FirebaseAnalytics.Event.LOGIN, map);
|
||||||
getDialogManager().dismissDialog();
|
getDialogManager().dismissDialog();
|
||||||
setResult(RESULT_OK);
|
setResult(RESULT_OK);
|
||||||
finish();
|
finish();
|
||||||
|
@@ -11,10 +11,13 @@ import android.widget.RadioButton;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
import com.google.android.material.textfield.TextInputEditText;
|
import com.google.android.material.textfield.TextInputEditText;
|
||||||
|
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||||
import com.sleepbot.datetimepicker.time.RadialPickerLayout;
|
import com.sleepbot.datetimepicker.time.RadialPickerLayout;
|
||||||
import com.sleepbot.datetimepicker.time.TimePickerDialog;
|
import com.sleepbot.datetimepicker.time.TimePickerDialog;
|
||||||
import com.trello.rxlifecycle3.android.FragmentEvent;
|
import com.trello.rxlifecycle3.android.FragmentEvent;
|
||||||
import com.yizhuan.erban.R;
|
import com.yizhuan.erban.R;
|
||||||
|
import com.yizhuan.erban.application.IReportConstants;
|
||||||
|
import com.yizhuan.erban.application.ReportManager;
|
||||||
import com.yizhuan.erban.base.BaseFragment;
|
import com.yizhuan.erban.base.BaseFragment;
|
||||||
import com.yizhuan.erban.common.widget.dialog.DialogManager;
|
import com.yizhuan.erban.common.widget.dialog.DialogManager;
|
||||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||||
@@ -208,6 +211,7 @@ public class AddUserInfoFragment extends BaseFragment
|
|||||||
uid = linkedInfo.getUid();
|
uid = linkedInfo.getUid();
|
||||||
}
|
}
|
||||||
INVITE_USER_CODE = shareCode;
|
INVITE_USER_CODE = shareCode;
|
||||||
|
String finalChannel = channel;
|
||||||
UserModel.get().requestCompleteUserInfo(userInfo, channel, uid, roomUid, shareCode)
|
UserModel.get().requestCompleteUserInfo(userInfo, channel, uid, roomUid, shareCode)
|
||||||
.compose(bindUntilEvent(FragmentEvent.DESTROY))
|
.compose(bindUntilEvent(FragmentEvent.DESTROY))
|
||||||
.subscribe(new SingleObserver<UserInfo>() {
|
.subscribe(new SingleObserver<UserInfo>() {
|
||||||
@@ -220,6 +224,10 @@ public class AddUserInfoFragment extends BaseFragment
|
|||||||
public void onSuccess(UserInfo userInfo) {
|
public void onSuccess(UserInfo userInfo) {
|
||||||
getDialogManager().dismissDialog();
|
getDialogManager().dismissDialog();
|
||||||
StatisticManager.Instance().onEvent(StatisticsProtocol.EVENT_COMPLETE, ResUtil.getString(R.string.login_fragment_adduserinfofragment_09));
|
StatisticManager.Instance().onEvent(StatisticsProtocol.EVENT_COMPLETE, ResUtil.getString(R.string.login_fragment_adduserinfofragment_09));
|
||||||
|
ReportManager.get().reportAdjustEvent(IReportConstants.ADJUST_REGISTER);
|
||||||
|
HashMap<String, Object> map = new HashMap<>(2);
|
||||||
|
map.put(FirebaseAnalytics.Param.METHOD, finalChannel);
|
||||||
|
ReportManager.get().reportEvent(FirebaseAnalytics.Event.SIGN_UP, map);
|
||||||
AuthModel.get().setThirdUserInfo(null);
|
AuthModel.get().setThirdUserInfo(null);
|
||||||
getActivity().finish();
|
getActivity().finish();
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,7 @@
|
|||||||
package com.yizhuan.erban.ui.widget;
|
package com.yizhuan.erban.ui.widget;
|
||||||
|
|
||||||
|
import static com.yizhuan.xchat_android_library.utils.ResUtil.getString;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
@@ -9,10 +11,14 @@ import android.view.WindowManager;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||||
|
import com.google.firebase.analytics.FirebaseAnalytics;
|
||||||
import com.yizhuan.erban.R;
|
import com.yizhuan.erban.R;
|
||||||
|
import com.yizhuan.erban.application.ReportManager;
|
||||||
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||||
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
import com.yizhuan.xchat_android_library.utils.SingleToastUtil;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
import cn.sharesdk.facebook.Facebook;
|
import cn.sharesdk.facebook.Facebook;
|
||||||
import cn.sharesdk.framework.Platform;
|
import cn.sharesdk.framework.Platform;
|
||||||
import cn.sharesdk.framework.ShareSDK;
|
import cn.sharesdk.framework.ShareSDK;
|
||||||
@@ -91,27 +97,39 @@ public class ShareDialog extends BottomSheetDialog implements View.OnClickListen
|
|||||||
case R.id.tv_erban:
|
case R.id.tv_erban:
|
||||||
if (onShareDialogItemClick != null) {
|
if (onShareDialogItemClick != null) {
|
||||||
if (type != TYPE_SHARE_H5) {
|
if (type != TYPE_SHARE_H5) {
|
||||||
|
HashMap<String, Object> map = new HashMap<>(2);
|
||||||
|
map.put(FirebaseAnalytics.Param.CONTENT_TYPE, getString(R.string.text_share_erban_friends));
|
||||||
|
ReportManager.get().reportEvent(FirebaseAnalytics.Event.SHARE, map);
|
||||||
onShareDialogItemClick.onInAppSharingItemClick();
|
onShareDialogItemClick.onInAppSharingItemClick();
|
||||||
} else {
|
} else {
|
||||||
SingleToastUtil.showToastShort(ResUtil.getString(R.string.ui_widget_sharedialog_02));
|
SingleToastUtil.showToastShort(getString(R.string.ui_widget_sharedialog_02));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dismiss();
|
dismiss();
|
||||||
break;
|
break;
|
||||||
case R.id.tv_line:
|
case R.id.tv_line:
|
||||||
if (onShareDialogItemClick != null) {
|
if (onShareDialogItemClick != null) {
|
||||||
|
HashMap<String, Object> map = new HashMap<>(2);
|
||||||
|
map.put(FirebaseAnalytics.Param.CONTENT_TYPE, getString(R.string.share_line));
|
||||||
|
ReportManager.get().reportEvent(FirebaseAnalytics.Event.SHARE, map);
|
||||||
onShareDialogItemClick.onSharePlatformClick(ShareSDK.getPlatform(Line.NAME));
|
onShareDialogItemClick.onSharePlatformClick(ShareSDK.getPlatform(Line.NAME));
|
||||||
}
|
}
|
||||||
dismiss();
|
dismiss();
|
||||||
break;
|
break;
|
||||||
case R.id.tv_facebook:
|
case R.id.tv_facebook:
|
||||||
if (onShareDialogItemClick != null) {
|
if (onShareDialogItemClick != null) {
|
||||||
|
HashMap<String, Object> map = new HashMap<>(2);
|
||||||
|
map.put(FirebaseAnalytics.Param.CONTENT_TYPE, getString(R.string.share_facebook));
|
||||||
|
ReportManager.get().reportEvent(FirebaseAnalytics.Event.SHARE, map);
|
||||||
onShareDialogItemClick.onSharePlatformClick(ShareSDK.getPlatform(Facebook.NAME));
|
onShareDialogItemClick.onSharePlatformClick(ShareSDK.getPlatform(Facebook.NAME));
|
||||||
}
|
}
|
||||||
dismiss();
|
dismiss();
|
||||||
break;
|
break;
|
||||||
case R.id.tv_share_link:
|
case R.id.tv_share_link:
|
||||||
if (onShareDialogItemClick != null) {
|
if (onShareDialogItemClick != null) {
|
||||||
|
HashMap<String, Object> map = new HashMap<>(2);
|
||||||
|
map.put(FirebaseAnalytics.Param.CONTENT_TYPE, getString(R.string.share_link));
|
||||||
|
ReportManager.get().reportEvent(FirebaseAnalytics.Event.SHARE, map);
|
||||||
onShareDialogItemClick.onSharePlatformClick(ShareSDK.getPlatform(GooglePlus.NAME));
|
onShareDialogItemClick.onSharePlatformClick(ShareSDK.getPlatform(GooglePlus.NAME));
|
||||||
}
|
}
|
||||||
dismiss();
|
dismiss();
|
||||||
|
@@ -100,9 +100,9 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="56dp"
|
android:layout_height="56dp"
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginTop="50dp"
|
android:layout_marginTop="@dimen/dp_25"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
android:layout_marginBottom="@dimen/dp_40"
|
android:layout_marginBottom="@dimen/dp_18"
|
||||||
android:background="@drawable/bg_common_confirm_normal"
|
android:background="@drawable/bg_common_confirm_normal"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/charge_confirm_charge"
|
android:text="@string/charge_confirm_charge"
|
||||||
|
@@ -4,11 +4,10 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/ll_bg"
|
android:id="@+id/ll_bg"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="65dp"
|
android:layout_height="56dp"
|
||||||
android:layout_marginStart="@dimen/dp_16"
|
android:layout_marginStart="@dimen/dp_16"
|
||||||
android:layout_marginTop="@dimen/dp_10"
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
android:layout_marginEnd="@dimen/dp_16"
|
android:layout_marginEnd="@dimen/dp_16"
|
||||||
android:layout_marginBottom="@dimen/dp_10"
|
|
||||||
android:background="@drawable/bg_google_charge_bg_selector"
|
android:background="@drawable/bg_google_charge_bg_selector"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
<string name="login_facebook">Facebook登錄</string>
|
<string name="login_facebook">Facebook登錄</string>
|
||||||
<string name="login_line">Line登錄</string>
|
<string name="login_line">Line登錄</string>
|
||||||
<string name="login_google">Google登錄</string>
|
<string name="login_google">Google登錄</string>
|
||||||
|
<string name="login_account">賬號登錄</string>
|
||||||
<string name="login_select_other_login_type">選擇其他方式登錄</string>
|
<string name="login_select_other_login_type">選擇其他方式登錄</string>
|
||||||
<string name="login_agree_with_the_protocol">同意隱私政策和用戶協議後,才可以註冊登錄哦~</string>
|
<string name="login_agree_with_the_protocol">同意隱私政策和用戶協議後,才可以註冊登錄哦~</string>
|
||||||
<string name="charge_agree_with_the_protocol">請勾選同意《用戶充值協議》</string>
|
<string name="charge_agree_with_the_protocol">請勾選同意《用戶充值協議》</string>
|
||||||
@@ -4950,5 +4951,13 @@
|
|||||||
<string name="clan_week">周</string>
|
<string name="clan_week">周</string>
|
||||||
<string name="clan_month">月</string>
|
<string name="clan_month">月</string>
|
||||||
<string name="join_clan">加入公會</string>
|
<string name="join_clan">加入公會</string>
|
||||||
|
<string name="association_room_id">房間ID:%s</string>
|
||||||
|
<string name="can_not_apply_3_day">3天内不可重複發送申請</string>
|
||||||
|
<string name="can_not_apply_7_day">7天内不可重複發送申請</string>
|
||||||
|
<string name="no_search_room">沒有搜到相關房間</string>
|
||||||
|
<string name="clan_income">廳收入</string>
|
||||||
|
<string name="live_income">主播收入</string>
|
||||||
|
<string name="diamond_income">鉆石收入</string>
|
||||||
|
<string name="department_of_management">所屬廳</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@@ -46,15 +46,30 @@
|
|||||||
android:layout_marginStart="@dimen/dp_10"
|
android:layout_marginStart="@dimen/dp_10"
|
||||||
android:src="@drawable/default_avatar" />
|
android:src="@drawable/default_avatar" />
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:id="@+id/tv_name"
|
android:orientation="vertical"
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
android:textColor="@color/color_1F1A4E"
|
android:layout_width="wrap_content"
|
||||||
android:textSize="@dimen/sp_15"
|
android:layout_height="wrap_content">
|
||||||
android:textStyle="bold"
|
|
||||||
tools:text="公會名稱" />
|
<TextView
|
||||||
|
android:id="@+id/tv_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/color_1F1A4E"
|
||||||
|
android:textSize="@dimen/sp_15"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="公會名稱" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_room_id"
|
||||||
|
android:text="@string/association_room_id"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
android:textColor="@color/color_B3B3C3"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@@ -20,6 +20,8 @@ import com.yizhuan.erban.module_hall.hall.view.indicator.StatisticsIndicatorAdap
|
|||||||
import com.yizhuan.erban.module_hall.income.ClanIncomeFragment;
|
import com.yizhuan.erban.module_hall.income.ClanIncomeFragment;
|
||||||
import com.yizhuan.erban.module_hall.income.presenter.ClanIncomePresenter;
|
import com.yizhuan.erban.module_hall.income.presenter.ClanIncomePresenter;
|
||||||
import com.yizhuan.erban.module_hall.income.view.IIncomeStatisticsView;
|
import com.yizhuan.erban.module_hall.income.view.IIncomeStatisticsView;
|
||||||
|
import com.yizhuan.erban.module_hall.income.view.LiveIncomeFragment;
|
||||||
|
import com.yizhuan.erban.ui.user.adapter.CommonWrapIndicatorAdapter;
|
||||||
import com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator;
|
import com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator;
|
||||||
import com.yizhuan.erban.ui.widget.magicindicator.ViewPagerHelper;
|
import com.yizhuan.erban.ui.widget.magicindicator.ViewPagerHelper;
|
||||||
import com.yizhuan.erban.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator;
|
import com.yizhuan.erban.ui.widget.magicindicator.buildins.commonnavigator.CommonNavigator;
|
||||||
@@ -46,14 +48,14 @@ import butterknife.OnClick;
|
|||||||
|
|
||||||
@CreatePresenter(ClanIncomePresenter.class)
|
@CreatePresenter(ClanIncomePresenter.class)
|
||||||
public class ClanIncomeActivity extends BaseMvpActivity<IIncomeStatisticsView, ClanIncomePresenter>
|
public class ClanIncomeActivity extends BaseMvpActivity<IIncomeStatisticsView, ClanIncomePresenter>
|
||||||
implements IIncomeStatisticsView, TimePickerClanDialog.TimePickerListener, ClanIncomeFragment.DayIncomeFragmentListener {
|
implements IIncomeStatisticsView, TimePickerClanDialog.TimePickerListener, ClanIncomeFragment.DayIncomeFragmentListener, LiveIncomeFragment.DayIncomeFragmentListener {
|
||||||
|
|
||||||
private static final int TYPE_DAY = 0;
|
private static final int TYPE_DAY = 0;
|
||||||
private static final int TYPE_WEEK = 1;
|
private static final int TYPE_WEEK = 1;
|
||||||
private static final int TYPE_MONTH = 2;
|
private static final int TYPE_MONTH = 2;
|
||||||
@BindView(R.id.view_pager)
|
@BindView(R.id.view_pager)
|
||||||
ViewPager viewPager;
|
ViewPager viewPager;
|
||||||
List<ClanIncomeFragment> list = new ArrayList<>();
|
List<Fragment> list = new ArrayList<>();
|
||||||
@BindView(R.id.indicator)
|
@BindView(R.id.indicator)
|
||||||
MagicIndicator indicator;
|
MagicIndicator indicator;
|
||||||
@BindView(R.id.tv_month_day_start)
|
@BindView(R.id.tv_month_day_start)
|
||||||
@@ -79,6 +81,7 @@ public class ClanIncomeActivity extends BaseMvpActivity<IIncomeStatisticsView, C
|
|||||||
private int mCurrentType;
|
private int mCurrentType;
|
||||||
private long mDayFirstTime = System.currentTimeMillis();
|
private long mDayFirstTime = System.currentTimeMillis();
|
||||||
private long mDayLastTime = mDayFirstTime;
|
private long mDayLastTime = mDayFirstTime;
|
||||||
|
private int mSelectPosition;
|
||||||
|
|
||||||
public static void start(Context context, long id) {
|
public static void start(Context context, long id) {
|
||||||
Intent intent = new Intent(context, ClanIncomeActivity.class);
|
Intent intent = new Intent(context, ClanIncomeActivity.class);
|
||||||
@@ -95,17 +98,13 @@ public class ClanIncomeActivity extends BaseMvpActivity<IIncomeStatisticsView, C
|
|||||||
long id = getIntent().getLongExtra(ClanIncomeFragment.FLAG_CLAN_ID, 0);
|
long id = getIntent().getLongExtra(ClanIncomeFragment.FLAG_CLAN_ID, 0);
|
||||||
initWhiteTitleBar(ResUtil.getString(R.string.hall_activity_clanincomeactivity_01));
|
initWhiteTitleBar(ResUtil.getString(R.string.hall_activity_clanincomeactivity_01));
|
||||||
|
|
||||||
ClanIncomeFragment fragment = ClanIncomeFragment.getInstance(id);
|
ClanIncomeFragment clanIncomeFragment = ClanIncomeFragment.getInstance(id);
|
||||||
fragment.setmDayIncomeFragmentListener(this);
|
clanIncomeFragment.setmDayIncomeFragmentListener(this);
|
||||||
list.add(fragment);
|
list.add(clanIncomeFragment);
|
||||||
|
|
||||||
fragment = ClanIncomeFragment.getInstance(id);
|
LiveIncomeFragment liveIncomeFragment = LiveIncomeFragment.getInstance(id);
|
||||||
fragment.setmDayIncomeFragmentListener(this);
|
liveIncomeFragment.setmDayIncomeFragmentListener(this);
|
||||||
list.add(fragment);
|
list.add(liveIncomeFragment);
|
||||||
|
|
||||||
fragment = ClanIncomeFragment.getInstance(id);
|
|
||||||
fragment.setmDayIncomeFragmentListener(this);
|
|
||||||
list.add(fragment);
|
|
||||||
|
|
||||||
viewPager.setAdapter(adapter);
|
viewPager.setAdapter(adapter);
|
||||||
}
|
}
|
||||||
@@ -131,13 +130,14 @@ public class ClanIncomeActivity extends BaseMvpActivity<IIncomeStatisticsView, C
|
|||||||
|
|
||||||
private void initIndicator() {
|
private void initIndicator() {
|
||||||
List<String> tagList = new ArrayList<>();
|
List<String> tagList = new ArrayList<>();
|
||||||
tagList.add(ResUtil.getString(R.string.hall_activity_clanincomeactivity_02));
|
tagList.add(ResUtil.getString(R.string.clan_income));
|
||||||
tagList.add(ResUtil.getString(R.string.hall_activity_clanincomeactivity_03));
|
tagList.add(ResUtil.getString(R.string.live_income));
|
||||||
tagList.add(ResUtil.getString(R.string.hall_activity_clanincomeactivity_04));
|
CommonWrapIndicatorAdapter magicIndicatorAdapter = new CommonWrapIndicatorAdapter(context, tagList);
|
||||||
StatisticsIndicatorAdapter adapter = new StatisticsIndicatorAdapter(tagList, 5);
|
magicIndicatorAdapter.setOnItemSelectListener((position, view) -> {
|
||||||
adapter.setOnItemSelectListener(position -> viewPager.setCurrentItem(position));
|
viewPager.setCurrentItem(position);
|
||||||
|
});
|
||||||
CommonNavigator navigator = new CommonNavigator(this);
|
CommonNavigator navigator = new CommonNavigator(this);
|
||||||
navigator.setAdapter(adapter);
|
navigator.setAdapter(magicIndicatorAdapter);
|
||||||
navigator.setAdjustMode(true);
|
navigator.setAdjustMode(true);
|
||||||
indicator.setNavigator(navigator);
|
indicator.setNavigator(navigator);
|
||||||
ViewPagerHelper.bind(indicator, viewPager);
|
ViewPagerHelper.bind(indicator, viewPager);
|
||||||
@@ -152,13 +152,10 @@ public class ClanIncomeActivity extends BaseMvpActivity<IIncomeStatisticsView, C
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPageSelected(int position) {
|
public void onPageSelected(int position) {
|
||||||
// 切换日,周
|
mSelectPosition = position;
|
||||||
mCurrentType = position;
|
|
||||||
ClanIncomePresenter presenter = getMvpPresenter();
|
ClanIncomePresenter presenter = getMvpPresenter();
|
||||||
|
|
||||||
if (mCurrentType == TYPE_WEEK) {
|
if (mCurrentType == TYPE_WEEK) {
|
||||||
StatisticManager.Instance().onEvent(BasicConfig.INSTANCE.getAppContext(),
|
|
||||||
StatisticsProtocol.HALL_INCOME_WEEKLY_CLICK, ResUtil.getString(R.string.hall_activity_clanincomeactivity_05), null);
|
|
||||||
getWeekIncomeTotal(presenter.getWeekFirstDay(), presenter.getWeekLastDay());
|
getWeekIncomeTotal(presenter.getWeekFirstDay(), presenter.getWeekLastDay());
|
||||||
} else if (mCurrentType == TYPE_DAY) {
|
} else if (mCurrentType == TYPE_DAY) {
|
||||||
getDayIncomeTotal(getDayFormat(mDayFirstTime), getDayFormat(mDayLastTime));
|
getDayIncomeTotal(getDayFormat(mDayFirstTime), getDayFormat(mDayLastTime));
|
||||||
@@ -243,7 +240,13 @@ public class ClanIncomeActivity extends BaseMvpActivity<IIncomeStatisticsView, C
|
|||||||
tvMonthDayStart.setText(String.format(getString(R.string.format_month_day), dayArray[1], dayArray[2]));
|
tvMonthDayStart.setText(String.format(getString(R.string.format_month_day), dayArray[1], dayArray[2]));
|
||||||
tvMonthDayEnd.setVisibility(View.VISIBLE);
|
tvMonthDayEnd.setVisibility(View.VISIBLE);
|
||||||
tvMonthDayEnd.setText(String.format(getString(R.string.format_month_day), endDayArray[1], endDayArray[2]));
|
tvMonthDayEnd.setText(String.format(getString(R.string.format_month_day), endDayArray[1], endDayArray[2]));
|
||||||
list.get(0).getIncomeTotal(startTimeStr, endTimeStr);
|
if (mSelectPosition == 0) {
|
||||||
|
ClanIncomeFragment clanIncomeFragment = (ClanIncomeFragment) list.get(0);
|
||||||
|
clanIncomeFragment.getIncomeTotal(startTimeStr, endTimeStr);
|
||||||
|
}else if(mSelectPosition == 1){
|
||||||
|
LiveIncomeFragment liveIncomeFragment = (LiveIncomeFragment) list.get(1);
|
||||||
|
liveIncomeFragment.getIncomeTotal(startTimeStr, endTimeStr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getWeekIncomeTotal(String startTimeStr, String endTimeStr) {
|
private void getWeekIncomeTotal(String startTimeStr, String endTimeStr) {
|
||||||
@@ -254,8 +257,13 @@ public class ClanIncomeActivity extends BaseMvpActivity<IIncomeStatisticsView, C
|
|||||||
tvMonthDayEnd.setVisibility(View.VISIBLE);
|
tvMonthDayEnd.setVisibility(View.VISIBLE);
|
||||||
tvMonthDayStart.setText(String.format(getString(R.string.format_month_day), weekFirstArray[1], weekFirstArray[2]));
|
tvMonthDayStart.setText(String.format(getString(R.string.format_month_day), weekFirstArray[1], weekFirstArray[2]));
|
||||||
tvMonthDayEnd.setText(String.format(getString(R.string.format_month_day), weekLastArray[1], weekLastArray[2]));
|
tvMonthDayEnd.setText(String.format(getString(R.string.format_month_day), weekLastArray[1], weekLastArray[2]));
|
||||||
list.get(1).getIncomeTotal(startTimeStr, endTimeStr);
|
if (mSelectPosition == 0) {
|
||||||
|
ClanIncomeFragment clanIncomeFragment = (ClanIncomeFragment) list.get(0);
|
||||||
|
clanIncomeFragment.getIncomeTotal(startTimeStr, endTimeStr);
|
||||||
|
}else if(mSelectPosition == 1){
|
||||||
|
LiveIncomeFragment liveIncomeFragment = (LiveIncomeFragment) list.get(1);
|
||||||
|
liveIncomeFragment.getIncomeTotal(startTimeStr, endTimeStr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void getMonthIncomeTotal(String startTimeStr, String endTimeStr) {
|
private void getMonthIncomeTotal(String startTimeStr, String endTimeStr) {
|
||||||
@@ -263,7 +271,13 @@ public class ClanIncomeActivity extends BaseMvpActivity<IIncomeStatisticsView, C
|
|||||||
tvYear.setText(String.format(getString(R.string.format_year), startArray[0]));
|
tvYear.setText(String.format(getString(R.string.format_year), startArray[0]));
|
||||||
tvMonthDayEnd.setVisibility(View.GONE);
|
tvMonthDayEnd.setVisibility(View.GONE);
|
||||||
tvMonthDayStart.setText(String.format(getString(R.string.format_month), startArray[1]));
|
tvMonthDayStart.setText(String.format(getString(R.string.format_month), startArray[1]));
|
||||||
list.get(2).getIncomeTotal(startTimeStr, endTimeStr);
|
if (mSelectPosition == 0) {
|
||||||
|
ClanIncomeFragment clanIncomeFragment = (ClanIncomeFragment) list.get(0);
|
||||||
|
clanIncomeFragment.getIncomeTotal(startTimeStr, endTimeStr);
|
||||||
|
}else if(mSelectPosition == 1){
|
||||||
|
LiveIncomeFragment liveIncomeFragment = (LiveIncomeFragment) list.get(1);
|
||||||
|
liveIncomeFragment.getIncomeTotal(startTimeStr, endTimeStr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -377,7 +377,7 @@ public class ModuleHallActivity extends BaseMvpActivity<IModuleHallView, ModuleH
|
|||||||
if (authInfoList != null && authInfoList.size() > 0) {
|
if (authInfoList != null && authInfoList.size() > 0) {
|
||||||
List<ButtonItem> list_adapter = new ArrayList<>();
|
List<ButtonItem> list_adapter = new ArrayList<>();
|
||||||
if (hallInfo != null) {
|
if (hallInfo != null) {
|
||||||
if (hallInfo.getRoleType() == 1 && clanInfo != null && clanInfo.getElderUid() > 0) {
|
if (HallDataManager.get().getRoleType() == RoleType.OWNER && isSelfHall && clanInfo != null && clanInfo.getElderUid() <=0) {
|
||||||
ButtonItem item = new ButtonItem(getString(R.string.join_clan), () -> {
|
ButtonItem item = new ButtonItem(getString(R.string.join_clan), () -> {
|
||||||
jumpCode(AuthInfo.AUTH_MEMBER_JOIN_CLAN);
|
jumpCode(AuthInfo.AUTH_MEMBER_JOIN_CLAN);
|
||||||
});
|
});
|
||||||
|
@@ -62,6 +62,8 @@ public class TimePickerClanDialog extends DialogFragment implements View.OnClick
|
|||||||
private boolean isMonth;
|
private boolean isMonth;
|
||||||
private int mCurrentType;
|
private int mCurrentType;
|
||||||
|
|
||||||
|
private View view;
|
||||||
|
|
||||||
private static TimePickerClanDialog newInstance(PickerConfig pickerConfig, long firstMs, boolean isWeek, boolean isMonth, boolean isDay, long dayFirstTime, long dayLastTime) {
|
private static TimePickerClanDialog newInstance(PickerConfig pickerConfig, long firstMs, boolean isWeek, boolean isMonth, boolean isDay, long dayFirstTime, long dayLastTime) {
|
||||||
TimePickerClanDialog timePickerDialog = new TimePickerClanDialog();
|
TimePickerClanDialog timePickerDialog = new TimePickerClanDialog();
|
||||||
timePickerDialog.initialize(pickerConfig, firstMs, isWeek, isMonth, isDay, dayFirstTime, dayLastTime);
|
timePickerDialog.initialize(pickerConfig, firstMs, isWeek, isMonth, isDay, dayFirstTime, dayLastTime);
|
||||||
@@ -112,7 +114,7 @@ public class TimePickerClanDialog extends DialogFragment implements View.OnClick
|
|||||||
|
|
||||||
View initView() {
|
View initView() {
|
||||||
LayoutInflater inflater = LayoutInflater.from(getContext());
|
LayoutInflater inflater = LayoutInflater.from(getContext());
|
||||||
View view = inflater.inflate(R.layout.dialog_clan_time_picker, null);
|
view = inflater.inflate(R.layout.dialog_clan_time_picker, null);
|
||||||
Context context = view.getContext();
|
Context context = view.getContext();
|
||||||
TextView cancel = view.findViewById(R.id.tv_cancel);
|
TextView cancel = view.findViewById(R.id.tv_cancel);
|
||||||
cancel.setOnClickListener(this);
|
cancel.setOnClickListener(this);
|
||||||
@@ -245,7 +247,13 @@ public class TimePickerClanDialog extends DialogFragment implements View.OnClick
|
|||||||
this.isWeek = false;
|
this.isWeek = false;
|
||||||
this.isMonth = false;
|
this.isMonth = false;
|
||||||
mCurrentType = TYPE_DAY;
|
mCurrentType = TYPE_DAY;
|
||||||
|
if (mFirstMs <= 0) {
|
||||||
|
mFirstMs = System.currentTimeMillis();
|
||||||
|
}
|
||||||
|
mPickerConfig.mType = Type.YEAR_MONTH_DAY;
|
||||||
|
mPickerConfig.mCurrentCalendar = new WheelCalendar(mFirstMs);
|
||||||
tvWeekLastDay.setSelected(false);
|
tvWeekLastDay.setSelected(false);
|
||||||
|
rlWeekGroup.setVisibility(View.VISIBLE);
|
||||||
if (mDayFirstTime != mDayLastTime) {
|
if (mDayFirstTime != mDayLastTime) {
|
||||||
tvWeekLastDay.setText(TimeUtils.getDateTimeString(mDayLastTime, TimeUtils.DATE_FORMAT));
|
tvWeekLastDay.setText(TimeUtils.getDateTimeString(mDayLastTime, TimeUtils.DATE_FORMAT));
|
||||||
} else {
|
} else {
|
||||||
@@ -259,13 +267,20 @@ public class TimePickerClanDialog extends DialogFragment implements View.OnClick
|
|||||||
tvWeekFirstDay.setSelected(false);
|
tvWeekFirstDay.setSelected(false);
|
||||||
tvWeekLastDay.setSelected(true);
|
tvWeekLastDay.setSelected(true);
|
||||||
});
|
});
|
||||||
|
mTimeWheel = new TimeWheel(view, mPickerConfig);
|
||||||
Calendar currCalendar = Calendar.getInstance();
|
Calendar currCalendar = Calendar.getInstance();
|
||||||
if (mFirstMs <= 0) {
|
|
||||||
mFirstMs = System.currentTimeMillis();
|
|
||||||
}
|
|
||||||
currCalendar.setTimeInMillis(mFirstMs);
|
currCalendar.setTimeInMillis(mFirstMs);
|
||||||
setWeekView(currCalendar);
|
setWeekView(currCalendar);
|
||||||
Calendar calendar = Calendar.getInstance();
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
mTimeWheel.setOnTimeChangeListener(() -> {
|
||||||
|
int year = mTimeWheel.getCurrentYear();
|
||||||
|
int month = mTimeWheel.getCurrentMonth();
|
||||||
|
int day = mTimeWheel.getCurrentDay();
|
||||||
|
calendar.set(Calendar.YEAR, year);
|
||||||
|
calendar.set(Calendar.MONTH, month - 1);
|
||||||
|
calendar.set(Calendar.DAY_OF_MONTH, day);
|
||||||
|
setWeekView(calendar);
|
||||||
|
});
|
||||||
}else if(i == R.id.tvWeek) {
|
}else if(i == R.id.tvWeek) {
|
||||||
tvDay.setSelected(false);
|
tvDay.setSelected(false);
|
||||||
tvWeek.setSelected(true);
|
tvWeek.setSelected(true);
|
||||||
@@ -274,14 +289,28 @@ public class TimePickerClanDialog extends DialogFragment implements View.OnClick
|
|||||||
this.isWeek = true;
|
this.isWeek = true;
|
||||||
this.isMonth = false;
|
this.isMonth = false;
|
||||||
mCurrentType = TYPE_WEEK;
|
mCurrentType = TYPE_WEEK;
|
||||||
tvWeekFirstDay.setSelected(true);
|
|
||||||
tvWeekLastDay.setSelected(true);
|
|
||||||
Calendar currCalendar = Calendar.getInstance();
|
|
||||||
if (mFirstMs <= 0) {
|
if (mFirstMs <= 0) {
|
||||||
mFirstMs = System.currentTimeMillis();
|
mFirstMs = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
mPickerConfig.mType = Type.YEAR_MONTH_DAY;
|
||||||
|
mPickerConfig.mCurrentCalendar = new WheelCalendar(mFirstMs);
|
||||||
|
tvWeekFirstDay.setSelected(true);
|
||||||
|
tvWeekLastDay.setSelected(true);
|
||||||
|
rlWeekGroup.setVisibility(View.VISIBLE);
|
||||||
|
mTimeWheel = new TimeWheel(view, mPickerConfig);
|
||||||
|
Calendar currCalendar = Calendar.getInstance();
|
||||||
currCalendar.setTimeInMillis(mFirstMs);
|
currCalendar.setTimeInMillis(mFirstMs);
|
||||||
setWeekView(currCalendar);
|
setWeekView(currCalendar);
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
mTimeWheel.setOnTimeChangeListener(() -> {
|
||||||
|
int year = mTimeWheel.getCurrentYear();
|
||||||
|
int month = mTimeWheel.getCurrentMonth();
|
||||||
|
int day = mTimeWheel.getCurrentDay();
|
||||||
|
calendar.set(Calendar.YEAR, year);
|
||||||
|
calendar.set(Calendar.MONTH, month - 1);
|
||||||
|
calendar.set(Calendar.DAY_OF_MONTH, day);
|
||||||
|
setWeekView(calendar);
|
||||||
|
});
|
||||||
}else if(i == R.id.tvMonth) {
|
}else if(i == R.id.tvMonth) {
|
||||||
tvDay.setSelected(false);
|
tvDay.setSelected(false);
|
||||||
tvWeek.setSelected(false);
|
tvWeek.setSelected(false);
|
||||||
@@ -290,6 +319,26 @@ public class TimePickerClanDialog extends DialogFragment implements View.OnClick
|
|||||||
this.isWeek = false;
|
this.isWeek = false;
|
||||||
this.isMonth = true;
|
this.isMonth = true;
|
||||||
mCurrentType = TYPE_MONTH;
|
mCurrentType = TYPE_MONTH;
|
||||||
|
rlWeekGroup.setVisibility(View.GONE);
|
||||||
|
if (mFirstMs <= 0) {
|
||||||
|
mFirstMs = System.currentTimeMillis();
|
||||||
|
}
|
||||||
|
mPickerConfig.mType = Type.YEAR_MONTH;
|
||||||
|
mPickerConfig.mCurrentCalendar = new WheelCalendar(mFirstMs);
|
||||||
|
mTimeWheel = new TimeWheel(view, mPickerConfig);
|
||||||
|
Calendar currCalendar = Calendar.getInstance();
|
||||||
|
currCalendar.setTimeInMillis(mFirstMs);
|
||||||
|
setWeekView(currCalendar);
|
||||||
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
mTimeWheel.setOnTimeChangeListener(() -> {
|
||||||
|
int year = mTimeWheel.getCurrentYear();
|
||||||
|
int month = mTimeWheel.getCurrentMonth();
|
||||||
|
int day = mTimeWheel.getCurrentDay();
|
||||||
|
calendar.set(Calendar.YEAR, year);
|
||||||
|
calendar.set(Calendar.MONTH, month - 1);
|
||||||
|
calendar.set(Calendar.DAY_OF_MONTH, day);
|
||||||
|
setWeekView(calendar);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -112,6 +112,7 @@ public class TimeWheel {
|
|||||||
break;
|
break;
|
||||||
case YEAR_MONTH_DAY:
|
case YEAR_MONTH_DAY:
|
||||||
Utils.hideViews(hour, minute);
|
Utils.hideViews(hour, minute);
|
||||||
|
day.setVisibility(View.VISIBLE);
|
||||||
break;
|
break;
|
||||||
case YEAR_MONTH:
|
case YEAR_MONTH:
|
||||||
Utils.hideViews(day, hour, minute);
|
Utils.hideViews(day, hour, minute);
|
||||||
|
@@ -0,0 +1,34 @@
|
|||||||
|
package com.yizhuan.erban.module_hall.income.adapter;
|
||||||
|
|
||||||
|
import com.chad.library.adapter.base.BaseQuickAdapter;
|
||||||
|
import com.chad.library.adapter.base.BaseViewHolder;
|
||||||
|
import com.yizhuan.erban.R;
|
||||||
|
import com.yizhuan.erban.ui.utils.ImageLoadUtils;
|
||||||
|
import com.yizhuan.erban.ui.utils.ImageLoadUtilsV2;
|
||||||
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.ClanIncomeInfo;
|
||||||
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.LiveIncomeInfo;
|
||||||
|
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
|
||||||
|
public class LiveIncomeAdapter extends BaseQuickAdapter<LiveIncomeInfo, BaseViewHolder> {
|
||||||
|
|
||||||
|
public LiveIncomeAdapter() {
|
||||||
|
super(R.layout.item_live_income);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void convert(@NotNull BaseViewHolder helper, LiveIncomeInfo item) {
|
||||||
|
|
||||||
|
helper.setText(R.id.tvIncome, String.valueOf(item.getIncome()))
|
||||||
|
.setText(R.id.tv_hall_number, String.valueOf(helper.getLayoutPosition() + 1))
|
||||||
|
.setText(R.id.tv_user_name, item.getNick())
|
||||||
|
.setText(R.id.tv_hall_name, item.getHallName());
|
||||||
|
ImageLoadUtilsV2.loadAvatar(helper.getView(R.id.iv_user_avatar), item.getAvatar());
|
||||||
|
ImageLoadUtils.loadImage(mContext, item.getHallAvatar(), helper.getView(R.id.iv_hall_avatar));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,41 @@
|
|||||||
|
package com.yizhuan.erban.module_hall.income.presenter;
|
||||||
|
|
||||||
|
import com.yizhuan.erban.base.BaseMvpPresenter;
|
||||||
|
import com.yizhuan.erban.module_hall.income.view.IClanIncomeView;
|
||||||
|
import com.yizhuan.erban.module_hall.income.view.ILiveIncomeView;
|
||||||
|
import com.yizhuan.xchat_android_core.module_hall.income.IncomeModel;
|
||||||
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.ClanTotalIncomeInfo;
|
||||||
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.LiveTotalIncomeInfo;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import io.reactivex.SingleObserver;
|
||||||
|
import io.reactivex.disposables.Disposable;
|
||||||
|
|
||||||
|
public class LiveIncomeFragmentPresenter extends BaseMvpPresenter<ILiveIncomeView> {
|
||||||
|
|
||||||
|
public void incomeTotal(long id, String startTimeStr, String endTimeStr) {
|
||||||
|
IncomeModel.get().getLiveIncomeList(id, startTimeStr, endTimeStr).compose(bindToLifecycle())
|
||||||
|
.subscribe(new SingleObserver<LiveTotalIncomeInfo>() {
|
||||||
|
@Override
|
||||||
|
public void onSubscribe(Disposable d) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSuccess(@NotNull LiveTotalIncomeInfo liveTotalIncomeInfo) {
|
||||||
|
if (getMvpView() == null)
|
||||||
|
return;
|
||||||
|
getMvpView().incomeTotalSuccess(liveTotalIncomeInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onError(@NotNull Throwable e) {
|
||||||
|
if (getMvpView() == null)
|
||||||
|
return;
|
||||||
|
getMvpView().incomeTotalFail(e.getMessage());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,11 @@
|
|||||||
|
package com.yizhuan.erban.module_hall.income.view;
|
||||||
|
|
||||||
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.LiveTotalIncomeInfo;
|
||||||
|
import com.yizhuan.xchat_android_library.base.IMvpBaseView;
|
||||||
|
|
||||||
|
public interface ILiveIncomeView extends IMvpBaseView {
|
||||||
|
|
||||||
|
void incomeTotalSuccess(LiveTotalIncomeInfo liveTotalIncomeInfo);
|
||||||
|
|
||||||
|
void incomeTotalFail(String message);
|
||||||
|
}
|
@@ -0,0 +1,123 @@
|
|||||||
|
package com.yizhuan.erban.module_hall.income.view;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
|
import com.yizhuan.erban.R;
|
||||||
|
import com.yizhuan.erban.base.BaseMvpFragment;
|
||||||
|
import com.yizhuan.erban.module_hall.income.adapter.ClanIncomeAdapter;
|
||||||
|
import com.yizhuan.erban.module_hall.income.adapter.LiveIncomeAdapter;
|
||||||
|
import com.yizhuan.erban.module_hall.income.presenter.LiveIncomeFragmentPresenter;
|
||||||
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.LiveTotalIncomeInfo;
|
||||||
|
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter;
|
||||||
|
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||||
|
import com.yizhuan.xchat_android_library.utils.ResUtil;
|
||||||
|
|
||||||
|
import butterknife.BindView;
|
||||||
|
import butterknife.ButterKnife;
|
||||||
|
import butterknife.Unbinder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主播收入統計
|
||||||
|
* Created by wushaocheng on 2022/11/10.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@CreatePresenter(LiveIncomeFragmentPresenter.class)
|
||||||
|
public class LiveIncomeFragment extends BaseMvpFragment<ILiveIncomeView, LiveIncomeFragmentPresenter> implements ILiveIncomeView {
|
||||||
|
|
||||||
|
public static final String FLAG_CLAN_ID = "clanId";
|
||||||
|
Unbinder unbinder;
|
||||||
|
@BindView(R.id.recycler_view)
|
||||||
|
RecyclerView recyclerView;
|
||||||
|
private LiveIncomeAdapter mIncomeAdapter;
|
||||||
|
private DayIncomeFragmentListener mDayIncomeFragmentListener;
|
||||||
|
private long clanId;
|
||||||
|
|
||||||
|
public static LiveIncomeFragment getInstance(long clanId) {
|
||||||
|
LiveIncomeFragment fragment = new LiveIncomeFragment();
|
||||||
|
Bundle bundle = new Bundle();
|
||||||
|
bundle.putLong(FLAG_CLAN_ID, clanId);
|
||||||
|
fragment.setArguments(bundle);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFindViews() {
|
||||||
|
mIncomeAdapter = new LiveIncomeAdapter();
|
||||||
|
recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
|
||||||
|
recyclerView.setAdapter(mIncomeAdapter);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onSetListener() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initiate() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public void getIncomeTotal(String startTimeStr, String endTimeStr) {
|
||||||
|
clanId = requireArguments().getLong(FLAG_CLAN_ID);
|
||||||
|
getMvpPresenter().incomeTotal(clanId, startTimeStr, endTimeStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
||||||
|
super.onCreateView(inflater, container, savedInstanceState);
|
||||||
|
unbinder = ButterKnife.bind(this, mView);
|
||||||
|
|
||||||
|
return mView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRootLayoutId() {
|
||||||
|
return R.layout.fragment_hall_income;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroyView() {
|
||||||
|
super.onDestroyView();
|
||||||
|
unbinder.unbind();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void setTotal(double total) {
|
||||||
|
if (mDayIncomeFragmentListener != null)
|
||||||
|
mDayIncomeFragmentListener.setTotal(total);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setmDayIncomeFragmentListener(DayIncomeFragmentListener mDayIncomeFragmentListener) {
|
||||||
|
this.mDayIncomeFragmentListener = mDayIncomeFragmentListener;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void incomeTotalSuccess(LiveTotalIncomeInfo liveTotalIncomeInfo) {
|
||||||
|
setTotal(liveTotalIncomeInfo.getTotal());
|
||||||
|
if (!ListUtils.isListEmpty(liveTotalIncomeInfo.getMemberIncome())) {
|
||||||
|
hideStatus();
|
||||||
|
mIncomeAdapter.setNewData(liveTotalIncomeInfo.getMemberIncome());
|
||||||
|
} else {
|
||||||
|
mIncomeAdapter.setNewData(null);
|
||||||
|
showNoData(ResUtil.getString(R.string.module_hall_income_clanincomefragment_01));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void incomeTotalFail(String message) {
|
||||||
|
showNoData(ResUtil.getString(R.string.module_hall_income_clanincomefragment_02));
|
||||||
|
setTotal(0);
|
||||||
|
mIncomeAdapter.setNewData(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface DayIncomeFragmentListener {
|
||||||
|
void setTotal(double total);
|
||||||
|
}
|
||||||
|
}
|
@@ -4,21 +4,19 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:background="@color/bg_normal_1c1b22"
|
android:background="@color/color_white"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.yizhuan.erban.base.TitleBar
|
<com.yizhuan.erban.base.TitleBar
|
||||||
android:id="@+id/title_bar"
|
android:id="@+id/title_bar"
|
||||||
android:layout_marginTop="@dimen/dp_30"
|
android:layout_marginTop="@dimen/dp_30"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
</com.yizhuan.erban.base.TitleBar>
|
|
||||||
|
|
||||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||||
android:id="@+id/indicator"
|
android:id="@+id/indicator"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="@dimen/dp_45"
|
android:layout_height="@dimen/dp_25"
|
||||||
android:layout_marginStart="@dimen/dp_30"
|
android:layout_marginStart="@dimen/dp_30"
|
||||||
android:layout_marginEnd="@dimen/dp_30" />
|
android:layout_marginEnd="@dimen/dp_30" />
|
||||||
|
|
||||||
@@ -120,41 +118,6 @@
|
|||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="33dp"
|
|
||||||
android:layout_marginTop="25dp"
|
|
||||||
android:background="@color/bg_secondary_2a2a39"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="45dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/layout_activity_clan_income_04"
|
|
||||||
android:textColor="@color/text_normal_c6c6e9"
|
|
||||||
android:textSize="13dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/layout_activity_clan_income_05"
|
|
||||||
android:textColor="@color/text_normal_c6c6e9"
|
|
||||||
android:textSize="13dp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="30dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="@string/layout_activity_clan_income_06"
|
|
||||||
android:textColor="@color/text_normal_c6c6e9"
|
|
||||||
android:textSize="13dp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<androidx.viewpager.widget.ViewPager
|
<androidx.viewpager.widget.ViewPager
|
||||||
android:id="@+id/view_pager"
|
android:id="@+id/view_pager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@@ -1,12 +1,53 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<com.yizhuan.erban.common.widget.StatusLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/status_layout"
|
android:orientation="vertical"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<LinearLayout
|
||||||
android:id="@+id/recycler_view"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="33dp"
|
||||||
|
android:layout_marginTop="25dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
</com.yizhuan.erban.common.widget.StatusLayout>
|
<TextView
|
||||||
|
android:layout_width="45dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/layout_activity_clan_income_04"
|
||||||
|
android:textColor="@color/text_normal_c6c6e9"
|
||||||
|
android:textSize="13dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/layout_activity_clan_income_05"
|
||||||
|
android:textColor="@color/text_normal_c6c6e9"
|
||||||
|
android:textSize="13dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="30dp"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/layout_activity_clan_income_06"
|
||||||
|
android:textColor="@color/text_normal_c6c6e9"
|
||||||
|
android:textSize="13dp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.yizhuan.erban.common.widget.StatusLayout
|
||||||
|
android:id="@+id/status_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recycler_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
</com.yizhuan.erban.common.widget.StatusLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="33dp"
|
||||||
|
android:layout_marginTop="25dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/diamond_income"
|
||||||
|
android:textColor="@color/text_normal_c6c6e9"
|
||||||
|
android:textSize="@dimen/sp_14" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/department_of_management"
|
||||||
|
android:textColor="@color/text_normal_c6c6e9"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<com.yizhuan.erban.common.widget.StatusLayout
|
||||||
|
android:id="@+id/status_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/recycler_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
|
</com.yizhuan.erban.common.widget.StatusLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@@ -4,7 +4,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
tools:background="@color/bg_normal_1c1b22">
|
tools:background="@color/color_white">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="1"
|
android:text="1"
|
||||||
android:textColor="@color/text_secondary_4f516a"
|
android:textColor="@color/color_1F1A4E"
|
||||||
android:textSize="15sp" />
|
android:textSize="15sp" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
94
app/src/module_labour_union/res/layout/item_live_income.xml
Normal file
94
app/src/module_labour_union/res/layout/item_live_income.xml
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
tools:background="@color/color_white">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_hall_number"
|
||||||
|
android:layout_width="45dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="1"
|
||||||
|
android:textColor="@color/color_1F1A4E"
|
||||||
|
android:textSize="@dimen/sp_14" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="60dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/dp_10"
|
||||||
|
android:layout_marginBottom="20dp"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.yizhuan.erban.common.widget.CircleImageView
|
||||||
|
android:id="@+id/iv_user_avatar"
|
||||||
|
android:layout_width="35dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:layout_gravity="center_horizontal"
|
||||||
|
android:src="@drawable/default_cover" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_user_name"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="3dp"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:lines="1"
|
||||||
|
android:textColor="@color/color_1F1A4E"
|
||||||
|
android:textSize="@dimen/sp_12"
|
||||||
|
tools:text="@string/layout_item_clan_income_01" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvIncome"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_12"
|
||||||
|
android:layout_marginTop="@dimen/dp_20"
|
||||||
|
android:textColor="@color/color_1F1A4E"
|
||||||
|
android:textSize="@dimen/sp_14"
|
||||||
|
android:textStyle="bold"
|
||||||
|
tools:text="1,000,000,000" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<com.yizhuan.erban.common.widget.RectRoundImageView
|
||||||
|
android:id="@+id/iv_hall_avatar"
|
||||||
|
android:layout_width="35dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginEnd="@dimen/dp_6"
|
||||||
|
android:src="@drawable/default_cover"
|
||||||
|
app:borderRadius="8dp"
|
||||||
|
app:type="round" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_hall_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center_vertical"
|
||||||
|
android:layout_marginEnd="@dimen/dp_15"
|
||||||
|
android:textColor="@color/color_1F1A4E"
|
||||||
|
android:textSize="@dimen/sp_13"
|
||||||
|
tools:text="房間名稱" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1px"
|
||||||
|
android:background="@color/line_353548" />
|
||||||
|
|
||||||
|
</FrameLayout>
|
@@ -4,6 +4,7 @@ import com.yizhuan.xchat_android_core.base.IModel;
|
|||||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.ClanTotalIncomeInfo;
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.ClanTotalIncomeInfo;
|
||||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.IncomeGiftInfo;
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.IncomeGiftInfo;
|
||||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.IncomeTotalInfo;
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.IncomeTotalInfo;
|
||||||
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.LiveTotalIncomeInfo;
|
||||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.SingleRoomTotalIncomeInfo;
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.SingleRoomTotalIncomeInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -16,6 +17,8 @@ public interface IIncomeModel extends IModel {
|
|||||||
|
|
||||||
Single<ClanTotalIncomeInfo> getClanIncomeList(long clanId, String startTimeStr, String endTimeStr);
|
Single<ClanTotalIncomeInfo> getClanIncomeList(long clanId, String startTimeStr, String endTimeStr);
|
||||||
|
|
||||||
|
Single<LiveTotalIncomeInfo> getLiveIncomeList(long clanId, String startTimeStr, String endTimeStr);
|
||||||
|
|
||||||
Single<SingleRoomTotalIncomeInfo> getSingleRoomIncomeList(String hallId, String clanId,String startTime, String endTime);
|
Single<SingleRoomTotalIncomeInfo> getSingleRoomIncomeList(String hallId, String clanId,String startTime, String endTime);
|
||||||
|
|
||||||
Single<List<IncomeGiftInfo>> incomeDetail(long memberId, long hallId, String startTimeStr, String endTimeStr);
|
Single<List<IncomeGiftInfo>> incomeDetail(long memberId, long hallId, String startTimeStr, String endTimeStr);
|
||||||
|
@@ -6,6 +6,7 @@ import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
|
|||||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.ClanTotalIncomeInfo;
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.ClanTotalIncomeInfo;
|
||||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.IncomeGiftInfo;
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.IncomeGiftInfo;
|
||||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.IncomeTotalInfo;
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.IncomeTotalInfo;
|
||||||
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.LiveTotalIncomeInfo;
|
||||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.SingleRoomTotalIncomeInfo;
|
import com.yizhuan.xchat_android_core.module_hall.income.bean.SingleRoomTotalIncomeInfo;
|
||||||
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
|
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
|
||||||
import com.yizhuan.xchat_android_library.net.rxnet.RxNet;
|
import com.yizhuan.xchat_android_library.net.rxnet.RxNet;
|
||||||
@@ -56,6 +57,27 @@ public class IncomeModel extends BaseModel implements IIncomeModel {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 獲取主播收入流水
|
||||||
|
* @param clanId
|
||||||
|
* @param startTime
|
||||||
|
* @param endTime
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Single<LiveTotalIncomeInfo> getLiveIncomeList(long clanId, String startTime, String endTime) {
|
||||||
|
return api.getLiveIncomeList(clanId, startTime, endTime)
|
||||||
|
.compose(RxHelper.handleSchAndExce())
|
||||||
|
.flatMap((Function<ServiceResult<LiveTotalIncomeInfo>, SingleSource<LiveTotalIncomeInfo>>) response -> {
|
||||||
|
if (response.isSuccess()) {
|
||||||
|
return Single.just(response.getData());
|
||||||
|
} else {
|
||||||
|
return Single.error(new Throwable(response.getMessage()));
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Single<SingleRoomTotalIncomeInfo> getSingleRoomIncomeList(String clanId, String hallId, String startTime, String endTime) {
|
public Single<SingleRoomTotalIncomeInfo> getSingleRoomIncomeList(String clanId, String hallId, String startTime, String endTime) {
|
||||||
return api.getSingleRoomIncomeList(clanId, hallId, startTime, endTime)
|
return api.getSingleRoomIncomeList(clanId, hallId, startTime, endTime)
|
||||||
@@ -105,6 +127,14 @@ public class IncomeModel extends BaseModel implements IIncomeModel {
|
|||||||
@Query("startTime") String startTime,
|
@Query("startTime") String startTime,
|
||||||
@Query("endTime") String endTime);
|
@Query("endTime") String endTime);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取主播收入列表
|
||||||
|
*/
|
||||||
|
@GET("/clan/income/hallMemberTotalList")
|
||||||
|
Single<ServiceResult<LiveTotalIncomeInfo>> getLiveIncomeList(@Query("clanId") long clanId,
|
||||||
|
@Query("startTime") String startTime,
|
||||||
|
@Query("endTime") String endTime);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取个播房收入列表
|
* 获取个播房收入列表
|
||||||
*/
|
*/
|
||||||
|
@@ -0,0 +1,18 @@
|
|||||||
|
package com.yizhuan.xchat_android_core.module_hall.income.bean;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class LiveIncomeInfo implements Serializable {
|
||||||
|
private Long uid;
|
||||||
|
private String nick;
|
||||||
|
private String avatar;
|
||||||
|
private Double income;
|
||||||
|
|
||||||
|
private Long hallId;
|
||||||
|
private Long hallOwnerUid;
|
||||||
|
private String hallAvatar;
|
||||||
|
private String hallName;
|
||||||
|
}
|
@@ -0,0 +1,13 @@
|
|||||||
|
package com.yizhuan.xchat_android_core.module_hall.income.bean;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class LiveTotalIncomeInfo {
|
||||||
|
|
||||||
|
private double total;
|
||||||
|
private List<LiveIncomeInfo> memberIncome;
|
||||||
|
|
||||||
|
}
|
@@ -24,5 +24,5 @@ only_arm64=false
|
|||||||
|
|
||||||
channel_file=channel.txt
|
channel_file=channel.txt
|
||||||
|
|
||||||
version_name=1.1.7
|
version_name=1.2.0
|
||||||
version_code=117
|
version_code=120
|
@@ -55,4 +55,5 @@
|
|||||||
<Littleredbook Enable="false" />
|
<Littleredbook Enable="false" />
|
||||||
<Watermelonvideo Enable="false" />
|
<Watermelonvideo Enable="false" />
|
||||||
<Tiktok Enable="false" />
|
<Tiktok Enable="false" />
|
||||||
|
<Taptap Enable="false" />
|
||||||
</DevInfor>
|
</DevInfor>
|
Reference in New Issue
Block a user