From 0375951b3f7426babf6e1a7426b28a05fbc924ce Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 7 Aug 2024 17:33:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E4=BB=93=E5=BA=93?= =?UTF-8?q?=E4=BA=A7=E5=93=81=E9=80=BB=E8=BE=91=E5=87=BD=E6=95=B0=EF=BC=8C?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=95=B0=E6=8D=AE=E5=BA=93=E4=BA=8B=E5=8A=A1?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WarehouseProductLogic.php | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/app/admin/logic/warehouse_product/WarehouseProductLogic.php b/app/admin/logic/warehouse_product/WarehouseProductLogic.php index 23b208958..11421df1f 100644 --- a/app/admin/logic/warehouse_product/WarehouseProductLogic.php +++ b/app/admin/logic/warehouse_product/WarehouseProductLogic.php @@ -29,10 +29,10 @@ class WarehouseProductLogic extends BaseLogic * @author admin * @date 2024/07/31 16:55 */ - public static function add(array $params): bool + public static function add(array $params) { - Db::startTrans(); - try { + // Db::startTrans(); + // try { $data = [ 'warehouse_id' => $params['warehouse_id'], 'store_id' => $params['store_id']??0, @@ -57,14 +57,14 @@ class WarehouseProductLogic extends BaseLogic } $res = WarehouseProduct::create($data); self::enter($res['id'], $params['financial_pm']); - Db::commit(); + // Db::commit(); return $res; - } catch (\Exception $e) { - Db::rollback(); - Log::error($e->getMessage().',file:'.$e->getFile().',line:'.$e->getLine()); - self::setError($e->getMessage()); - return false; - } + // } catch (\Exception $e) { + // Db::rollback(); + // Log::error($e->getMessage().',file:'.$e->getFile().',line:'.$e->getLine()); + // self::setError($e->getMessage()); + // return false; + // } }