LiuJ 2 dní pred
rodič
commit
a20a762f86
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      app/JsonRpc/NewsService.php

+ 2 - 2
app/JsonRpc/NewsService.php

@@ -1152,8 +1152,8 @@ class NewsService implements NewsServiceInterface
     $commendArticle = Article::whereIn('article.id', $commend_ids)
       ->leftjoin('website_category', 'website_category.category_id', '=', 'article.catid')
       ->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')
       ->limit(5)
       ->get();