Files
hi-server/initialize/migrate/database
shanshanzhong147 878d5006f0 fix: move withdrawal commission deduction from application to approval
- commissionWithdrawLogic: remove upfront commission deduction;
  balance check now includes sum of all pending withdrawals to prevent
  double-spending; transaction only creates the withdrawal record (status=0)
- approveWithdrawal: add FOR UPDATE lock on user row, balance check before
  deducting, atomic commission decrement and commission log inside one
  transaction; clear user cache after commit
- rejectWithdrawal: remove commission refund and log — commission was never
  deducted on application under the new flow
- add migration 02150: refund commission for existing status=0 withdrawals
  that were deducted under the old logic; includes rollback script

Co-authored-by: multica-agent <github@multica.ai>
2026-05-24 19:38:59 -07:00
..
2025-04-25 12:08:29 +09:00
2026-05-19 19:35:44 -07:00
2025-04-25 12:08:29 +09:00
2025-04-25 12:08:29 +09:00
2025-04-25 12:08:29 +09:00
2025-04-25 12:08:29 +09:00
2025-04-25 12:08:29 +09:00
2025-04-25 12:08:29 +09:00
2025-08-15 12:30:21 -04:00
2025-08-15 12:30:21 -04:00
2026-01-05 17:53:31 +08:00
2026-01-06 16:16:42 +08:00
2026-01-06 16:16:42 +08:00
x
2026-03-08 22:37:58 -07:00
x
2026-03-08 22:37:58 -07:00
2026-03-19 03:21:47 -07:00
2026-03-19 03:21:47 -07:00
2026-03-19 03:21:47 -07:00
2026-05-19 19:35:44 -07:00
2026-05-19 19:35:44 -07:00