Browse Source

更新文件 ArticleTweetImplDao.java

陈士柏 2 năm trước cách đây
mục cha
commit
26b713477f
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      mhotel/src/com/happy/dao/impl/ArticleTweetImplDao.java

+ 2 - 2
mhotel/src/com/happy/dao/impl/ArticleTweetImplDao.java

@@ -924,11 +924,11 @@ public class ArticleTweetImplDao implements ArticleTweetDao {
      */
     @Override
     public List<ArticleLikeMaxVo> queryTop3ArticleLike() {
-        String sql = "select t.id,t.townId,t.townName,t.title,t.content from (select at.id,at.location_id as townId,hd.name as townName,at.title,at.content,(select Count(*) from article_likes where is_lose = 0 and article_id = at.id) as like_num,at.create_date\n" +
+        String sql = "select t.id,t.townId,t.townName,t.title,t.content from (select at.id,at.location_id as townId,hd.name as townName,at.title,at.content,at.is_top,(select Count(*) from article_likes where is_lose = 0 and article_id = at.id) as like_num,at.create_date\n" +
                 "from article_tweet at\n" +
                 "left join hotel_dict hd on hd.id = at.location_id\n" +
                 "where at.approve = 2) t\n" +
-                "order by at.is_top desc, t.like_num desc,t.create_date desc LIMIT 3";
+                "order by t.is_top desc, t.like_num desc,t.create_date desc LIMIT 3";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         List<ArticleLikeMaxVo> list = null;
         try {