diff --git a/app/admin/logic/warehouse_product/WarehouseProductLogic.php b/app/admin/logic/warehouse_product/WarehouseProductLogic.php index 8de456ab..3426c50c 100644 --- a/app/admin/logic/warehouse_product/WarehouseProductLogic.php +++ b/app/admin/logic/warehouse_product/WarehouseProductLogic.php @@ -34,6 +34,7 @@ class WarehouseProductLogic extends BaseLogic try { $data = [ 'warehouse_id' => $params['warehouse_id'], + 'store_id' => $params['store_id']??0, 'product_id' => $params['product_id'], 'financial_pm' => $params['financial_pm'], 'batch' => 0, @@ -59,6 +60,7 @@ class WarehouseProductLogic extends BaseLogic return true; } catch (\Exception $e) { Db::rollback(); + Log::error($e->getMessage().',file:'.$e->getFile().',line:'.$e->getLine()); self::setError($e->getMessage()); return false; } @@ -80,7 +82,6 @@ class WarehouseProductLogic extends BaseLogic 'warehouse_id' => $params['warehouse_id'], 'product_id' => $params['product_id'], 'financial_pm' => $params['financial_pm'], - 'batch' => WarehouseProduct::where(['product_id' => $params['product_id'], 'warehouse_id' => $params['warehouse_id'], 'financial_pm' => $params['financial_pm']])->count(), 'nums' => $params['nums'], 'price' => $params['price'], 'admin_id' => $params['admin_id'], @@ -101,7 +102,6 @@ class WarehouseProductLogic extends BaseLogic return $res; } catch (\Exception $e) { Db::rollback(); - d($e); self::setError($e->getMessage()); return false; } diff --git a/app/queue/redis/StoreStorageSend.php b/app/queue/redis/StoreStorageSend.php index cea7038a..21b9d715 100644 --- a/app/queue/redis/StoreStorageSend.php +++ b/app/queue/redis/StoreStorageSend.php @@ -87,7 +87,6 @@ class StoreStorageSend implements Consumer if ($product_arr['stock'] > 0) { $this->storage($find, $store_id, $admin_id, $product_arr,$warehouse_id); } - StoreProductLogic::updateGoodsclass($find['cate_id'],$store_id); Db::commit(); return true; } catch (\Exception $e) { @@ -138,7 +137,6 @@ class StoreStorageSend implements Consumer if ($product_arr['stock'] > 0) { $this->storage($find, $store_id, $admin_id, $product_arr,$warehouse_id); } - // StoreProductLogic::updateGoodsclass($find['cate_id'],$store_id); Db::commit(); return true; } catch (\Exception $e) {