feat: enhance reporting and dashboard functionalities

- Updated AGENTS.md to clarify SSO wallet integration and error handling for account status.
- Refactored date handling in AdminReportQueryService and related classes to use precise date filtering for financial reports.
- Improved query logic in AdminDashboardSnapshotBuilder, AgentDashboardOverviewBuilder, and SiteDashboardOverviewBuilder to ensure accurate activity statistics based on business dates.
This commit is contained in:
2026-06-16 14:18:56 +08:00
parent 1e7b2b31ee
commit 3a59cc3f42
5 changed files with 9 additions and 7 deletions

View File

@@ -154,7 +154,8 @@ final class AdminReportQueryService
$activityQuery = DB::table('draws as d')
->join('ticket_orders as o', 'o.draw_id', '=', 'd.id')
->whereBetween('d.business_date', [$dateFrom, $dateTo]);
->whereDate('d.business_date', '>=', $dateFrom)
->whereDate('d.business_date', '<=', $dateTo);
AdminDataScope::applyToTicketOrdersViaPlayer($activityQuery, $context?->admin, 'o');
$activity = $activityQuery
->selectRaw('COUNT(DISTINCT d.id) as draw_count')