|
@@ -233,6 +233,7 @@ class GoodsService
|
|
|
$category->category_super_path = $category->category_super_path . '#' . $categorySuperId . '#';
|
|
|
}
|
|
|
$categoryIds = SysCategory::where('category_super_path', 'like', '%' . $category->category_super_path)->pluck('category_id');
|
|
|
+ $categoryIds = $category ? $category->toArray() : [];
|
|
|
$categoryIds = array_merge($categoryIds,[$categorySuperId]);
|
|
|
} elseif (!is_array($categoryIds)) {
|
|
|
$categoryIds = [$categoryIds];
|