-
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
fix: 회원이 가지고 있는 만료되지 않은 쿠폰에 대한 브랜드 리스트 조회 API 개발 #17
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e3517d5
refactor: 일반 회원가입 제거
versatile0010 8b147b5
refactor: 일반 회원가입 제거
versatile0010 447a7d8
refactor: Login Dto 위치 변경
versatile0010 506a209
refactor: Member Dto 이름 변경
versatile0010 02a2500
feat: CouponItemRepository 메서드 추가
versatile0010 0adc20f
feat: MemberDto 추가
versatile0010 a769c64
feat: 회원이 소유한 쿠폰의 브랜드 리스트 조회 API
versatile0010 6c0ed01
feat: 회원이 소유한 쿠폰의 브랜드 리스트 조회 API
versatile0010 22b5140
Merge branch 'main' of https://github.com/KUIT-Couphone/Couphone-Serv…
versatile0010 d33111b
Merge branch 'main' of https://github.com/KUIT-Couphone/Couphone-Serv…
versatile0010 f71b1dd
feat: 만료된 쿠폰은 쿼리에서 제외
versatile0010 6a2e9c9
feat: 쿠폰의 상태도 반환하도록 변경
versatile0010 874ccbb
refactor: BrandDto
versatile0010 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
2 changes: 1 addition & 1 deletion
2
...r/dto/member/request/LoginRequestDto.java → ...phoneserver/dto/auth/LoginRequestDto.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
2 changes: 1 addition & 1 deletion
2
...dto/member/response/LoginResponseDto.java → ...honeserver/dto/auth/LoginResponseDto.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
36 changes: 0 additions & 36 deletions
36
src/main/java/com/example/couphoneserver/dto/member/request/AddMemberRequestDto.java
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
src/main/java/com/example/couphoneserver/dto/member/response/BrandDto.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.example.couphoneserver.dto.member.response; | ||
|
||
import com.example.couphoneserver.domain.CouponItemStatus; | ||
import com.example.couphoneserver.dto.brand.GetBrandResponse; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Getter | ||
public class BrandDto { | ||
@Schema(description = "브랜드 정보") | ||
GetBrandResponse brandInfo; | ||
@Schema(description = "쿠폰 상태", example = "ACTIVE") | ||
CouponItemStatus couponItemStatus; | ||
@Schema(description = "만료 시간", example = "2024-01-29 18:35:46.434060") | ||
LocalDateTime expiredDate; | ||
|
||
public BrandDto(GetBrandResponse brand, CouponItemStatus status) { | ||
this.expiredDate = brand.getCreatedDate().plusMonths(6); | ||
this.couponItemStatus = status; | ||
this.brandInfo = brand; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
...in/java/com/example/couphoneserver/dto/member/response/GetMemberCouponBrandsResponse.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,34 @@ | ||
package com.example.couphoneserver.dto.member.response; | ||
|
||
import com.example.couphoneserver.domain.MemberGrade; | ||
import com.example.couphoneserver.domain.MemberStatus; | ||
import com.example.couphoneserver.domain.entity.Member; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
|
||
import java.util.List; | ||
|
||
@Getter | ||
public class GetMemberCouponBrandsResponse { | ||
@Schema(example = "1", description = "회원 아이디") | ||
private Long id; | ||
@Schema(example = "김이름", description = "회원 이름") | ||
private String name; | ||
@Schema(example = "[email protected]", description = "이메일") | ||
private String email; | ||
@Schema(example = "ROLE_MEMBER", description = "회원 권한") | ||
private MemberGrade memberGrade; | ||
@Schema(example = "ACTIVE", description = "회원 상태") | ||
private MemberStatus memberStatus; | ||
@Schema(description = "회원 정보와, 회원이 가지고 있는 쿠폰에 대한 브랜드 목록을 반환") | ||
private List<BrandDto> brandInfoList; | ||
|
||
public GetMemberCouponBrandsResponse(Member member, List<BrandDto> brandsInfoList) { | ||
this.id = member.getId(); | ||
this.name = member.getName(); | ||
this.email = member.getEmail(); | ||
this.memberGrade = member.getGrade(); | ||
this.memberStatus = member.getStatus(); | ||
this.brandInfoList= brandsInfoList; | ||
} | ||
} |
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
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.
이미 있는 GetBrandResponse에 쿠폰 상태, 만료 시간만 추가해서 이용해도 될 것 같아요..!
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.
오! 그러네요. 저녁에 반영해보도록 하겟습니다,,,