接收提现结果 - 显示dialog

This commit is contained in:
renhaoting 2026-01-07 15:35:21 +08:00
parent 82d7f7d9d8
commit 2859edcc89
3 changed files with 8 additions and 10 deletions

View File

@ -230,15 +230,14 @@ class WithDrawActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
private fun showTransactionResultDialog(record: RecordCash) { private fun showTransactionResultDialog(record: RecordCash) {
if (!record.hasShowResultDialog && record.withdrawState != TRANSACTION_STATE_ONGOING) { if (!record.hasShowResultDialog && record.withdrawState != TRANSACTION_STATE_ONGOING) {
WithdrawManager.instance().updateRecordHasNotifyState(record.payOutReplyNo)
when (record.withdrawState) { when (record.withdrawState) {
TRANSACTION_STATE_SUCCESS -> { TRANSACTION_STATE_SUCCESS -> {
showSuccessDialog(record.amountNum) showSuccessDialog(record.amountNum)
WithdrawManager.instance().updateRecordHasNotifyState(record.payOutReplyNo)
} }
TRANSACTION_STATE_FAIL -> { TRANSACTION_STATE_FAIL -> {
showFailDialog(WithdrawManager.instance().getFailHintStrRes(record.withdrawFailType)) showFailDialog(WithdrawManager.instance().getFailHintStrRes(record.withdrawFailType))
WithdrawManager.instance().updateRecordHasNotifyState(record.payOutReplyNo)
} }
} }
} }

View File

@ -149,9 +149,9 @@ class WithDrawSubActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
VididinEvents.EVENT_WITHDRAW_RESULT_UPDATED -> { VididinEvents.EVENT_WITHDRAW_RESULT_UPDATED -> {
try { try {
val record = data.mData as RecordCash val record = data.mData as RecordCash
if (record.withdrawItemIndex > 0) { if (record.withdrawItemIndex > 0) {
showTransactionResultDialog(record) showTransactionResultDialog(record)
} }
} catch (e: Exception) { } catch (e: Exception) {
e.printStackTrace() e.printStackTrace()
} }
@ -173,15 +173,14 @@ class WithDrawSubActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
private fun showTransactionResultDialog(record: RecordCash) { private fun showTransactionResultDialog(record: RecordCash) {
if (!record.hasShowResultDialog && record.withdrawState != TRANSACTION_STATE_ONGOING) { if (!record.hasShowResultDialog && record.withdrawState != TRANSACTION_STATE_ONGOING) {
WithdrawManager.instance().updateRecordHasNotifyState(record.payOutReplyNo)
when (record.withdrawState) { when (record.withdrawState) {
TRANSACTION_STATE_SUCCESS -> { TRANSACTION_STATE_SUCCESS -> {
showSuccessDialog(record.amountNum) showSuccessDialog(record.amountNum)
WithdrawManager.instance().updateRecordHasNotifyState(record.payOutReplyNo)
} }
TRANSACTION_STATE_FAIL -> { TRANSACTION_STATE_FAIL -> {
showFailDialog(WithdrawManager.instance().getFailHintStrRes(record.withdrawFailType)) showFailDialog(WithdrawManager.instance().getFailHintStrRes(record.withdrawFailType))
WithdrawManager.instance().updateRecordHasNotifyState(record.payOutReplyNo)
} }
} }
} }

View File

@ -179,7 +179,7 @@ class WithdrawManager private constructor() {
NotifyMan.instance().sendEvent(VididinEvents.EVENT_WITHDRAW_ITEM_LIST_CHANGED, null) NotifyMan.instance().sendEvent(VididinEvents.EVENT_WITHDRAW_ITEM_LIST_CHANGED, null)
} }
private fun notifyWithdrawResult2(withdrawRecord: RecordCash) { private fun notifyWithdrawResult(withdrawRecord: RecordCash) {
NotifyMan.instance().sendEvent(VididinEvents.EVENT_WITHDRAW_RESULT_UPDATED, NotifyMan.NotifyData(withdrawRecord)) NotifyMan.instance().sendEvent(VididinEvents.EVENT_WITHDRAW_RESULT_UPDATED, NotifyMan.NotifyData(withdrawRecord))
} }
@ -617,7 +617,7 @@ class WithdrawManager private constructor() {
RecordsManager.instance().updateCashRecord(withdrawRecord) RecordsManager.instance().updateCashRecord(withdrawRecord)
// 2. 事件通知以便更新UI // 2. 事件通知以便更新UI
notifyWithdrawResult2(withdrawRecord) notifyWithdrawResult(withdrawRecord)
// 3. Statistics // 3. Statistics
StatisticUtil.reportEvents(StatisticUtil.KEY_Withdrawal_Reason, mapOf( StatisticUtil.reportEvents(StatisticUtil.KEY_Withdrawal_Reason, mapOf(
@ -642,7 +642,7 @@ class WithdrawManager private constructor() {
} }
// 3. event 通知 // 3. event 通知
notifyWithdrawResult2(withdrawRecord) notifyWithdrawResult(withdrawRecord)
// 4. Statistic // 4. Statistic
StatisticUtil.reportEvents(StatisticUtil.KEY_Withdrawal_Reason, StatisticUtil.reportEvents(StatisticUtil.KEY_Withdrawal_Reason,