forked from kookmin-sw/cap-template
-
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 : BasicInfo CRUD api 구현 #11
Merged
Merged
Changes from 5 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
6ddb721
refactor: 키보드 포커스 잃을 때 이메일 중복체크하기 위해 로직분리
KimChanJin97 221893d
refactor: name 필드 제거
KimChanJin97 ad3714c
feat: 멤버 기본정보 CRUD 기능 구현
KimChanJin97 6351103
feat: 기본정보 기능 구현
KimChanJin97 ab80d31
feat: HeightGroup 열거형의 value 수정
KimChanJin97 a418030
feat: FaceInfo 엔티티 및 리포지토리 생성 & Member 엔티티 수정
KimChanJin97 6c22661
fix: 인터셉터 체인걸어두지 않아서 작동되지 않았던 버그 해결
KimChanJin97 75a91fa
refactor: 본인인증을 순수 인터셉터 방식으로 구현하기 위한 코드 수정
KimChanJin97 17e61ee
fix: Member 엔티티의 nickname 필드를 BasicInfo 엔티티로 이동
KimChanJin97 17faacc
fix: 빌드되지 않는 버그 해결
KimChanJin97 81585b8
fix: 액세스 토큰 만료기한을 3시간으로 수정
KimChanJin97 cd2d78e
fix: oauth2 인증방식 제거로 인해 컨트롤러 호출 url 수정
KimChanJin97 3631971
fix: oauth2 인증방식 제거로 인해 컨트롤러 호출 url 수정2
KimChanJin97 3273d6e
fix: 액세스 토큰이 블랙리스트 처리가 되지 않았음에도 불구하고 블랙리스트 인터셉터에 잡히는 버그 해결
KimChanJin97 e612eaa
feat: MultipartFile 커스텀 클래스 구현
KimChanJin97 3998346
feat: S3 연동을 위한 BucketConfig 구현
KimChanJin97 a0ae6bf
feat: FaceInfo 기능 구현에 사용될 DTO 생성
KimChanJin97 1b6f4b9
feat: 회원가입 직후 S3에 업로드되어 있는 기본프로필로 Member 의 FaceInfo 필드 초기화
KimChanJin97 b88db0f
feat: S3 연동을 위한 BucketService 구현
KimChanJin97 85629c7
faet: FaceInfo 객체 CRUD 기능 및 S3 연동
KimChanJin97 77563cc
feat: FaceInfo 객체 CRUD 컨트롤러 구현
KimChanJin97 6251827
chore: s3 의존성 추가
KimChanJin97 80b16b3
feat: 회원탈퇴 기능 구현
KimChanJin97 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
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
src/main/java/capstone/facefriend/member/controller/BasicInfoController.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 capstone.facefriend.member.controller; | ||
|
||
|
||
import capstone.facefriend.auth.controller.support.AuthMember; | ||
import capstone.facefriend.member.service.BasicInfoService; | ||
import capstone.facefriend.member.service.dto.BasicInfoRequest; | ||
import capstone.facefriend.member.service.dto.BasicInfoResponse; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.*; | ||
|
||
@Slf4j | ||
@RestController | ||
@RequiredArgsConstructor | ||
@RequestMapping("/members") | ||
public class BasicInfoController { | ||
|
||
private final BasicInfoService basicInfoService; | ||
|
||
@GetMapping("/basic-info") | ||
public ResponseEntity<BasicInfoResponse> getBasicInfo( | ||
@AuthMember Long memberId | ||
) { | ||
return ResponseEntity.ok(basicInfoService.getBasicInfo(memberId)); | ||
} | ||
|
||
@PutMapping("/basic-info") | ||
public ResponseEntity<BasicInfoResponse> putBasicInfo( | ||
@AuthMember Long memberId, | ||
@RequestBody BasicInfoRequest request | ||
) { | ||
return ResponseEntity.ok(basicInfoService.putBasicInfo(memberId, request)); | ||
} | ||
} |
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
124 changes: 119 additions & 5 deletions
124
src/main/java/capstone/facefriend/member/domain/BasicInfo.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 |
---|---|---|
@@ -1,20 +1,134 @@ | ||
package capstone.facefriend.member.domain; | ||
|
||
import lombok.Getter; | ||
import jakarta.persistence.*; | ||
import lombok.*; | ||
|
||
@Getter | ||
@Setter | ||
@Builder | ||
@AllArgsConstructor(access = AccessLevel.PRIVATE) | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@EqualsAndHashCode(of = {"id"}, callSuper = false) | ||
@Entity | ||
public class BasicInfo { | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@Column(nullable = false) | ||
private String nickname; | ||
|
||
private String gender; | ||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private Gender gender; | ||
|
||
private String age; | ||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private AgeGroup ageGroup; | ||
|
||
private String height; | ||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private AgeDegree ageDegree; | ||
|
||
private String region; | ||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private HeightGroup heightGroup; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(nullable = false) | ||
private Region region; | ||
|
||
public enum Gender { | ||
DEFAULT(""), | ||
MALE("남자"), | ||
FEMALE("여자"); | ||
|
||
private final String value; | ||
|
||
Gender(String value) { | ||
this.value = value; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
} | ||
|
||
public enum AgeGroup { | ||
DEFAULT(""), | ||
TWENTIES("20 대"), | ||
THIRTIES("30 대"), | ||
FORTIES("40 대"), | ||
FIFTIES("50 대"), | ||
SIXTIES("60 대"); | ||
|
||
private final String value; | ||
|
||
AgeGroup(String value) { | ||
this.value = value; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
} | ||
|
||
public enum AgeDegree { | ||
DEFAULT(""), | ||
EARLY("초반"), | ||
MIDDLE("중반"), | ||
LATE("후반"); | ||
|
||
private final String value; | ||
|
||
AgeDegree(String value) { | ||
this.value = value; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
} | ||
|
||
public enum HeightGroup { | ||
DEFAULT(""), | ||
FIFTIES("150cm 대 이하"), | ||
SIXTIES("160cm 대"), | ||
SEVENTIES("170cm 대"), | ||
EIGHTIES("180cm 대"), | ||
NINETIES("190cm 대 이상"); | ||
|
||
private final String value; | ||
|
||
HeightGroup(String value) { | ||
this.value = value; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
} | ||
|
||
public enum Region { | ||
DEFAULT(""), | ||
GANGNAM_SEOCHO_YANGJAE("강남, 서초, 양재"), | ||
JAMSIL_SONGPA_GANGDONG("잠실, 송파, 강동"), | ||
DONGJAK_GWANAK_SADANG("동작, 관악, 사당"), | ||
MAPO_SEODAEMUN_EUNPYANG("마포, 서대문, 은평"), | ||
JONGNO_JUNGGU_YONGSAN("종로, 중구, 용산"), | ||
NOWON_DOBONG_GANGBUK_SUNGBUK("노원, 도봉, 강북, 성북"), | ||
GWANGJIN_SEONGDONG_JUNGRANG_DONGDAEMUN("광진, 성동, 중랑, 동대문"), | ||
YEONGDEUNGPO_GURO_SINDORIM("영등포, 구로, 신도림"); | ||
|
||
private final String value; | ||
|
||
Region(String value) { | ||
this.value = value; | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
} | ||
} |
Oops, something went wrong.
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.
temporary-password 보다는 verified-code가 더 적절해 보입니다.
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.
그럼 url 이 auth/verify-verified-code 가 되어서 동어 반복? 이라 조금 어감이 이상한 것 같습니다... 혹시 다른 url 로 고칠만한게 없을까요?