fix(core): harden settlement and wallet integration
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user