feat: 支持开奖设置走系统配置并补充相关测试

This commit is contained in:
2026-05-20 13:54:32 +08:00
parent 5742853c4c
commit 2753590685
4 changed files with 68 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ use App\Lottery\DrawStatus;
use App\Models\DrawResultItem;
use App\Models\DrawResultBatch;
use Illuminate\Support\Facades\DB;
use App\Services\LotterySettings;
use App\Lottery\DrawResultSourceType;
use App\Lottery\DrawResultBatchStatus;
@@ -27,7 +28,10 @@ final class DrawRngRunner
'status' => DrawStatus::Drawing->value,
])->save();
$manualReview = (bool) config('lottery.draw.require_manual_review', false);
$manualReview = (bool) LotterySettings::get(
'draw.require_manual_review',
(bool) config('lottery.draw.require_manual_review', false),
);
$seedMaterial = bin2hex(random_bytes(32));
$rngSeedHash = hash('sha256', $seedMaterial);