|
@@ -1152,8 +1152,8 @@ class NewsService implements NewsServiceInterface
|
|
$commendArticle = Article::whereIn('article.id', $commend_ids)
|
|
$commendArticle = Article::whereIn('article.id', $commend_ids)
|
|
->leftjoin('website_category', 'website_category.category_id', '=', 'article.catid')
|
|
->leftjoin('website_category', 'website_category.category_id', '=', 'article.catid')
|
|
->where('article.status', 1)
|
|
->where('article.status', 1)
|
|
- ->selectRaw('article.id, article.title, article.catid, article.imgurl, article.hits, article.created_at, MAX(website_category.alias) as alias, MAX(website_category.alias_pinyin) as alias_pinyin')
|
|
|
|
- ->groupBy('article.id')
|
|
|
|
|
|
+ ->where('website_category.website_id', $data['website_id'])
|
|
|
|
+ ->select('article.id', 'article.title', 'article.catid', 'article.imgurl', 'article.hits', 'article.created_at', 'website_category.alias', 'website_category.alias_pinyin', 'website_category.website_id')
|
|
->orderBy('article.updated_at', 'desc')
|
|
->orderBy('article.updated_at', 'desc')
|
|
->limit(5)
|
|
->limit(5)
|
|
->get();
|
|
->get();
|