File tree Expand file tree Collapse file tree
src/main/java/Konkuk/U2E/domain Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ public class NewsLatelyService {
1717 //news의 최신 뉴스 5개를 가져오는 서비스
1818 public GetLatelyNewsResponse getLatelyNews () {
1919 return GetLatelyNewsResponse .of (newsRepository .findTop5ByOrderByNewsDateDesc ().stream ()
20+ .filter (news -> news .getAiSummary () != null )
2021 .map (newsMapperFactory .newsMappingFunction ())
2122 .map (LatelyNews ::of )
2223 .toList ()
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ private List<PinInfo> getPinListByRegion(String regionName) {
7575
7676 private List <PinInfo > getPinListByClimate (ClimateProblem climateProblem ) {
7777 return climateRepository .findNewsByClimateProblem (climateProblem ).stream ()
78+ .filter (news -> news .getAiSummary () != null )
7879 .map (newsPinRepository ::findPinsByNews )
7980 .flatMap (pinList -> pinList .stream ()
8081 .map (pin -> this .createPinInfo (pin , climateProblem ))
You can’t perform that action at this time.
0 commit comments