Implement billing status notification and enhance user management integration
- Added `NotifyBillingStatusChangedAsync` method to `IRealtimeNotifier` for notifying clients about changes in billing status. - Updated `BillingConfigResumer` to call the new notification method after modifying billing configurations, ensuring users receive real-time updates. - Enhanced `ListUsersQueryHandler` to include a `BillingPendingReview` property in `UserSummaryDto`, indicating if a user has a pending payment request awaiting confirmation. - Refactored various command handlers to utilize `AdvisoryLock` for managing concurrent requests, preventing race conditions in billing operations. - Updated tests to cover new notification behaviors and ensure proper functionality in billing status management.
This commit is contained in:
@@ -362,6 +362,11 @@ totalConfigs, activeConfigs, totalUsedUpBytes, totalUsedDownBytes }` — счи
|
||||
| `newsPublished` | `{ id, title, createdAt }` | все (broadcast) |
|
||||
| `ticketCreated` | `{ ticketId, userId, userName, type }` | `admins` |
|
||||
| `ticketUpdated` | `{ ticketId }` | владельцу |
|
||||
| `billingStatusChanged` | `{ userId }` | владельцу |
|
||||
|
||||
`billingStatusChanged` — безадресный пинг без данных (см. `BillingConfigResumer` в
|
||||
[domain-model.md](domain-model.md#синхронизация-панели-3x-ui-со-статусом-оплаты--billingconfigresumer)):
|
||||
клиент в ответ инвалидирует `my-billing-status`, а не читает payload.
|
||||
|
||||
### Client → Server
|
||||
Клиент только слушает; группировка по пользователю происходит на сервере при подключении, по
|
||||
|
||||
Reference in New Issue
Block a user