公会个播房收入统计接口对接
This commit is contained in:
@@ -17,6 +17,7 @@ import com.yizhuan.erban.base.BaseMvpActivity;
|
||||
import com.yizhuan.erban.module_hall.hall.view.dialog.TimePickerDialog;
|
||||
import com.yizhuan.erban.module_hall.hall.view.indicator.StatisticsIndicatorAdapter;
|
||||
import com.yizhuan.erban.module_hall.income.ClanIncomeFragment;
|
||||
import com.yizhuan.erban.module_hall.income.SingleRoomIncomeFragment;
|
||||
import com.yizhuan.erban.module_hall.income.presenter.ClanIncomePresenter;
|
||||
import com.yizhuan.erban.module_hall.income.presenter.SingleRoomIncomePresenter;
|
||||
import com.yizhuan.erban.module_hall.income.view.IIncomeStatisticsView;
|
||||
@@ -45,7 +46,7 @@ import butterknife.OnClick;
|
||||
|
||||
@CreatePresenter(SingleRoomIncomePresenter.class)
|
||||
public class SingleRoomIncomeActivity extends BaseMvpActivity<IIncomeStatisticsView, SingleRoomIncomePresenter>
|
||||
implements IIncomeStatisticsView, TimePickerDialog.TimePickerListener, ClanIncomeFragment.DayIncomeFragmentListener {
|
||||
implements IIncomeStatisticsView, TimePickerDialog.TimePickerListener, SingleRoomIncomeFragment.DayIncomeFragmentListener {
|
||||
|
||||
private static final int TYPE_DAY = 0;
|
||||
private static final int TYPE_WEEK = 1;
|
||||
@@ -54,7 +55,7 @@ public class SingleRoomIncomeActivity extends BaseMvpActivity<IIncomeStatisticsV
|
||||
@BindView(R.id.view_pager)
|
||||
ViewPager viewPager;
|
||||
|
||||
List<ClanIncomeFragment> list = new ArrayList<>();
|
||||
List<SingleRoomIncomeFragment> list = new ArrayList<>();
|
||||
@BindView(R.id.indicator)
|
||||
MagicIndicator indicator;
|
||||
|
||||
@@ -77,24 +78,22 @@ public class SingleRoomIncomeActivity extends BaseMvpActivity<IIncomeStatisticsV
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_clan_income);
|
||||
setContentView(R.layout.activity_single_room_income);
|
||||
ButterKnife.bind(this);
|
||||
|
||||
initWhiteTitleBar("收入统计");
|
||||
initTitleBar("收入统计");
|
||||
initIndicator();
|
||||
long clanId = getIntent().getLongExtra(ClanIncomeFragment.FLAG_CLAN_ID, 0);
|
||||
ClanIncomeFragment fragment = ClanIncomeFragment.getInstance(ClanIncomeFragment.TYPE_DAY, clanId);
|
||||
SingleRoomIncomeFragment fragment = SingleRoomIncomeFragment.getInstance(ClanIncomeFragment.TYPE_DAY, clanId);
|
||||
fragment.setmDayIncomeFragmentListener(this);
|
||||
list.add(fragment);
|
||||
|
||||
fragment = ClanIncomeFragment.getInstance(ClanIncomeFragment.TYPE_WEEK, clanId);
|
||||
fragment = SingleRoomIncomeFragment.getInstance(SingleRoomIncomeFragment.TYPE_WEEK, clanId);
|
||||
fragment.setmDayIncomeFragmentListener(this);
|
||||
list.add(fragment);
|
||||
|
||||
viewPager.setAdapter(adapter);
|
||||
|
||||
// initDay();
|
||||
|
||||
}
|
||||
|
||||
private boolean mHasInit = false;
|
||||
|
@@ -11,14 +11,12 @@ 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.presenter.ClanIncomeFragmentPresenter;
|
||||
import com.yizhuan.erban.module_hall.income.adapter.SingleRoomIncomeAdapter;
|
||||
import com.yizhuan.erban.module_hall.income.presenter.SingRoomIncomeFragmentPresenter;
|
||||
import com.yizhuan.erban.module_hall.income.presenter.SingleRoomIncomePresenter;
|
||||
import com.yizhuan.erban.module_hall.income.view.IClanIncomeView;
|
||||
import com.yizhuan.erban.module_hall.income.view.ISingRoomIncomeView;
|
||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.ClanTotalIncomeInfo;
|
||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.SingleRoomTotalIncomeInfo;
|
||||
import com.yizhuan.xchat_android_library.base.factory.CreatePresenter;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
@@ -30,25 +28,17 @@ import butterknife.Unbinder;
|
||||
*/
|
||||
|
||||
@CreatePresenter(SingRoomIncomeFragmentPresenter.class)
|
||||
public class SingleRoomIncomeFragment extends BaseMvpFragment<ISingRoomIncomeView,SingRoomIncomeFragmentPresenter> implements ISingRoomIncomeView {
|
||||
public class SingleRoomIncomeFragment extends BaseMvpFragment<ISingRoomIncomeView, SingRoomIncomeFragmentPresenter> implements ISingRoomIncomeView {
|
||||
|
||||
public static final int TYPE_DAY = 0;
|
||||
public static final int TYPE_WEEK = 1;
|
||||
public static final int TYPE_MONTH = 2;
|
||||
public static final String FLAG_DAY_TYPE = "dayType";
|
||||
public static final String FLAG_CLAN_ID = "clanId";
|
||||
|
||||
private int mDayType;
|
||||
private ClanIncomeAdapter mIncomeAdapter;
|
||||
|
||||
private DayIncomeFragmentListener mDayIncomeFragmentListener;
|
||||
|
||||
Unbinder unbinder;
|
||||
|
||||
@BindView(R.id.recycler_view)
|
||||
RecyclerView recyclerView;
|
||||
|
||||
private long clanId;
|
||||
private SingleRoomIncomeAdapter mIncomeAdapter;
|
||||
private DayIncomeFragmentListener mDayIncomeFragmentListener;
|
||||
|
||||
public static SingleRoomIncomeFragment getInstance(int dayType, long clanId) {
|
||||
SingleRoomIncomeFragment fragment = new SingleRoomIncomeFragment();
|
||||
@@ -62,7 +52,7 @@ public class SingleRoomIncomeFragment extends BaseMvpFragment<ISingRoomIncomeVie
|
||||
@Override
|
||||
public void onFindViews() {
|
||||
|
||||
mIncomeAdapter = new ClanIncomeAdapter();
|
||||
mIncomeAdapter = new SingleRoomIncomeAdapter();
|
||||
recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
|
||||
recyclerView.setAdapter(mIncomeAdapter);
|
||||
}
|
||||
@@ -76,8 +66,7 @@ public class SingleRoomIncomeFragment extends BaseMvpFragment<ISingRoomIncomeVie
|
||||
}
|
||||
|
||||
public void getIncomeTotal(String startTimeStr, String endTimeStr) {
|
||||
clanId = getArguments().getLong(FLAG_CLAN_ID);
|
||||
getMvpPresenter().incomeTotal(clanId,startTimeStr, endTimeStr);
|
||||
getMvpPresenter().incomeTotal(startTimeStr, endTimeStr);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -89,12 +78,6 @@ public class SingleRoomIncomeFragment extends BaseMvpFragment<ISingRoomIncomeVie
|
||||
return mView;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onInitArguments(Bundle bundle) {
|
||||
if (bundle != null) {
|
||||
mDayType = bundle.getInt(FLAG_DAY_TYPE, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRootLayoutId() {
|
||||
@@ -118,13 +101,14 @@ public class SingleRoomIncomeFragment extends BaseMvpFragment<ISingRoomIncomeVie
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incomeTotalSuccess(ClanTotalIncomeInfo clanTotalIncomeInfo) {
|
||||
public void incomeTotalSuccess(SingleRoomTotalIncomeInfo incomeInfo) {
|
||||
hideStatus();
|
||||
setTotal(clanTotalIncomeInfo.getTotal());
|
||||
setTotal(incomeInfo.getTotalDiamond());
|
||||
|
||||
if (clanTotalIncomeInfo.getIncome() != null) {
|
||||
mIncomeAdapter.setNewData(clanTotalIncomeInfo.getIncome());
|
||||
if (!ListUtils.isListEmpty(incomeInfo.getIncomes())) {
|
||||
mIncomeAdapter.setNewData(incomeInfo.getIncomes());
|
||||
} else {
|
||||
mIncomeAdapter.setNewData(null);
|
||||
showNoData();
|
||||
}
|
||||
|
||||
|
@@ -0,0 +1,26 @@
|
||||
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.xchat_android_core.module_hall.income.bean.SingleRoomIncomeInfo;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class SingleRoomIncomeAdapter extends BaseQuickAdapter<SingleRoomIncomeInfo, BaseViewHolder> {
|
||||
|
||||
public SingleRoomIncomeAdapter() {
|
||||
super(R.layout.item_single_room_income);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void convert(@NotNull BaseViewHolder helper, SingleRoomIncomeInfo item) {
|
||||
helper.setText(R.id.tv_author_income, item.getAnchorDiamondNum())
|
||||
.setText(R.id.tv_room_income, item.getRoomDiamondNum())
|
||||
.setText(R.id.tv_user_id, "ID:" + item.getErbanNo())
|
||||
.setText(R.id.tv_hall_number, String.valueOf(helper.getLayoutPosition() + 1))
|
||||
.setText(R.id.tv_user_name, item.getNick());
|
||||
ImageLoadUtils.loadImage(mContext, item.getAvatar(), helper.getView(R.id.iv_hall_avatar));
|
||||
}
|
||||
}
|
@@ -1,10 +1,9 @@
|
||||
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.ISingRoomIncomeView;
|
||||
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.SingleRoomTotalIncomeInfo;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -13,20 +12,20 @@ import io.reactivex.disposables.Disposable;
|
||||
|
||||
public class SingRoomIncomeFragmentPresenter extends BaseMvpPresenter<ISingRoomIncomeView> {
|
||||
|
||||
public void incomeTotal(long clanId,String startTimeStr, String endTimeStr) {
|
||||
IncomeModel.get().getClanIncomeList(clanId, startTimeStr, endTimeStr)
|
||||
public void incomeTotal(String startTimeStr, String endTimeStr) {
|
||||
IncomeModel.get().getSingleRoomIncomeList(startTimeStr, endTimeStr)
|
||||
.compose(bindToLifecycle())
|
||||
.subscribe(new SingleObserver<ClanTotalIncomeInfo>() {
|
||||
.subscribe(new SingleObserver<SingleRoomTotalIncomeInfo>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(@NotNull ClanTotalIncomeInfo clanTotalIncomeInfo) {
|
||||
public void onSuccess(@NotNull SingleRoomTotalIncomeInfo incomeInfo) {
|
||||
if (getMvpView() == null)
|
||||
return;
|
||||
getMvpView().incomeTotalSuccess(clanTotalIncomeInfo);
|
||||
getMvpView().incomeTotalSuccess(incomeInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -1,10 +1,10 @@
|
||||
package com.yizhuan.erban.module_hall.income.view;
|
||||
|
||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.ClanTotalIncomeInfo;
|
||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.SingleRoomTotalIncomeInfo;
|
||||
import com.yizhuan.xchat_android_library.base.IMvpBaseView;
|
||||
|
||||
public interface ISingRoomIncomeView extends IMvpBaseView {
|
||||
|
||||
void incomeTotalSuccess(ClanTotalIncomeInfo clanTotalIncomeInfo);
|
||||
void incomeTotalSuccess(SingleRoomTotalIncomeInfo incomeInfo);
|
||||
void incomeTotalFail(String message);
|
||||
}
|
||||
|
@@ -0,0 +1,188 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical">
|
||||
|
||||
<com.yizhuan.erban.base.TitleBar
|
||||
android:id="@+id/title_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
</com.yizhuan.erban.base.TitleBar>
|
||||
|
||||
<com.yizhuan.erban.ui.widget.magicindicator.MagicIndicator
|
||||
android:id="@+id/indicator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
android:layout_marginEnd="@dimen/dp_30" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="81dp"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_marginEnd="@dimen/dp_15"
|
||||
android:background="@drawable/bg_income">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_year"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_15"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:textColor="@color/white_transparent_80"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="2019年" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_day_group"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="31dp"
|
||||
android:layout_below="@id/tv_year"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="15dp"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_month_day_start"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
tools:text="01月01日" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_month_day_end"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:visibility="gone"
|
||||
tools:text="01月01日" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_date_arrow"
|
||||
android:layout_width="11dp"
|
||||
android:layout_height="7dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:layout_marginBottom="21dp"
|
||||
android:layout_toEndOf="@id/ll_day_group"
|
||||
android:src="@drawable/icon_date_arrow" />
|
||||
|
||||
<View
|
||||
android:id="@+id/view_line"
|
||||
android:layout_width="2px"
|
||||
android:layout_height="31dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="@dimen/dp_18"
|
||||
android:layout_marginBottom="@dimen/dp_9"
|
||||
android:layout_toEndOf="@id/iv_date_arrow"
|
||||
android:background="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_19"
|
||||
android:layout_marginTop="@dimen/dp_15"
|
||||
android:layout_toEndOf="@id/view_line"
|
||||
android:text="@string/all_income"
|
||||
android:textColor="@color/white_transparent_80"
|
||||
android:textSize="@dimen/sp_12" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_total"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginStart="@dimen/dp_19"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:layout_toEndOf="@id/view_line"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="24dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="33dp"
|
||||
android:layout_marginTop="25dp"
|
||||
android:background="@color/color_F5F5F5"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="排名"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="13dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="头像"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="13dp" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:gravity="center"
|
||||
android:text="昵称"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="13dp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_author_income"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="主播(钻石)"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room_income"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:gravity="center"
|
||||
android:text="房间(钻石)"
|
||||
android:textColor="@color/color_999999"
|
||||
android:textSize="12sp" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.viewpager.widget.ViewPager
|
||||
android:id="@+id/view_pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</androidx.viewpager.widget.ViewPager>
|
||||
</LinearLayout>
|
@@ -0,0 +1,106 @@
|
||||
<?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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="15dp"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:background="@drawable/bottom_line"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_hall_number"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="1"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="15sp" />
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_hall_avatar"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/default_cover" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="90dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="15dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:lines="1"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14sp"
|
||||
tools:text="忘忘忘忘忧阁忧阁忧阁忧阁" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_id"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:fontFamily="@string/sans_serif"
|
||||
android:textColor="@color/color_666666"
|
||||
android:textSize="14sp"
|
||||
tools:text="ID:666666" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_author_income"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="123456789" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_room_income"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_333333"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="1234" />
|
||||
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_gravity="bottom"
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginEnd="15dp"
|
||||
android:background="#FFF6F7F9" />
|
||||
|
||||
</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.IncomeGiftInfo;
|
||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.IncomeTotalInfo;
|
||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.SingleRoomTotalIncomeInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -15,7 +16,7 @@ public interface IIncomeModel extends IModel {
|
||||
|
||||
Single<ClanTotalIncomeInfo> getClanIncomeList(long clanId, String startTimeStr, String endTimeStr);
|
||||
|
||||
Single<ClanTotalIncomeInfo> getSingleRoomIncomeList(long hallId, String startTime, String endTime);
|
||||
Single<SingleRoomTotalIncomeInfo> getSingleRoomIncomeList(String startTime, String endTime);
|
||||
|
||||
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.IncomeGiftInfo;
|
||||
import com.yizhuan.xchat_android_core.module_hall.income.bean.IncomeTotalInfo;
|
||||
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_library.net.rxnet.RxNet;
|
||||
|
||||
@@ -56,12 +57,8 @@ public class IncomeModel extends BaseModel implements IIncomeModel {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Single<ClanTotalIncomeInfo> getSingleRoomIncomeList(long hallId, String startTime, String endTime) {
|
||||
return api.getSingleRoomIncomeList(
|
||||
AuthModel.get().getCurrentUid(),
|
||||
hallId == 0 ? null : String.valueOf(hallId),
|
||||
startTime,
|
||||
endTime)
|
||||
public Single<SingleRoomTotalIncomeInfo> getSingleRoomIncomeList(String startTime, String endTime) {
|
||||
return api.getSingleRoomIncomeList(startTime, endTime)
|
||||
.compose(RxHelper.handleSchAndExce())
|
||||
.compose(RxHelper.handleBeanData());
|
||||
}
|
||||
@@ -87,12 +84,15 @@ public class IncomeModel extends BaseModel implements IIncomeModel {
|
||||
* 收入统计
|
||||
*/
|
||||
@POST("/income/incomeTotal")
|
||||
Single<ServiceResult<IncomeTotalInfo>> incomeTotal(@Query("uid") long uid, @Query("hallId") long hallId,
|
||||
Single<ServiceResult<IncomeTotalInfo>> incomeTotal(@Query("uid") long uid,
|
||||
@Query("hallId") long hallId,
|
||||
@Query("startTimeStr") String startTimeStr,
|
||||
@Query("endTimeStr") String endTimeStr);
|
||||
|
||||
@POST("/income/incomeDetail")
|
||||
Single<ServiceResult<List<IncomeGiftInfo>>> incomeDetail(@Query("uid") long uid, @Query("memberId") long memberId, @Query("hallId") long hallId,
|
||||
Single<ServiceResult<List<IncomeGiftInfo>>> incomeDetail(@Query("uid") long uid,
|
||||
@Query("memberId") long memberId,
|
||||
@Query("hallId") long hallId,
|
||||
@Query("startTimeStr") String startTimeStr,
|
||||
@Query("endTimeStr") String endTimeStr);
|
||||
|
||||
@@ -100,19 +100,18 @@ public class IncomeModel extends BaseModel implements IIncomeModel {
|
||||
* 获取家族收入列表
|
||||
*/
|
||||
@GET("/clan/income/totalList")
|
||||
Single<ServiceResult<ClanTotalIncomeInfo>> getClanIncomeList(@Query("uid") long uid, @Query("clanId") long clanId,
|
||||
Single<ServiceResult<ClanTotalIncomeInfo>> getClanIncomeList(@Query("uid") long uid,
|
||||
@Query("clanId") long clanId,
|
||||
@Query("startTime") String startTime,
|
||||
@Query("endTime") String endTime);
|
||||
|
||||
/**
|
||||
* 获取家族收入列表
|
||||
* 获取个播房收入列表
|
||||
*/
|
||||
@FormUrlEncoded
|
||||
@POST("income/singleroom/incomeTotal")
|
||||
Single<ServiceResult<ClanTotalIncomeInfo>> getSingleRoomIncomeList(@Field("uid") long uid,
|
||||
@Field("hallId") String hallId,
|
||||
@Field("startTime") String startTime,
|
||||
@Field("endTime") String endTime);
|
||||
@POST("/income/singleroom/incomeTotal")
|
||||
Single<ServiceResult<SingleRoomTotalIncomeInfo>> getSingleRoomIncomeList(@Field("startTime") String startTime,
|
||||
@Field("endTime") String endTime);
|
||||
}
|
||||
|
||||
private static final class Helper {
|
||||
|
@@ -0,0 +1,15 @@
|
||||
package com.yizhuan.xchat_android_core.module_hall.income.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SingleRoomIncomeInfo implements Serializable {
|
||||
private String erbanNo;
|
||||
private String uid;
|
||||
private String nick;
|
||||
private String avatar;
|
||||
private String roomDiamondNum;
|
||||
private String anchorDiamondNum;
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
package com.yizhuan.xchat_android_core.module_hall.income.bean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SingleRoomTotalIncomeInfo {
|
||||
|
||||
private double totalDiamond;
|
||||
private List<SingleRoomIncomeInfo> incomes;
|
||||
|
||||
}
|
Reference in New Issue
Block a user