-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 물품 주문자들의 성별 및 나이대별 평균 별점 구현 #161
Merged
The head ref may contain hidden characters: "128-\uBB3C\uD488-\uC8FC\uBB38\uC790\uB4E4\uC758-\uC131\uBCC4-\uBC0F-\uB098\uC774\uB300\uC5D0-\uB530\uB978-\uD3C9\uADE0-\uBCC4\uC810-\uAE30\uB2A5-\uAD6C\uD604"
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
3070868
test: '상품을 주문한 모든 주문자들의 성별 및 나이대에 따른 평균 별점 정보를 가져온다' 테스트
dahyen0o 63d0bf0
feat: '상품을 주문한 모든 주문자들의 성별 및 나이대에 따른 평균 별점 정보를 가져온다' 구현
dahyen0o b361338
refactor: RateService의 getGroupRates 메서드에서 결과를 한번에 받아오도록 변경
dahyen0o 6f33519
feat: 상품 상세 페이지에서 성별 및 나이대별 평균 별점 차트 구현
dahyen0o 5bc3296
refactor: findAllScoresByMemberGenderAndMemberBirthYear 메서드 이름 변경
dahyen0o 9ac3bdb
Merge remote-tracking branch 'origin/develop' into 128-물품-주문자들의-성별-및-…
dahyen0o File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
25 changes: 25 additions & 0 deletions
25
src/main/java/com/gugucon/shopping/rate/dto/response/GroupRateResponse.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,25 @@ | ||
package com.gugucon.shopping.rate.dto.response; | ||
|
||
import com.gugucon.shopping.member.domain.vo.BirthYearRange; | ||
import com.gugucon.shopping.member.domain.vo.Gender; | ||
import com.gugucon.shopping.rate.repository.dto.GroupAverageRateDto; | ||
import lombok.AccessLevel; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class GroupRateResponse { | ||
|
||
private Gender gender; | ||
private BirthYearRange birthYearRange; | ||
private RateResponse rate; | ||
|
||
public static GroupRateResponse of(final GroupAverageRateDto groupAverageRateDto, final double averageRate) { | ||
return new GroupRateResponse(groupAverageRateDto.getGender(), | ||
groupAverageRateDto.getBirthYearRange(), | ||
new RateResponse(groupAverageRateDto.getCount(), averageRate)); | ||
} | ||
} |
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
24 changes: 24 additions & 0 deletions
24
src/main/java/com/gugucon/shopping/rate/repository/dto/GroupAverageRateDto.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,24 @@ | ||
package com.gugucon.shopping.rate.repository.dto; | ||
|
||
import com.gugucon.shopping.member.domain.vo.BirthYearRange; | ||
import com.gugucon.shopping.member.domain.vo.Gender; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class GroupAverageRateDto { | ||
|
||
private final Gender gender; | ||
private final BirthYearRange birthYearRange; | ||
private final Long count; | ||
private final Long totalScore; | ||
|
||
public GroupAverageRateDto(final Gender gender, | ||
final BirthYearRange birthYearRange, | ||
final Long count, | ||
final Long totalScore) { | ||
this.gender = gender; | ||
this.birthYearRange = birthYearRange; | ||
this.count = count; | ||
this.totalScore = totalScore; | ||
} | ||
} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findAllGroup 어쩌구로 이름 바꾸면 좋을 것 같아요