feat: enhance configuration and logging for admin services
Some checks failed
lotterLaravel CI / test (push) Has been cancelled

- Updated .env.example to enable Redis Lua for lottery risk pool and added configuration for agent settlement.
- Improved AGENTS.md to clarify site operations and admin roles.
- Enhanced PHPUnit configuration with memory limit and cache directory settings.
- Refactored AdminReportQueryService and related services to utilize LimitedQuery for better data handling and truncation warnings.
- Added logging for draw settlement failures in DrawTickService.
- Introduced credit preflight checks and reverse bet hold functionality in PlayerCreditService.
- Improved risk pool management with new Redis lock handling in RiskPoolService and TicketPlacementService.
This commit is contained in:
2026-06-16 17:08:10 +08:00
parent 4e370a79dc
commit b496a9457c
16 changed files with 423 additions and 494 deletions

View File

@@ -620,7 +620,8 @@ final class AdminReportQueryService
$q->whereDate('created_at', '>=', $dateFrom)
->whereDate('created_at', '<=', $dateTo);
foreach ($q->limit(5000)->get() as $log) {
$limited = \App\Support\LimitedQuery::get($q, 5000);
foreach ($limited['rows'] as $log) {
$rows[] = [
(int) $log->id,
(string) $log->operator_type,
@@ -632,6 +633,10 @@ final class AdminReportQueryService
];
}
if ($limited['truncated']) {
$rows[] = ['警告', '审计日志已截断至 5000 条,请缩小日期范围后重试'];
}
return $rows;
}
@@ -782,6 +787,10 @@ final class AdminReportQueryService
];
}
if ($limited['truncated']) {
array_unshift($rows, ['警告', '审计日志已截断至 5000 条,请缩小日期范围后重试']);
}
return $rows;
}