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