Skip to content

Commit 98c3628

Browse files
authored
Merge pull request #196 from DevKor-github/develop
develop -> main 병합
2 parents b08a3c2 + 76a7c64 commit 98c3628

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/main/java/devkor/com/teamcback/domain/place/entity/PlaceType.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public enum PlaceType {
1010
TOILET("화장실", new String[]{}),
1111
MEN_TOILET("남자화장실", new String[]{}),
1212
WOMEN_TOILET("여자화장실", new String[]{}),
13+
HANDICAPPED_TOILET("장애인화장실", new String[]{}),
1314
MEN_HANDICAPPED_TOILET("남자장애인화장실", new String[]{}),
1415
WOMEN_HANDICAPPED_TOILET("여자장애인화장실", new String[]{}),
1516
VENDING_MACHINE("자판기", new String[]{"벤딩머신"}),
@@ -35,7 +36,8 @@ public enum PlaceType {
3536
TUMBLER_WASHER("텀블러세척기", new String[]{}),
3637
ONESTOP_AUTO_MACHINE("원스탑무인발급기", new String[]{"원스톱무인발급기", "증명서", "ONE-STOP", "ONESTOP"}),
3738
HEALTH_OFFICE("건강센터", new String[]{"약받는곳", "보건실", "양호실", "응급약", "약받을수있는", "다쳤을때"}),
38-
DISABLED_PARKING("장애인주차장", new String[] {"장애인주차장", "베리어프리", "휠체어주차장"});
39+
DISABLED_PARKING("장애인주차장", new String[] {"장애인주차장", "베리어프리", "휠체어주차장"}),
40+
BARRIER_FREE_ENTRANCE("배리어프리출입문", new String[] {});
3941

4042
private final String name;
4143
private final String[] nickname;

src/main/java/devkor/com/teamcback/domain/search/service/SearchService.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,13 @@ public SearchFloorInfoRes searchPlaceByBuildingFloor(Long buildingId, int floor)
211211
placeList.stream().map(SearchRoomDetailRes::new).toList());
212212

213213
List<SearchNodeRes> nodeList = nodeRepository.findAllByBuildingAndFloorAndTypeIn(building, floor, List.of(ENTRANCE, STAIR, ELEVATOR))
214-
.stream().map(SearchNodeRes::new).toList();
214+
.stream()
215+
.filter(node -> { // 출입구 중 placeList에 존재하지 않는 것들만 추가
216+
if (node.getType() != ENTRANCE) return true;
217+
return placeList.stream()
218+
.noneMatch(p -> p.getNode().getId().equals(node.getId()));
219+
})
220+
.map(SearchNodeRes::new).toList();
215221

216222
return new SearchFloorInfoRes(roomDetailRes, nodeList);
217223
}

0 commit comments

Comments
 (0)