fix(core): harden settlement and wallet integration

This commit is contained in:
wchino
2026-07-22 01:40:37 +08:00
parent 150c3e7ebd
commit 35f6e46958
54 changed files with 2564 additions and 359 deletions

View File

@@ -4,10 +4,12 @@ namespace App\Services\Admin;
use App\Models\AdminUser;
use App\Models\ReportJob;
use App\Services\AuditLogger;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
use App\Services\AuditLogger;
use Illuminate\Support\Facades\DB;
use App\Support\AdminReportJobPolicy;
use Illuminate\Auth\Access\AuthorizationException;
/**
* 报表导出任务:落库 `report_jobs`(同步生成,可后续接队列)。
@@ -68,9 +70,13 @@ final class AdminReportJobService
/**
* @return list<array<int, string|int|float|null>>
*/
public function reportRows(string $reportType, ?array $filterJson, ?AdminUser $scopedAdmin = null): array
public function reportRows(string $reportType, ?array $filterJson, AdminUser $admin): array
{
return $this->queryService->reportRows($reportType, $filterJson, $scopedAdmin);
if (! AdminReportJobPolicy::canExportReportType($admin, $reportType)) {
throw new AuthorizationException;
}
return $this->queryService->reportRows($reportType, $filterJson, $admin);
}
public function reportLabel(string $reportType): string