From db6b571cfb59ddc43af522335346ad80d56fe7ce Mon Sep 17 00:00:00 2001 From: kuaifan Date: Wed, 3 Apr 2024 10:14:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=83=A8=E5=88=86=E6=83=85=E5=86=B5?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E6=B3=A8=E5=86=8C=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Module/Doo.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/Module/Doo.php b/app/Module/Doo.php index b4ddf6360..52125f864 100644 --- a/app/Module/Doo.php +++ b/app/Module/Doo.php @@ -228,6 +228,14 @@ class Doo if (Base::isError($data)) { throw new ApiException($data['msg'] ?: '注册失败'); } + if (\DB::transactionLevel() > 0) { + try { + \DB::commit(); + \DB::beginTransaction(); + } catch (\Throwable) { + // do nothing + } + } $user = User::whereEmail($email)->first(); if (empty($user)) { throw new ApiException('注册失败');