Skip to content

Commit

Permalink
#88 [fix] : 스타디움 구역 정보가 중복되어 나오는 문제를 해결한다
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbang105 committed Nov 23, 2024
1 parent c949bc6 commit dc25003
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
@RequiredArgsConstructor
public enum KtWizStadiumStatusType implements StadiumStatusType{

//특징 확인 필요
CENTER("https://kr.object.ncloudstorage.com/hitzone-bucket/hitzone/guide/kt/center.svg",
"중앙지정석",
"#5E346E",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
import java.util.Arrays;
import java.util.List;

import static kusitms.backend.result.domain.enums.KtWizStadiumStatusType.CHEERING_DUMMY;

@Service
@RequiredArgsConstructor
public class StadiumService {
Expand Down Expand Up @@ -55,6 +57,7 @@ public GetZoneGuideResponseDto getZoneGuide(String stadiumName, String zoneName)

private List<GetStadiumInfosResponseDto.ZoneInfo> getZonesNameAndColorFromStadium(StadiumStatusType[] statusTypes) {
return Arrays.stream(statusTypes)
.filter(status -> status != CHEERING_DUMMY)
.map(status -> GetStadiumInfosResponseDto.ZoneInfo.of(status.getZoneName(), status.getZoneColor()))
.toList();
}
Expand All @@ -65,4 +68,4 @@ private StadiumStatusType findZoneInStadium(StadiumStatusType[] statusTypes, Str
.findFirst()
.orElseThrow(() -> new CustomException(StadiumErrorStatus._NOT_FOUND_ZONE));
}
}
}

0 comments on commit dc25003

Please sign in to comment.