调整商品规格同步的错误
This commit is contained in:
parent
37b29b9f82
commit
d9b769d6f8
@ -61,7 +61,7 @@ class StoreMicro extends BaseController
|
|||||||
if($exist){
|
if($exist){
|
||||||
return app('json')->fail('已经导入过该商品了');
|
return app('json')->fail('已经导入过该商品了');
|
||||||
}
|
}
|
||||||
$find['attrValue']=[];
|
$find['attrValue']=Db::name('store_product_attr_value')->where('product_id',$find['product_id'])->field('image,price,cost,ot_price,svip_price,stock,bar_code,weight,volume')->select();
|
||||||
$find['content']=Db::name('store_product_content')->where('product_id',$find['product_id'])->value('content');
|
$find['content']=Db::name('store_product_content')->where('product_id',$find['product_id'])->value('content');
|
||||||
$find['is_show']=0;
|
$find['is_show']=0;
|
||||||
$find['mer_id']=$mer_id;
|
$find['mer_id']=$mer_id;
|
||||||
|
@ -40,12 +40,15 @@ class CloudProduct
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$cacheKey = sprintf(\app\common\model\store\product\CloudProduct::CacheKey, $cloudMerchant);
|
$cacheKey = sprintf(\app\common\model\store\product\CloudProduct::CacheKey, $cloudMerchant);
|
||||||
|
$remainKey = 'CloudMerchantSpuRemain_' . $cloudMerchant;
|
||||||
$RedisCacheService = app()->make(RedisCacheService::class);
|
$RedisCacheService = app()->make(RedisCacheService::class);
|
||||||
foreach ($event['product_id'] as $productId) {
|
foreach ($event['product_id'] as $productId) {
|
||||||
if ($event['status'] == 1) {
|
if ($event['status'] == 1) {
|
||||||
$RedisCacheService->SADD($cacheKey, $productId);
|
$RedisCacheService->SADD($cacheKey, $productId);
|
||||||
|
$RedisCacheService->sAdd($remainKey, $productId);
|
||||||
} else {
|
} else {
|
||||||
$RedisCacheService->SREM($cacheKey, $productId);
|
$RedisCacheService->SREM($cacheKey, $productId);
|
||||||
|
$RedisCacheService->SREM($remainKey, $productId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user