feat: 切换 schema dump 基线并增强返点结算与管理校验
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user