Skip to content

Commit

Permalink
feat: 축제 정보 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
nyeroni committed Nov 20, 2024
1 parent 77c0225 commit a12f424
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class Artist {
@Column(nullable = false)
private String subname;

private String image = "";
private final String image = "";

@OneToMany(mappedBy = "artist", cascade = CascadeType.ALL, orphanRemoval = true)
private Set<FestivalArtist> eventArtists;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@AllArgsConstructor
public class FestivalResponse {
private String eventName;
private Integer year;
private String year;
private String date;
private List<FestivalWithArtistsResponse> dayLineup;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@ public List<ArtistTop10Response> getTopArtists() {

List<ArtistTop10Response> artistResponses = topArtistsData.stream()
.map(record -> {
String image = (record[3] != null) ? String.valueOf(record[3]) : "";
ArtistTop10Response response = new ArtistTop10Response(
String.valueOf(record[1]),
String.valueOf(record[2]),
String.valueOf(record[3]),
image,

((Number) record[4]).intValue()
);
return response;
})
.limit(10)
.collect(Collectors.toList());

return artistResponses;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private FestivalResponse convertToFestivalResponse(Festival festival) {
.collect(Collectors.toList());
return new FestivalResponse(
festival.getName(),
festival.getFestivalYear(),
String.valueOf(festival.getFestivalYear()),
festival.getDate(),
dayLineup
);
Expand Down

0 comments on commit a12f424

Please sign in to comment.