|
...
|
...
|
@@ -361,9 +361,13 @@ class TranslateController extends BaseController |
|
|
|
Cache::put('product_category_trans',$catelists,3600 * 24);
|
|
|
|
}
|
|
|
|
$ids = $this->getCategoryWithChildrenIds($catelists,$v['source_id']);
|
|
|
|
if (empty($ids) || !is_array($ids)) {
|
|
|
|
// 处理空值情况,返回0或者默认值
|
|
|
|
$count = 0;
|
|
|
|
} else {
|
|
|
|
$cateRelateModel = new CategoryRelated();
|
|
|
|
$product_ids = $cateRelateModel->whereIn('id',$ids)->distinct(true)->value('product_id');
|
|
|
|
$count = count($product_ids);
|
|
|
|
$count = $cateRelateModel->whereIn('id', $ids)->distinct(true)->count();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->pageSixList($data,$count,$v,1,15);
|
|
|
|
break;
|
...
|
...
|
|