更新分类

This commit is contained in:
yaooo 2023-09-27 14:58:57 +08:00
parent 6431a3e8dc
commit 65b4ac3669
2 changed files with 6 additions and 0 deletions

View File

@ -187,6 +187,7 @@ class SpuRepository extends BaseRepository
foreach ($productIds as $productId) { foreach ($productIds as $productId) {
$RedisCacheService->SADD($dataKey, $productId); $RedisCacheService->SADD($dataKey, $productId);
} }
//halt($productIds);
} }
$where['product_id'] = $this->getSpuFromCache($where['mer_id'], $page, $limit); $where['product_id'] = $this->getSpuFromCache($where['mer_id'], $page, $limit);
unset($where['mer_id'], $where['page']); unset($where['mer_id'], $where['page']);

View File

@ -497,6 +497,7 @@ class Common extends BaseController
public function get_cloud_shop($street_code){ public function get_cloud_shop($street_code){
//更新查询镇级供应链店铺 //更新查询镇级供应链店铺
$typeTownSupplyChainId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeTownSupplyChain'])->value('mer_type_id'); $typeTownSupplyChainId = Db::name('MerchantType')->where('type_code', Merchant::TypeCode['TypeTownSupplyChain'])->value('mer_type_id');
/*
$find=DB::name('merchant') $find=DB::name('merchant')
->alias('m') ->alias('m')
->where('m.type_id',$typeTownSupplyChainId) ->where('m.type_id',$typeTownSupplyChainId)
@ -505,6 +506,10 @@ class Common extends BaseController
->where('m.street_id',$street_code) ->where('m.street_id',$street_code)
->join('merchant_category c','m.category_id=c.merchant_category_id') ->join('merchant_category c','m.category_id=c.merchant_category_id')
->field('m.mer_id,category_id,category_name,c.background,c.cover,c.description')->select(); ->field('m.mer_id,category_id,category_name,c.background,c.cover,c.description')->select();
*/
$find=DB::name('merchant_category')
->where('cover', '<>' ,'')
->field('merchant_category_id as category_id,category_name,background,cover,description')->select();
return app('json')->success($find??[]); return app('json')->success($find??[]);
} }
} }