fix: 修复多处可能出现的事务安全问题

This commit is contained in:
xboard
2023-12-14 13:07:57 +08:00
parent b8009142ed
commit 7bac88d593
4 changed files with 4 additions and 1 deletions

View File

@@ -144,6 +144,7 @@ class OrderController extends Controller
}
if (!$order->save()) {
DB::rollBack();
return $this->fail([400, __('Failed to create order')]);
}
DB::commit();