From 0f827e0108e9dfb57534e02db0067b746882d587 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 26 May 2023 14:51:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dseach=5Fbar=5Fcode=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/store/product/StoreMicro.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controller/api/store/product/StoreMicro.php b/app/controller/api/store/product/StoreMicro.php index 8a61bb8b..d75e5a62 100644 --- a/app/controller/api/store/product/StoreMicro.php +++ b/app/controller/api/store/product/StoreMicro.php @@ -10,7 +10,9 @@ class StoreMicro extends BaseController $category_id=Db::name('merchant')->where('mer_id',$mer_id)->value('category_id'); $mer_id=Db::name('merchant')->where('category_id',$category_id)->where('type_id',13)->value('mer_id'); if($code!=''){ - $find=Db::name('store_product')->where('mer_id',$mer_id)->where('bar_code',$code)->select(); + $product_id_arr=Db::name('store_product_attr_value')->where('mer_id',$mer_id)->where('bar_code',$code)->column('product_id'); + $product_id_arr=implode(',',$product_id_arr); + $find=Db::name('store_product')->where('product_id',$product_id_arr)->select(); }else{ $find=Db::name('store_product')->where('mer_id',$mer_id)->where('store_name','like','%'.$name.'%')->select(); }