Browse Source

分类搜索

master
weigang 5 years ago
parent
commit
946b703cdc
  1. 2
      app/Service/v3/Implementations/CategoryService.php

2
app/Service/v3/Implementations/CategoryService.php

@ -43,7 +43,7 @@ class CategoryService implements CategoryServiceInterface
->get()->toArray(); ->get()->toArray();
return Category::query() return Category::query()
->whereIn('id', array_column($goodsTypeIds, 'category_id'))
->whereIn('id', array_values(array_column($goodsTypeIds, 'category_id')))
->orderBy('sort', 'DESC') ->orderBy('sort', 'DESC')
->orderBy('id', 'DESC') ->orderBy('id', 'DESC')
->get()->toArray(); ->get()->toArray();

Loading…
Cancel
Save