From 7c69e193041d95a9a89e2b9149976caf77aa2ab0 Mon Sep 17 00:00:00 2001 From: Tokumeikoi Date: Tue, 7 Apr 2020 00:40:52 +0800 Subject: [PATCH] #170 --- app/Http/Controllers/User/TicketController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Http/Controllers/User/TicketController.php b/app/Http/Controllers/User/TicketController.php index ad30ee28..cc6c8ebc 100644 --- a/app/Http/Controllers/User/TicketController.php +++ b/app/Http/Controllers/User/TicketController.php @@ -51,6 +51,9 @@ class TicketController extends Controller public function save(TicketSave $request) { DB::beginTransaction(); + if ((int)Ticket::where('status', 0)->count()) { + abort(500, '存在其他工单尚未处理'); + } $ticket = Ticket::create(array_merge($request->only([ 'subject', 'level'