From e4847c0e7e8f8d7dc9d87a23beedbae564f69dec Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 8 Nov 2023 15:01:13 +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 --- .../api/store/product/CloudWarehouse.php | 42 +------------------ 1 file changed, 2 insertions(+), 40 deletions(-) diff --git a/app/controller/api/store/product/CloudWarehouse.php b/app/controller/api/store/product/CloudWarehouse.php index c38f9344..e8a6b822 100644 --- a/app/controller/api/store/product/CloudWarehouse.php +++ b/app/controller/api/store/product/CloudWarehouse.php @@ -106,46 +106,8 @@ class CloudWarehouse extends BaseController 'mer_status' => 1, ]; if (!$cloud_product && $category_id==0) { - $list=[]; - $count=0; - if($location){ - [$lon,$lat]=explode(',',$location); - if($page==1){ - $limit=0; - }else{ - $limit=$page*10; - } - $where=[ - 'type_id'=>13, - 'is_de'=>0, - 'mer_state'=>1 - ]; - $mer_id=Db::name('merchant')->where($where)->column('mer_id'); - // $select=Db::query("select mer_id,mer_name ,ST_Distance(coordinates, POINT($lon,$lat)) AS distance from eb_merchant where coordinates !='' and type_id= 13 and is_del=0 and mer_state=1 ORDER BY distance LIMIT 100;"); - // halt($select); - if ($mer_id) { - $where['mer_id']=$mer_id; - $select = Db::name('store_product')->where($where) - ->withAttr('sku', function ($value, $data) { - $find = Db::name('store_product_attr_value')->where('mer_id', $data['mer_id'])->where('product_id', $data['product_id'])->find(); - return ['' => $find]; - }) - ->withAttr('merchant', function ($value, $data) { - $find= Db::name('merchant')->where('mer_id', $data['mer_id'])->field('mer_id,mer_name')->find(); - return $find; - }) - ->select(); - // foreach ($product_list as $k1 => $v1){ - // $arr=$v1; - // $v['distance']=round($v['distance'],2).'km'; - // $arr['merchant']=$v; - // $list[]=$arr; - // } - - } - - } - return app('json')->success(['count' => $count, 'list' => $list]); + + return app('json')->success(['count' => 0, 'list' => []]); } $count = Db::name('cloud_product')->where('street_code', $street_code)->where('status', 1)->count(); $select = Db::name('store_product')->whereIn('product_id', $cloud_product)->where($where)