fix(withdraw): 提现账本校验按 source 分账,邀请奖励金提现纳入对账 #121
Reference in New Issue
Block a user
Delete Branch "fix/invite-cash-ledger-reconcile"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
线上后台「提现审核」页现金账本报红(缺扣款/缺退款流水),根因是
withdraw_ledger_check 用全部提现单去比对普通现金流水(cash_transaction),
而 source=invite_cash 的提现,其扣款/退款流水写在独立的 invite_cash_transaction
表,于是每笔邀请提现单都在普通现金流水里找不到、被误报为「缺流水」。
改动:
改为按 order.source 分两本账各自对账:
coin_cash ↔ cash_transaction(withdraw/withdraw_refund),
invite_cash ↔ invite_cash_transaction(invite_withdraw/invite_withdraw_refund)。
(coin_cash 单若真缺流水仍照报)。
覆盖邀请提现不再误报、邀请账缺流水能被抓、普通现金账未回归。
Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com