修复错误

This commit is contained in:
mkm 2023-05-11 16:00:59 +08:00
parent 219a8ca39e
commit 63546eca45
2 changed files with 4 additions and 2 deletions

View File

@ -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'] ?? '';

View File

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