feat: 充值订单审计与重新申请,优化赛事展示和余额刷新
- 新增 deposit_order_audit_logs 表,记录提交/审批/拒绝/撤销/重提全链路 - 管理端充值单页增加审计历史;玩家端充值历史支持时间线与重新申请 - 已拒绝订单可原单号重提;撤销入账使用 PLAYER_DEPOSIT_REVERSAL 并加强幂等 - 结算后清除热门标记,允许归档已结算赛事,完善今日赛事时区窗口 - 足球页今日/早盘独立折叠;资料与余额在进入钱包/个人页及下注后自动刷新 - 补充投注玩法、结算返水规则文档;新增 smoke/settlement CLI 脚本 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,6 +22,7 @@ export const TX_KEY_MAP: Record<string, string> = {
|
||||
DEPOSIT: 'wallet.tx_deposit',
|
||||
WITHDRAW: 'wallet.tx_withdraw',
|
||||
PLAYER_DEPOSIT: 'wallet.tx_player_deposit',
|
||||
PLAYER_DEPOSIT_REVERSAL: 'wallet.tx_player_deposit_reversal',
|
||||
};
|
||||
|
||||
export function txTypeKey(type: string): string {
|
||||
@@ -53,11 +54,29 @@ export function txSummaryLabel(
|
||||
|
||||
export function isDepositType(type: string): boolean {
|
||||
const t = type.toUpperCase();
|
||||
return (t.includes('DEPOSIT') || t === 'CASHBACK_DEPOSIT') && !isCashbackType(type);
|
||||
return (t.includes('DEPOSIT') || t === 'CASHBACK_DEPOSIT') && !isCashbackType(type) && t !== 'PLAYER_DEPOSIT_REVERSAL';
|
||||
}
|
||||
|
||||
export function isDepositReversalType(type: string): boolean {
|
||||
return type.toUpperCase() === 'PLAYER_DEPOSIT_REVERSAL';
|
||||
}
|
||||
|
||||
export function txRemarkLabel(
|
||||
tx: { transactionType: string; remark?: string | null; referenceId?: string | null },
|
||||
t: (key: string, params?: Record<string, unknown>) => string,
|
||||
): string {
|
||||
const type = tx.transactionType.toUpperCase();
|
||||
const remark = tx.remark?.trim() ?? '';
|
||||
if (type === 'PLAYER_DEPOSIT_REVERSAL') {
|
||||
return t('wallet.remark_deposit_revoke_generic');
|
||||
}
|
||||
return remark;
|
||||
}
|
||||
|
||||
export function isWithdrawType(type: string): boolean {
|
||||
return type.toUpperCase().includes('WITHDRAW');
|
||||
const t = type.toUpperCase();
|
||||
if (t === 'PLAYER_DEPOSIT_REVERSAL') return false;
|
||||
return t.includes('WITHDRAW');
|
||||
}
|
||||
|
||||
export function isBetType(type: string): boolean {
|
||||
|
||||
Reference in New Issue
Block a user