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; + // } }