Commit 1801c83a by rongkailun

【新增】规章制度top7

parent e9643b35
......@@ -419,4 +419,13 @@ public class NewsController extends AbstractController {
return R.ok().put("data", list);
}
/**规章制度top7*/
@Login
@GetMapping("/api/gzzdTop7")
public R gzzdTop7() {
List<NewsEntity> list = this.newsService.gzzdTop7();
return R.ok().put("data", list);
}
}
......@@ -80,4 +80,6 @@ public interface NewsDao extends BaseMapper<NewsEntity> {
List<NewsEntity> centerTop6();
List<NewsEntity> gzzdTop7();
}
......@@ -79,5 +79,6 @@ public interface NewsService extends IService<NewsEntity> {
List<NewsEntity> centerTop6();
List<NewsEntity> gzzdTop7();
}
......@@ -471,6 +471,12 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
return list;
}
@Override
public List<NewsEntity> gzzdTop7() {
List<NewsEntity> list = this.newsDao.gzzdTop7();
return list;
}
private List<Map<String, Object>> getDataListNew(Map<String, Object> map, Page page) {
List<Map<String,Object>> list = this.newsDao.searchKnowledgeInfoNewList(map,page);
return list;
......
......@@ -541,4 +541,26 @@
levels DESC,
releasedate DESC
</select>
<select id="gzzdTop7" resultType="io.office.modules.manage.entity.NewsEntity">
SELECT
TOP 7 a.classid,
a.newsid,
a.id AS yid,
a.newslevels,
a. TIME,
b.title,
b.author,
b.updatedate,
b.levels,
b.id
FROM
TopIcNews AS a
LEFT JOIN news AS b ON a.newsid = b.id
WHERE
status = 1
AND a.classid = 430
ORDER BY
levels DESC,
releasedate DESC
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment