Tính năng nghiệp vụ
1. Vận hành người chơi
Route: /users, /users/:id — permission userManagement
| Action | Mô tả |
|---|---|
| Danh sách & lọc | Search, filter meta từ API |
| Chi tiết player | Profile, wallet, reserved balance |
| Ban / Unban | Khóa/mở tài khoản |
| Terminate | Xóa vĩnh viễn (có preview trước) |
| Cập nhật status | Thay đổi trạng thái tài khoản |
2. Giao dịch thanh toán
Route: /transactions, /transactions/:id — permission transactionManagement
flowchart LR
A[Payment transaction] --> B{Status}
B -->|Failed sync| C[Retry sync game wallet]
B -->|Refund needed| D[Refund single / all]
B -->|Review| E[Update status + detail view]
- Thống kê tổng hợp (
getTransactionStats) - Chi tiết đầy đủ payment transaction
- Retry sync game wallet khi lỗi
- Refund đơn lẻ hoặc hàng loạt
3. Rút tiền
Withdrawal Requests (/withdrawal-requests)
| Action | API |
|---|---|
| Duyệt | POST /payment/admin/withdrawals/:id/approve |
| Từ chối | POST .../reject |
| Hoàn tất | POST .../complete |
| Retry payout | POST .../retry-payout |
| Xem payout log | GET .../payout-log |
Flagged Withdrawals (/flagged-withdrawals)
- Profit analysis cho withdrawal bất thường
- Adjust user balance khi cần
4. Ví đa tầng
Game Wallets (/wallets)
- Sync balance từng wallet
- Statistics tổng hợp
- Recall all — thu hồi toàn bộ game wallet (batch job + export CSV)
USD Wallets (/usd-wallets)
- Summary toàn hệ thống
- Ledger với filter/export
- Approve/reject USD withdrawal requests
- Linked credit transactions
Credit Wallets (/credit-wallets)
- Summary + ledger CDN credits
- Export CSV
5. Quản lý tài khoản hệ thống
Admins (/admins)
- CRUD admin accounts
- Granular permissions: grant / revoke / set
- Reset password
Super Agents (/super-agents)
- Tạo, suspend, terminate
- Cash funding / withdrawal
- Game mappings, wallet transactions
- Assign agents
Agents (/agents)
- Tạo CDN agent, rates, popup permissions
- Payment & wallet transactions
- Wallet transfer
- Tạo shop con
Shops (/shops)
- Chi tiết shop cross-agent
- Rates, credit adjust, suspend/terminate
Cashiers (/cashiers)
- CRUD, report, shifts
- Fraud indicators
6. Cấu hình nền tảng
| Module | Route | Chức năng |
|---|---|---|
| Domains | /domains | CRUD domain, game mappings, analytics, kiosk health |
| Game Providers | /game-providers | CRUD, reorder, agent balances sync |
| VFX Config | /vfx-config | Background presets, schedules |
| Transaction Limits | /transaction-limits | Config limits, fraud flags |
| Provider Fees | /provider-fees | Cấu hình phí payment gateway |
| API Logs | /integration-logs | Game/payment/webhook logs (super admin) |
7. Hỗ trợ & thông báo
Support Tickets (/tickets)
- Search, filter, reply
- Cập nhật status, mark done
- Support stats dashboard
Notifications (super admin)
| Loại | Route | Mục đích |
|---|---|---|
| Broadcasts | /broadcasts | Thông báo toàn hệ thống, credential SMS batch |
| In-app popups | /in-app-popups | Popup target player/agent/shop |
AdminNotificationBell — poll inbox broadcasts mỗi 2 phút.
8. Manual Game Deposits
Route: /manual-game-deposits
Luồng deposit thủ công vào game account:
- Admin xem danh sách pending
- Confirm hoặc reject
- Cập nhật game account nếu cần
9. Finance Corrections
FinanceCorrectionDebitModal — điều chỉnh sổ sách tài chính qua POST /admin/finance-corrections.
Xem thêm: Admin Financial Correction Debit Spec.
10. So sánh Admin vs CDN Portals
| Tính năng | Admin | Super Agent / Agent / Shop |
|---|---|---|
| Permission-based access | ✅ 14 permissions | Auth only |
| Player ban/terminate | ✅ | Shop: ban only |
| Payment refund | ✅ | — |
| Game wallet recall | ✅ | — |
| Tạo super agent/agent | ✅ | Super Agent: agent only |
| Provider fees edit | ✅ | Read-only |
| Integration logs | ✅ | — |
| Support tickets | ✅ | — |
| Global broadcasts | ✅ | Delegate only |
Ghi chú triển khai
- Port dev 3000 — mặc định CRA.
- React Query — logout phải
queryClient.clear()để tránh cache leak. - Build —
postbuild-spa-fallback.jstạo404.htmlcho deep links. - E2E — Playwright tests trong
test:e2e,test:visual. - Host tham chiếu:
dev-admin.kioskservice.club.