-
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.
* fix: 카카오 회원가입 시 RequestBody 삭제 * feat: 중분류 별 사용자의 취향 답변 조회 필터 구현
- Loading branch information
1 parent
e631d8f
commit f2ee521
Showing
12 changed files
with
148 additions
and
13 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
35 changes: 35 additions & 0 deletions
35
Api/src/main/java/tify/server/api/question/model/vo/FavorAnswerInfoVo.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,35 @@ | ||
package tify.server.api.question.model.vo; | ||
|
||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import tify.server.domain.domains.question.dto.model.FavorAnswerVo; | ||
import tify.server.domain.domains.user.domain.LargeCategory; | ||
import tify.server.domain.domains.user.domain.SmallCategory; | ||
|
||
@Getter | ||
@Builder | ||
public class FavorAnswerInfoVo { | ||
|
||
@Schema(description = "취향 답변의 id", example = "1") | ||
private Long answerId; | ||
|
||
@Schema(description = "취향 답변의 대분류", example = "BEAUTY") | ||
private LargeCategory largeCategory; | ||
|
||
@Schema(description = "취향 답변의 소분류", example = "FRAGRANCE") | ||
private SmallCategory smallCategory; | ||
|
||
@Schema(description = "취향 답변 내용", example = "페리페라") | ||
private String answer; | ||
|
||
public static FavorAnswerInfoVo from(FavorAnswerVo favorAnswerVo) { | ||
return FavorAnswerInfoVo.builder() | ||
.answerId(favorAnswerVo.getAnswerId()) | ||
.largeCategory(favorAnswerVo.getLargeCategory()) | ||
.smallCategory(favorAnswerVo.getSmallCategory()) | ||
.answer(favorAnswerVo.getAnswer()) | ||
.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
23 changes: 23 additions & 0 deletions
23
Api/src/main/java/tify/server/api/question/service/RetrieveFavorAnswerUseCase.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,23 @@ | ||
package tify.server.api.question.service; | ||
|
||
|
||
import java.util.List; | ||
import lombok.RequiredArgsConstructor; | ||
import tify.server.api.question.model.vo.FavorAnswerInfoVo; | ||
import tify.server.core.annotation.UseCase; | ||
import tify.server.domain.domains.question.adaptor.FavorAnswerAdaptor; | ||
import tify.server.domain.domains.user.domain.SmallCategory; | ||
|
||
@UseCase | ||
@RequiredArgsConstructor | ||
public class RetrieveFavorAnswerUseCase { | ||
|
||
private final FavorAnswerAdaptor favorAnswerAdaptor; | ||
|
||
public List<FavorAnswerInfoVo> retrieveUserFavorAnswers( | ||
Long userId, SmallCategory smallCategory) { | ||
return favorAnswerAdaptor.searchBySmallCategory(userId, smallCategory).stream() | ||
.map(FavorAnswerInfoVo::from) | ||
.toList(); | ||
} | ||
} |
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
22 changes: 22 additions & 0 deletions
22
Domain/src/main/java/tify/server/domain/domains/question/dto/model/FavorAnswerVo.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,22 @@ | ||
package tify.server.domain.domains.question.dto.model; | ||
|
||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import tify.server.domain.domains.user.domain.LargeCategory; | ||
import tify.server.domain.domains.user.domain.SmallCategory; | ||
|
||
@Getter | ||
@Builder | ||
@AllArgsConstructor | ||
public class FavorAnswerVo { | ||
|
||
private Long answerId; | ||
|
||
private LargeCategory largeCategory; | ||
|
||
private SmallCategory smallCategory; | ||
|
||
private String answer; | ||
} |
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