From 6dbcea27d68fb99a9bbbde183097320f2ee4a88f Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 2 Nov 2023 11:53:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/product/StoreMicro.php | 2 +- app/listener/ProductCreate.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controller/api/store/product/StoreMicro.php b/app/controller/api/store/product/StoreMicro.php index b8c4e117..ff9a5975 100644 --- a/app/controller/api/store/product/StoreMicro.php +++ b/app/controller/api/store/product/StoreMicro.php @@ -119,7 +119,7 @@ class StoreMicro extends BaseController $find['spec_type'] = 0; $find['delivery_free'] = 0; $find['cate_id'] = $store_category_id; - unset($find['create_time']); + unset($find['create_time'], $find['id']); } $a= app()->make( ProductRepository::class)->create($find,$product_type,1); if($a){ diff --git a/app/listener/ProductCreate.php b/app/listener/ProductCreate.php index ac540675..7f545216 100644 --- a/app/listener/ProductCreate.php +++ b/app/listener/ProductCreate.php @@ -30,7 +30,7 @@ class ProductCreate if($mer==null){ return false; } - $product_id=Db::name('store_product')->where('mer_id',$mer)->where('bar_code', $product['bar_code'])->value('id'); + $product_id=Db::name('store_product')->where('mer_id',$mer)->where('bar_code', $product['bar_code'])->value('product_id'); if($product_id==null){ return false; }