From aff3440e42d3091d911f2180b70499efd41878d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=92=8A?= Date: Tue, 27 Jan 2026 20:32:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9E=E7=BA=BF=E4=BC=A0=E5=A5=87=20?= =?UTF-8?q?=E6=90=AC=E7=A7=BB=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/Monster.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/application/api/model/Monster.php b/application/api/model/Monster.php index 9ffbbbda..4446dc6d 100644 --- a/application/api/model/Monster.php +++ b/application/api/model/Monster.php @@ -80,7 +80,7 @@ class Monster extends Model $is_push = 5;//不推送 Db::startTrans(); -// try { + try { $map = []; $map['is_delete'] = 1; $monster_log = db::name('monster_log')->where($map)->find(); @@ -296,12 +296,12 @@ class Monster extends Model } return ['code' => 1, 'msg' => '成功', 'data' => null]; -// } catch (\Exception $e) { -// // 回滚事务 -// dump($e); -// Db::rollback(); -// return ['code' => 0, 'msg' => '失败', 'data' => null]; -// } + } catch (\Exception $e) { + // 回滚事务 + dump($e); + Db::rollback(); + return ['code' => 0, 'msg' => '失败', 'data' => null]; + } }