[Modify]房主金币明细修改
This commit is contained in:
@@ -2,10 +2,7 @@ package com.yizhuan.erban.earn
|
||||
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.yizhuan.erban.base.BaseViewModel
|
||||
import com.yizhuan.xchat_android_core.earn.bean.ClanHallMemberIncomeTotalInfo
|
||||
import com.yizhuan.xchat_android_core.earn.bean.ConfigWithdrawInfo
|
||||
import com.yizhuan.xchat_android_core.earn.bean.EarnRecordInfo
|
||||
import com.yizhuan.xchat_android_core.earn.bean.GoldToDiamondInfo
|
||||
import com.yizhuan.xchat_android_core.earn.bean.*
|
||||
import com.yizhuan.xchat_android_core.earn.model.EarnModel
|
||||
import com.yizhuan.xchat_android_library.utils.TimeUtils
|
||||
import java.util.*
|
||||
@@ -41,6 +38,11 @@ class EarnRecordViewModel : BaseViewModel() {
|
||||
val memberSettleLiveData: MutableLiveData<ClanHallMemberIncomeTotalInfo?> =
|
||||
_memberSettleLiveData
|
||||
|
||||
//金幣明細
|
||||
private val _goldRecordLiveData = MutableLiveData<GoldRecordInfo?>()
|
||||
val goldRecordLiveData: MutableLiveData<GoldRecordInfo?> =
|
||||
_goldRecordLiveData
|
||||
|
||||
private var weekFirstDay: String = ""
|
||||
private var weekLastDay: String = ""
|
||||
|
||||
@@ -199,4 +201,16 @@ class EarnRecordViewModel : BaseViewModel() {
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* 结算明细
|
||||
*/
|
||||
fun getHallMemberTotalList(startTime: String, endTime: String) {
|
||||
safeLaunch(
|
||||
true,
|
||||
block = {
|
||||
_goldRecordLiveData.value = EarnModel.getHallMemberTotalList(startTime, endTime)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
}
|
@@ -109,9 +109,6 @@ class GoldDetailActivity : BaseViewBindingActivity<ActivityGoldDetailBinding>(),
|
||||
}
|
||||
|
||||
mGoldRoomAdapter.setOnItemClickListener { adapter, view, position ->
|
||||
// val settlementList =
|
||||
// settlementList?.filter { it.hallName == mGoldRoomAdapter.data[position].hallName }
|
||||
// ?.toMutableList()
|
||||
val settlementList: HallMemberGoldFlowTotalInfo? =
|
||||
settlementList?.get(mGoldRoomAdapter.data[position].hallId)
|
||||
mGoldDetailAdapter.setNewData(settlementList?.hallMember)
|
||||
@@ -131,9 +128,6 @@ class GoldDetailActivity : BaseViewBindingActivity<ActivityGoldDetailBinding>(),
|
||||
settlementList = it.hallMemberMap
|
||||
mGoldRoomAdapter.setNewData(it.hallVoList)
|
||||
if (it.hallVoList.isNotEmpty()) {
|
||||
// val settlementList =
|
||||
// settlementList?.filter { settlementList -> settlementList.hallName == it.hallVoList[0].hallId }
|
||||
// ?.toMutableList()
|
||||
val settlementList: HallMemberGoldFlowTotalInfo? =
|
||||
settlementList?.get(it.hallVoList[0].hallId)
|
||||
rvDelegate.setNewData(settlementList?.hallMember)
|
||||
|
@@ -11,12 +11,15 @@ class GoldDetailAdapter :
|
||||
BaseQuickAdapter<HallMemberGoldFlowInfo, BaseViewHolder>(R.layout.item_gold_detail) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: HallMemberGoldFlowInfo) {
|
||||
helper.setText(R.id.tv_user_name, item.gnick ?: "--")
|
||||
helper.setText(R.id.tv_user_name, item.nick ?: "--")
|
||||
.setText(R.id.tv_have_exchange, item.exchangeGolds.toString())
|
||||
.setText(R.id.tv_settlement, item.remainGolds.toString())
|
||||
.setText(R.id.tv_diamond_pay_record, FormatUtils.formatToShortDown(item.giftDiamonds))
|
||||
.setText(R.id.tv_have_change, item.giftGolds.toString())
|
||||
ImageLoadUtilsV2.loadAvatar(helper.getView(R.id.iv_user_avatar), item.gavatar)
|
||||
.setText(
|
||||
R.id.tv_have_change,
|
||||
mContext.getString(R.string.have_converted, item.giftGolds.toString())
|
||||
)
|
||||
ImageLoadUtilsV2.loadAvatar(helper.getView(R.id.iv_user_avatar), item.avatar)
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,26 @@
|
||||
package com.yizhuan.erban.earn.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.ImageLoadUtilsV2
|
||||
import com.yizhuan.xchat_android_core.earn.bean.HallMemberGoldFlowInfo
|
||||
import com.yizhuan.xchat_android_library.utils.FormatUtils
|
||||
|
||||
class GoldRecordAdapter :
|
||||
BaseQuickAdapter<HallMemberGoldFlowInfo, BaseViewHolder>(R.layout.item_gold_record) {
|
||||
|
||||
override fun convert(helper: BaseViewHolder, item: HallMemberGoldFlowInfo) {
|
||||
helper.setText(R.id.tv_user_name, item.nick ?: "--")
|
||||
.setText(R.id.tv_have_exchange, item.exchangeGolds.toString())
|
||||
.setText(R.id.tv_settlement, item.remainGolds.toString())
|
||||
.setText(R.id.tv_diamond_pay_record, FormatUtils.formatToShortDown(item.giftDiamonds))
|
||||
.setText(
|
||||
R.id.tv_have_change,
|
||||
mContext.getString(R.string.have_converted, item.giftGolds.toString())
|
||||
)
|
||||
.setText(R.id.tv_pos, (helper.layoutPosition+1).toString())
|
||||
ImageLoadUtilsV2.loadAvatar(helper.getView(R.id.iv_user_avatar), item.avatar)
|
||||
}
|
||||
|
||||
}
|
@@ -100,7 +100,7 @@
|
||||
android:background="@color/color_F0F5F6"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingStart="@dimen/dp_20"
|
||||
android:paddingEnd="@dimen/dp_20">
|
||||
android:paddingEnd="@dimen/dp_10">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvBelongRoom"
|
||||
@@ -114,7 +114,7 @@
|
||||
<View
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1" />
|
||||
android:layout_weight="2" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@@ -207,14 +207,13 @@
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerViewRoom"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="2"
|
||||
android:layout_weight="1.8"
|
||||
android:background="@color/color_F0F5F6"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
@@ -223,7 +222,7 @@
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="8">
|
||||
android:layout_weight="8.2">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/mRecyclerView"
|
||||
|
@@ -4,13 +4,14 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="@dimen/dp_16"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
tools:background="@color/color_white">
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_user_avatar"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:layout_width="34dp"
|
||||
android:layout_height="34dp"
|
||||
android:src="@drawable/default_cover"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tv_user_name"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_user_name"
|
||||
|
106
app/src/main/res/layout/item_gold_record.xml
Normal file
106
app/src/main/res/layout/item_gold_record.xml
Normal file
@@ -0,0 +1,106 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout 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"
|
||||
android:paddingTop="@dimen/dp_12"
|
||||
android:paddingBottom="@dimen/dp_12"
|
||||
tools:background="@color/color_white">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pos"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="1" />
|
||||
|
||||
<com.yizhuan.erban.common.widget.CircleImageView
|
||||
android:id="@+id/iv_user_avatar"
|
||||
android:layout_width="@dimen/dp_45"
|
||||
android:layout_height="@dimen/dp_45"
|
||||
android:src="@drawable/default_cover"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tv_user_name"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_pos"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_user_name"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_5"
|
||||
android:layout_marginTop="3dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:lines="1"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_diamond_pay_record"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_pos"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_user_avatar"
|
||||
tools:text="@string/layout_item_clan_income_01" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_diamond_pay_record"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_user_avatar"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_have_exchange"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_user_name"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_user_avatar"
|
||||
tools:text="1,000,000,000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_have_exchange"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_user_avatar"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_settlement"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_diamond_pay_record"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_user_avatar"
|
||||
tools:text="1,000,000,000" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_have_change"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:text="@string/have_converted"
|
||||
android:textColor="@color/color_B3B3C3"
|
||||
android:textSize="@dimen/sp_10"
|
||||
app:layout_constraintEnd_toEndOf="@+id/tv_have_exchange"
|
||||
app:layout_constraintStart_toStartOf="@+id/tv_have_exchange"
|
||||
app:layout_constraintTop_toBottomOf="@+id/tv_have_exchange" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_settlement"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/color_DD9E0B"
|
||||
android:textSize="@dimen/sp_12"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/iv_user_avatar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_have_exchange"
|
||||
app:layout_constraintTop_toTopOf="@+id/iv_user_avatar"
|
||||
tools:text="1,000,000,000" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -48,11 +48,11 @@ import butterknife.OnClick;
|
||||
|
||||
@CreatePresenter(IncomeStatisticsPresenter.class)
|
||||
public class IncomeStatisticsActivity extends BaseMvpActivity<IIncomeStatisticsView, IncomeStatisticsPresenter>
|
||||
implements IIncomeStatisticsView, TimePickerDialog.TimePickerListener, DayIncomeFragment.DayIncomeFragmentListener {
|
||||
implements IIncomeStatisticsView, TimePickerDialog.TimePickerListener, DayIncomeFragment.DayIncomeFragmentListener, GoldRecordFragment.DayIncomeFragmentListener {
|
||||
|
||||
private static final int TYPE_DAY = 0;
|
||||
private static final int TYPE_WEEK = 1;
|
||||
private static final int TYPE_MONTH = 2;
|
||||
private static final int TYPE_GOLD = 2;
|
||||
|
||||
@BindView(R.id.view_pager)
|
||||
ViewPager viewPager;
|
||||
@@ -103,8 +103,10 @@ public class IncomeStatisticsActivity extends BaseMvpActivity<IIncomeStatisticsV
|
||||
list.add(fragment);
|
||||
|
||||
GoldRecordFragment goldRecordFragment = GoldRecordFragment.getInstance(hallId);
|
||||
goldRecordFragment.setmDayIncomeFragmentListener(this);
|
||||
list.add(goldRecordFragment);
|
||||
|
||||
viewPager.setOffscreenPageLimit(3);
|
||||
viewPager.setAdapter(adapter);
|
||||
|
||||
}
|
||||
@@ -175,9 +177,16 @@ public class IncomeStatisticsActivity extends BaseMvpActivity<IIncomeStatisticsV
|
||||
day = presenter.getDayFormat();
|
||||
getIncomeTotal(day, presenter.getmStartTimeStr(), presenter.getmEndTimeStr());
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
llDayList.setVisibility(View.GONE);
|
||||
llGoldList.setVisibility(View.VISIBLE);
|
||||
|
||||
mCurrentType = position;
|
||||
IncomeStatisticsPresenter presenter = getMvpPresenter();
|
||||
String day;
|
||||
|
||||
day = presenter.getWeekChooseDayFormat();
|
||||
getIncomeTotal(day, presenter.getWeekFirstDay(), presenter.getWeekLastDay());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,8 +217,8 @@ public class IncomeStatisticsActivity extends BaseMvpActivity<IIncomeStatisticsV
|
||||
case R.id.ll_day_group:
|
||||
if (CommonUtils.isFastDoubleClick(500)) return;
|
||||
IncomeStatisticsPresenter presenter = getMvpPresenter();
|
||||
boolean isWeek = mCurrentType == TYPE_WEEK;
|
||||
boolean isMonth = mCurrentType == TYPE_MONTH;
|
||||
boolean isWeek = mCurrentType == TYPE_WEEK || mCurrentType == TYPE_GOLD;
|
||||
boolean isMonth = false;
|
||||
TimePickerDialog.Builder builder = new TimePickerDialog.Builder()
|
||||
.setType(Type.YEAR_MONTH_DAY)
|
||||
.setTitleStringId("")
|
||||
@@ -244,6 +253,11 @@ public class IncomeStatisticsActivity extends BaseMvpActivity<IIncomeStatisticsV
|
||||
presenter.setWeekFirstDay(weekFirstDay);
|
||||
presenter.setWeekLastDay(weekLastDay);
|
||||
getIncomeTotal("", weekFirstDay, weekLastDay);
|
||||
} else if (mCurrentType == TYPE_GOLD){
|
||||
presenter.setmWeekChooseDay(chooseTime);
|
||||
presenter.setWeekFirstDay(weekFirstDay);
|
||||
presenter.setWeekLastDay(weekLastDay);
|
||||
getIncomeTotal("", weekFirstDay, weekLastDay);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -271,6 +285,17 @@ public class IncomeStatisticsActivity extends BaseMvpActivity<IIncomeStatisticsV
|
||||
tvMonthDayEnd.setText(String.format(getString(R.string.format_month_day), weekLastArray[1], weekLastArray[2]));
|
||||
DayIncomeFragment dayIncomeFragment = (DayIncomeFragment) list.get(1);
|
||||
dayIncomeFragment.getIncomeTotal(hallId, weekFirstDay, weekLastDay);
|
||||
} else if (mCurrentType == TYPE_GOLD) {
|
||||
String[] weekFirstArray = weekFirstDay.split("-");
|
||||
String[] weekLastArray = weekLastDay.split("-");
|
||||
|
||||
tvYear.setText(String.format(getString(R.string.format_year), weekFirstArray[0]));
|
||||
|
||||
tvMonthDayEnd.setVisibility(View.VISIBLE);
|
||||
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]));
|
||||
GoldRecordFragment goldRecordFragment = (GoldRecordFragment) list.get(2);
|
||||
goldRecordFragment.getIncomeTotal(hallId, weekFirstDay, weekLastDay);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,23 +1,26 @@
|
||||
package com.yizhuan.erban.module_hall.income
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.fragment.app.viewModels
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.chad.library.adapter.base.BaseQuickAdapter
|
||||
import com.yizhuan.erban.R
|
||||
import com.yizhuan.erban.association.AssociationViewModel
|
||||
import com.yizhuan.erban.association.adapter.AssociationAdapter
|
||||
import com.yizhuan.erban.base.BaseViewBindingFragment
|
||||
import com.yizhuan.erban.common.EmptyViewHelper
|
||||
import com.yizhuan.erban.databinding.FragmentAssociationBinding
|
||||
import com.yizhuan.erban.earn.EarnRecordViewModel
|
||||
import com.yizhuan.erban.earn.adapter.GoldDetailAdapter
|
||||
import com.yizhuan.erban.earn.adapter.GoldRecordAdapter
|
||||
import com.yizhuan.erban.module_hall.hall.activity.ModuleClanActivity
|
||||
import com.yizhuan.erban.ui.utils.RVDelegate
|
||||
import com.yizhuan.xchat_android_core.association.ClanListInfo
|
||||
import com.yizhuan.xchat_android_core.earn.bean.GoldRecordInfo
|
||||
import com.yizhuan.xchat_android_core.earn.bean.HallMemberGoldFlowInfo
|
||||
import com.yizhuan.xchat_android_core.module_hall.hall.HallModel
|
||||
import com.yizhuan.xchat_android_core.utils.net.BeanObserver
|
||||
import com.yizhuan.xchat_android_core.utils.net.RxHelper
|
||||
import com.yizhuan.xchat_android_library.common.util.Logger
|
||||
import com.yizhuan.xchat_android_library.utils.ResUtil
|
||||
import java.math.BigDecimal
|
||||
|
||||
/**
|
||||
* 金币明细
|
||||
@@ -36,46 +39,18 @@ class GoldRecordFragment : BaseViewBindingFragment<FragmentAssociationBinding>()
|
||||
}
|
||||
}
|
||||
|
||||
private lateinit var associationAdapter: AssociationAdapter
|
||||
private lateinit var rvDelegate: RVDelegate<ClanListInfo>
|
||||
private val mGoldDetailAdapter: GoldRecordAdapter by lazy { GoldRecordAdapter() }
|
||||
private lateinit var rvDelegate: RVDelegate<HallMemberGoldFlowInfo>
|
||||
|
||||
private val associationViewModel: AssociationViewModel by viewModels()
|
||||
private val earnRecordModel: EarnRecordViewModel by viewModels()
|
||||
|
||||
private var mDayIncomeFragmentListener: DayIncomeFragmentListener? = null
|
||||
|
||||
private var mStartTimeStr = ""
|
||||
private var mEndTimeStr = ""
|
||||
|
||||
override fun init() {
|
||||
associationAdapter = AssociationAdapter()
|
||||
associationAdapter.onItemClickListener =
|
||||
BaseQuickAdapter.OnItemClickListener { _: BaseQuickAdapter<*, *>?, _: View?, position: Int ->
|
||||
val info = associationAdapter.getItem(position)
|
||||
if (info != null && info.clanElderUid != 0L) {
|
||||
ModuleClanActivity.start(context, info.clanElderUid)
|
||||
}
|
||||
}
|
||||
associationAdapter.setOnItemChildClickListener { adapter, view, position ->
|
||||
val bean = associationAdapter.getItem(position)
|
||||
bean?.let {
|
||||
if(it.applyBtnStatus == 2){
|
||||
toast(getString(R.string.can_not_apply_3_day))
|
||||
return@let
|
||||
}
|
||||
dialogManager.showProgressDialog(context)
|
||||
HallModel.get().applyJoinClan(it.clanId.toLong())
|
||||
.compose(RxHelper.bindFragment(this))
|
||||
.subscribe(object : BeanObserver<String?>() {
|
||||
override fun onErrorMsg(error: String) {
|
||||
dialogManager.dismissDialog()
|
||||
toast(error)
|
||||
}
|
||||
|
||||
override fun onSuccess(s: String) {
|
||||
dialogManager.dismissDialog()
|
||||
it.applyBtnStatus = 2
|
||||
associationAdapter.notifyItemChanged(position)
|
||||
toast(s)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
rvDelegate = RVDelegate.Builder<ClanListInfo>()
|
||||
rvDelegate = RVDelegate.Builder<HallMemberGoldFlowInfo>()
|
||||
.setLayoutManager(LinearLayoutManager(context))
|
||||
.setRecyclerView(binding.recyclerView)
|
||||
.setEmptyView(
|
||||
@@ -84,14 +59,32 @@ class GoldRecordFragment : BaseViewBindingFragment<FragmentAssociationBinding>()
|
||||
ResUtil.getString(R.string.association_list_empty)
|
||||
)
|
||||
)
|
||||
.setAdapter(associationAdapter)
|
||||
.setAdapter(mGoldDetailAdapter)
|
||||
.build()
|
||||
|
||||
associationViewModel.clanListLiveData.observe(viewLifecycleOwner) {
|
||||
rvDelegate.setNewData(it)
|
||||
earnRecordModel.goldRecordLiveData.observe(viewLifecycleOwner) {
|
||||
it?.total?.let { it1 -> setTotal(it1) }
|
||||
rvDelegate.setNewData(it?.hallMember)
|
||||
}
|
||||
|
||||
associationViewModel.getClanList()
|
||||
}
|
||||
|
||||
fun getIncomeTotal(hallId: Long, startTimeStr: String, endTimeStr: String) {
|
||||
mStartTimeStr = startTimeStr
|
||||
mEndTimeStr = endTimeStr
|
||||
earnRecordModel.getHallMemberTotalList(startTimeStr, endTimeStr)
|
||||
}
|
||||
|
||||
private fun setTotal(total: Long) {
|
||||
mDayIncomeFragmentListener?.setTotal(total)
|
||||
}
|
||||
|
||||
fun setmDayIncomeFragmentListener(mDayIncomeFragmentListener: DayIncomeFragmentListener) {
|
||||
this.mDayIncomeFragmentListener = mDayIncomeFragmentListener
|
||||
}
|
||||
|
||||
interface DayIncomeFragmentListener {
|
||||
fun setTotal(total: Long)
|
||||
}
|
||||
|
||||
}
|
@@ -1,44 +1,45 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="68dp"
|
||||
tools:background="@color/bg_normal_1c1b22">
|
||||
|
||||
<!--<TextView-->
|
||||
<!--android:id="@+id/tv_row_num"-->
|
||||
<!--android:layout_width="24dp"-->
|
||||
<!--android:layout_height="wrap_content"-->
|
||||
<!--android:gravity="center"-->
|
||||
<!--android:layout_marginStart="20dp"-->
|
||||
<!--android:layout_centerVertical="true"-->
|
||||
<!--tools:text="1" />-->
|
||||
|
||||
<com.yizhuan.erban.utils.FontTextView
|
||||
android:id="@+id/tv_row_num"
|
||||
android:layout_width="24dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="20dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/text_secondary_4f516a"
|
||||
android:textSize="15sp"
|
||||
tools:text="1" />
|
||||
tools:text="1"
|
||||
android:layout_marginStart="@dimen/dp_24"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_avatar"
|
||||
android:layout_width="43dp"
|
||||
android:layout_height="43dp"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="58dp"
|
||||
android:layout_width="35dp"
|
||||
android:layout_height="35dp"
|
||||
android:layout_marginStart="@dimen/dp_30"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintEnd_toStartOf="@+id/ll_message"
|
||||
app:layout_constraintStart_toEndOf="@+id/tv_row_num"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:src="@drawable/default_avatar" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_message"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="130dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/tv_gold"
|
||||
app:layout_constraintStart_toEndOf="@+id/iv_avatar"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
@@ -46,36 +47,42 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:maxLength="6"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textSize="14dp"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_14"
|
||||
tools:text="@string/layout_item_income_01" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_num"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/text_secondary_4f516a"
|
||||
android:textSize="12dp"
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_12"
|
||||
tools:text="@string/layout_item_income_02" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_gold"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="234dp"
|
||||
android:textColor="@color/text_normal_c6c6e9"
|
||||
android:textSize="16dp"
|
||||
tools:text="@string/layout_item_income_03" />
|
||||
android:textColor="@color/color_1F1A4E"
|
||||
android:textSize="@dimen/sp_15"
|
||||
android:gravity="end"
|
||||
app:layout_constraintEnd_toStartOf="@+id/iv_arrow"
|
||||
app:layout_constraintStart_toEndOf="@+id/ll_message"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
tools:text="1000" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_arrow"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:padding="15dp"
|
||||
android:padding="@dimen/dp_12"
|
||||
android:layout_marginEnd="@dimen/dp_12"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
android:src="@drawable/arrow_right" />
|
||||
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
@@ -0,0 +1,10 @@
|
||||
package com.yizhuan.xchat_android_core.earn.bean
|
||||
|
||||
import lombok.Data
|
||||
import java.math.BigDecimal
|
||||
|
||||
@Data
|
||||
data class GoldRecordInfo(
|
||||
val total: Long,
|
||||
val hallMember: List<HallMemberGoldFlowInfo>
|
||||
)
|
@@ -6,8 +6,8 @@ import lombok.Data
|
||||
data class HallMemberGoldFlowInfo(
|
||||
val uid: Long,
|
||||
val erbanNo: Long,
|
||||
val gnick: String? = null,
|
||||
val gavatar: String? = null,
|
||||
val nick: String? = null,
|
||||
val avatar: String? = null,
|
||||
val hallId: Long,
|
||||
val giftDiamonds: Double,//钻石
|
||||
val giftGolds: Double,//金币收益
|
||||
|
@@ -2,10 +2,7 @@ package com.yizhuan.xchat_android_core.earn.model
|
||||
|
||||
import com.yizhuan.xchat_android_core.base.BaseModel
|
||||
import com.yizhuan.xchat_android_core.bean.response.ServiceResult
|
||||
import com.yizhuan.xchat_android_core.earn.bean.ClanHallMemberIncomeTotalInfo
|
||||
import com.yizhuan.xchat_android_core.earn.bean.ConfigWithdrawInfo
|
||||
import com.yizhuan.xchat_android_core.earn.bean.EarnRecordInfo
|
||||
import com.yizhuan.xchat_android_core.earn.bean.GoldToDiamondInfo
|
||||
import com.yizhuan.xchat_android_core.earn.bean.*
|
||||
import com.yizhuan.xchat_android_core.home.bean.*
|
||||
import com.yizhuan.xchat_android_core.utils.net.launchRequest
|
||||
import com.yizhuan.xchat_android_library.net.rxnet.RxNet
|
||||
@@ -76,6 +73,11 @@ object EarnModel : BaseModel() {
|
||||
api.getMemberSettlement(startTime, endTime)
|
||||
}
|
||||
|
||||
suspend fun getHallMemberTotalList(startTime: String, endTime: String): GoldRecordInfo? =
|
||||
launchRequest {
|
||||
api.getHallMemberTotalList(startTime, endTime)
|
||||
}
|
||||
|
||||
private interface Api {
|
||||
|
||||
/**
|
||||
@@ -140,6 +142,15 @@ object EarnModel : BaseModel() {
|
||||
@Query("endTime") endTime: String
|
||||
): ServiceResult<ClanHallMemberIncomeTotalInfo>
|
||||
|
||||
/**
|
||||
* @return
|
||||
*/
|
||||
@GET("/clanGoldFlow/hallMemberTotalList")
|
||||
suspend fun getHallMemberTotalList(
|
||||
@Query("startTime") startTime: String,
|
||||
@Query("endTime") endTime: String
|
||||
): ServiceResult<GoldRecordInfo>
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user