diff --git a/app/common/repositories/store/product/SpuRepository.php b/app/common/repositories/store/product/SpuRepository.php index 54c767eb..4555e2c0 100644 --- a/app/common/repositories/store/product/SpuRepository.php +++ b/app/common/repositories/store/product/SpuRepository.php @@ -34,7 +34,7 @@ use think\facade\Queue; class SpuRepository extends BaseRepository { public $dao; - public $merchantFiled = 'mer_id,mer_name,mer_avatar,is_trader,mer_info,mer_keyword,type_id'; + public $merchantFiled = 'mer_id,mer_name,mer_avatar,is_trader,mer_info,mer_keyword,type_id,long,lat'; public $productFiled = 'P.bar_code,S.product_id,S.store_name,S.image,activity_id,S.keyword,S.price,S.mer_id,spu_id,S.status,store_info,brand_id,cate_id,unit_name,S.star,S.rank,S.sort,sales,S.product_type,rate,reply_count,extension_type,S.sys_labels,S.mer_labels,P.delivery_way,P.delivery_free,P.ot_price,svip_price_type,stock,mer_svip_status'; public $userInfo; diff --git a/app/common/repositories/system/merchant/MerchantRepository.php b/app/common/repositories/system/merchant/MerchantRepository.php index 46509f23..eda82bd4 100644 --- a/app/common/repositories/system/merchant/MerchantRepository.php +++ b/app/common/repositories/system/merchant/MerchantRepository.php @@ -308,7 +308,6 @@ class MerchantRepository extends BaseRepository ]; } } - if ($where['keyword'] !== '') { app()->make(UserVisitRepository::class)->searchMerchant($userInfo ? $userInfo['uid'] : 0, $where['keyword']); } diff --git a/app/controller/api/store/product/CloudWarehouse.php b/app/controller/api/store/product/CloudWarehouse.php index dd0ce4e4..dc63ac0f 100644 --- a/app/controller/api/store/product/CloudWarehouse.php +++ b/app/controller/api/store/product/CloudWarehouse.php @@ -114,7 +114,8 @@ class CloudWarehouse extends BaseController $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) ->withAttr('merchant', function ($value, $data) { - return Db::name('merchant')->where('mer_id', $data['mer_id'])->field('mer_id,mer_name')->find(); + $find= Db::name('merchant')->where('mer_id', $data['mer_id'])->field('mer_id,mer_name')->find(); + return $find; }) ->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(); @@ -126,7 +127,7 @@ class CloudWarehouse extends BaseController } /** - * 指定类型的云仓商品列表 + * 镇级供应链列表 * @return mixed */ public function town() @@ -158,7 +159,7 @@ class CloudWarehouse extends BaseController $where['product_type'] = $params['product_type']; $where['is_gift_bag'] = 0; $where['order'] = $params['order'] ?: 'sort'; - $products = $this->spuRepository->getApiCloudSearch($where, $page, $limit, false); + $products = $this->spuRepository->getApiSearch($where, $page, $limit, false); return app('json')->success($products); } }