From 63546eca450afc6bb80c8cb029026581c9c65fa8 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 11 May 2023 16:00:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/model/system/merchant/Merchant.php | 1 - .../repositories/system/merchant/MerchantRepository.php | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/common/model/system/merchant/Merchant.php b/app/common/model/system/merchant/Merchant.php index 7cbd2eda..c9b8e50f 100644 --- a/app/common/model/system/merchant/Merchant.php +++ b/app/common/model/system/merchant/Merchant.php @@ -90,7 +90,6 @@ class Merchant extends BaseModel $data = []; $make = app()->make(StoreActivityRepository::class); foreach ($list as $item) { - halt(1); $spu_id = Spu::where('product_id',$item->product_id)->where('product_type' ,$item->product_type)->value('spu_id'); $act = $make->getActivityBySpu(StoreActivityRepository::ACTIVITY_TYPE_BORDER,$spu_id,$item['cate_id'],$item['mer_id']); $item['border_pic'] = $act['pic'] ?? ''; diff --git a/app/common/repositories/system/merchant/MerchantRepository.php b/app/common/repositories/system/merchant/MerchantRepository.php index a087a4af..cd6ecbb7 100644 --- a/app/common/repositories/system/merchant/MerchantRepository.php +++ b/app/common/repositories/system/merchant/MerchantRepository.php @@ -311,8 +311,11 @@ class MerchantRepository extends BaseRepository } $item['distance'] = $distance; } - if(isset($where['type_id'])){ + if(isset($where['type_id'])&& $where['type_id']==12){ $item['recommend'] = $item['AllRecommendType']; + }else{ + $item['recommend'] = isset($where['delivery_way']) ? $item['CityRecommend'] : $item['AllRecommend']; + } return $item; });