-
Notifications
You must be signed in to change notification settings - Fork 1
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 #81 from Tea-Bliss/dev
[feat] 설문조사 Get API 추가
- Loading branch information
Showing
12 changed files
with
132 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package store.teabliss.survey.dto; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
import store.teabliss.survey.entity.Survey; | ||
import store.teabliss.tea.dto.TeaFinalDto; | ||
import store.teabliss.tea.entity.Tea; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
@Builder | ||
public class SurveyDto { | ||
|
||
private int taste; | ||
|
||
private int sale; | ||
|
||
private String category; | ||
|
||
private String caffeine; | ||
|
||
private List<TeaFinalDto> teas; | ||
|
||
public static SurveyDto of(Survey survey, List<Tea> list) { | ||
return SurveyDto.builder() | ||
.taste(survey.getTaste()) | ||
.sale(survey.getSale()) | ||
.category(survey.getCategory()) | ||
.caffeine(survey.getCaffeine()) | ||
.teas(TeaFinalDto.of(list)) | ||
.build(); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,6 @@ public interface SurveyMapper { | |
|
||
Long createSurvey(Survey survey); | ||
|
||
Survey findById(Long id); | ||
|
||
} |
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
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 |
---|---|---|
|
@@ -59,5 +59,7 @@ public interface TeaMapper { | |
|
||
// List<Tea> category(); | ||
|
||
List<Tea> surveyRecommendTea(Tea tea); | ||
|
||
|
||
} |
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