This commit is contained in:
彭桃 2023-03-28 14:17:58 +08:00
parent e1f8361e59
commit 3e39e88258
2 changed files with 8 additions and 2 deletions

View File

@ -27,6 +27,7 @@ use app\common\repositories\store\StoreSeckillActiveRepository;
use app\common\repositories\user\UserVisitRepository;
use app\common\model\system\supplychain\SupplyChainLinkMerchant;
use think\facade\Queue;
use think\facade\Db;
class SpuRepository extends BaseRepository
{
@ -167,7 +168,11 @@ class SpuRepository extends BaseRepository
// 只获取当前供应链内商户的商品
$query->whereIn('S.mer_id', $MerListId);
}
// 搜索镇
if(isset($where['street_id']) && !empty($where['street_id'])){
$mer_ids = Db::table('eb_merchant_address')->where('street_id',$where['street_id'])->column('mer_id');
$query->whereIn('S.mer_id', $mer_ids);
}
$productMake = app()->make(ProductRepository::class);
$count = $query->count();

View File

@ -58,7 +58,8 @@ class StoreSpu extends BaseController
'product_ids',
'mer_id',
'merchant_category_id',
'is_good'
'is_good',
'street_id'
]);
$where['is_gift_bag'] = 0;