|
@@ -314,8 +314,9 @@ class SwooleTask extends Command
|
|
|
$time++;
|
|
$time++;
|
|
|
$cateIds = GoodsCategoryService::make()->getCateIds();
|
|
$cateIds = GoodsCategoryService::make()->getCateIds();
|
|
|
if($cateIds){
|
|
if($cateIds){
|
|
|
- foreach($cateIds as $pid){
|
|
|
|
|
- if(!RedisService::get("caches:task:lock:goods_category_sub_loaded_{$pid}")){
|
|
|
|
|
|
|
+ foreach($cateIds as $item){
|
|
|
|
|
+ $pid = isset($item['cate_id'])? $item['cate_id'] : 0;
|
|
|
|
|
+ if($pid && !RedisService::get("caches:task:lock:goods_category_sub_loaded_{$pid}")){
|
|
|
$taskData = [
|
|
$taskData = [
|
|
|
'taskName' => 'UpdateGoodsCategorySub',
|
|
'taskName' => 'UpdateGoodsCategorySub',
|
|
|
'name' => "更新商品分类【{$pid}】的子分类数据",
|
|
'name' => "更新商品分类【{$pid}】的子分类数据",
|