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

This commit is contained in:
xboard committed 2023-12-14 13:07:57 +08:00
1 parent 1c3879e292
commit 4973a390ef
4 files changed
+4 -1

No files matched your search

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