|
@@ -2163,13 +2163,13 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
if (isset($data['pinyin']) &&!empty($data['pinyin'])) {
|
|
|
$result = WebsiteCategory::where('website_id', $data['website_id'])
|
|
|
->where('aLIas_pinyin', $data['pinyin'])
|
|
|
- ->selectRaw('website_category.*,
|
|
|
+ ->selectRaw('website_category.category_id, website_category.alias,
|
|
|
CASE
|
|
|
WHEN EXISTS (SELECT 1 FROM website_category as wc WHERE wc.pid = website_category.category_id)
|
|
|
THEN 1
|
|
|
ELSE 0
|
|
|
END as childrencount')
|
|
|
- ->first(['category_id', 'alias', 'children_count']);
|
|
|
+ ->first();
|
|
|
}
|
|
|
if(isset($data['foot_pinyin']) &&!empty($data['foot_pinyin'])){
|
|
|
$result = FooterCategory::where('website_id',$data['website_id'])->where('name_pinyin',$data['foot_pinyin'])->first(['id']);
|