mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-14 19:40:53 +08:00
feat: add tags to plans, refactor order service, adn fix ticket lock
This commit is contained in:
@@ -43,8 +43,9 @@ class TicketController extends Controller
|
||||
{
|
||||
try{
|
||||
DB::beginTransaction();
|
||||
if ((int)Ticket::where('status', 0)->where('user_id', $request->user()->id)->lockForUpdate()->count()) {
|
||||
throw new \Exception(__('There are other unresolved tickets'));
|
||||
if (Ticket::where('status', 0)->where('user_id', $request->user()->id)->lockForUpdate()->first()) {
|
||||
DB::rollBack();
|
||||
return $this->fail([400, '存在未关闭的工单']);
|
||||
}
|
||||
$ticket = Ticket::create(array_merge($request->only([
|
||||
'subject',
|
||||
|
||||
Reference in New Issue
Block a user