Commit aacc9510 by rongkailun

【修改】专业术语筛选type类型修改

parent e01e5c71
......@@ -380,12 +380,12 @@ public class NewsController extends AbstractController {
@Login
@GetMapping("/api/knowledgeinfo/{id}")
public R getInfo(@PathVariable("id") Integer id) {
KnowledgeinfoEntity retMap = this.knowledgeinfoService.getById(id);
return R.ok().put("data", retMap);
}
/**资讯排行TOP10*/
@Login
@GetMapping("/api/newsTop10")
KnowledgeinfoEntity retMap = this.knowledgeinfoService.getById(id);
return R.ok().put("data", retMap);
}
/**资讯排行TOP10*/
@Login
@GetMapping("/api/newsTop10")
public R newsTop10() {
List<NewsEntity> list = this.newsService.newsTop10();
return R.ok().put("data", list);
......
......@@ -218,7 +218,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
@Override
public List<GlossaryEntity> glossaryList(NewsParams newsParams) {
List<GlossaryEntity> list = this.newsDao.glossaryList(newsParams);
if(StringUtils.isNullOrEmpty(newsParams.getType())){
if("4".equals(newsParams.getType())){
list = list.stream().filter(item->item.getTitleEn().substring(0,1).equals(newsParams.getTitle())).collect(Collectors.toList());
}
return list;
......
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