feat: 切换 schema dump 基线并增强返点结算与管理校验

This commit is contained in:
2026-06-08 17:41:41 +08:00
parent 2d32f006c5
commit 8d5d7f5b17
130 changed files with 5746 additions and 6723 deletions

View File

@@ -56,6 +56,20 @@ final class AgentSettlementBillGuard
public function markConfirmed(int $billId): void
{
$this->assertPeriodMutable($billId);
$bill = DB::table('settlement_bills')->where('id', $billId)->first();
if ($bill === null) {
throw new \InvalidArgumentException('bill_not_found');
}
if ((string) $bill->status === 'confirmed') {
return;
}
if ((string) $bill->status !== 'pending_confirm') {
throw ValidationException::withMessages([
'bill' => ['not_confirmable'],
]);
}
DB::table('settlement_bills')->where('id', $billId)->update([
'status' => 'confirmed',