-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from PLACE-4th-UMC/fix/7-uploadStory
[fix/7-uploadStory] 스토리 업로드 - 전시회 검색 기능 추가
- Loading branch information
Showing
4 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
place/src/main/java/com/umc/place/exhibition/dto/SearchExhibitionsByNameResDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package com.umc.place.exhibition.dto; | ||
|
||
import com.umc.place.exhibition.entity.Exhibition; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.springframework.data.domain.Page; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
public class SearchExhibitionsByNameResDto { | ||
|
||
private List<SearchedExhibitionByName> searchedExhibitions = new ArrayList(); | ||
|
||
@Builder | ||
public SearchExhibitionsByNameResDto(Page<Exhibition> exhibitions) { | ||
this.searchedExhibitions | ||
= exhibitions.stream() | ||
.map(exhibition -> new SearchedExhibitionByName(exhibition)) | ||
.collect(Collectors.toList()); | ||
} | ||
|
||
@Data | ||
@NoArgsConstructor | ||
public static class SearchedExhibitionByName { | ||
private Long exhibitionIdx; | ||
private String exhibitionName; | ||
|
||
@Builder | ||
public SearchedExhibitionByName(Exhibition exhibition) { | ||
this.exhibitionIdx = exhibition.getExhibitionIdx(); | ||
this.exhibitionName = exhibition.getExhibitionName(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters