Skip to content
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

Weekly 11 반영 #124

Merged
merged 293 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
293 commits
Select commit Hold shift + click to select a range
9ca780c
fix: Autowired 제거
rbm0524 Nov 7, 2024
e2aec99
refactor: 클래스를 상속해서 Category에 대한 Converter가 동작하도록 수정
rbm0524 Nov 7, 2024
59c7550
feat: OrderDetail 엔티티에 updatePrice 메서드 추가
ajy9851 Nov 7, 2024
47963ef
feat: updateOrderPrice 메서드 추가
ajy9851 Nov 7, 2024
0a21711
feat: 참여자 가격 수정 req 레코드 클래스
ajy9851 Nov 7, 2024
505eb95
fix: CategoryConverter를 사용하는 것으로 수정
rbm0524 Nov 7, 2024
7b83ee7
feat: 가격 수정 엔드포인트 생성
ajy9851 Nov 7, 2024
74acf00
Merge branch 'weekly_10' of https://github.com/kakao-tech-campus-2nd-…
ajy9851 Nov 8, 2024
4a191d5
fix: 어노테이션 수정
ajy9851 Nov 8, 2024
40c7898
refactor: 메서드명 변경
ajy9851 Nov 8, 2024
56dd002
refactor: 메서드명 변경
ajy9851 Nov 8, 2024
cabbdf7
Revert "refactor: 메서드명 변경"
ajy9851 Nov 8, 2024
e5f8442
fix: 잘못 pull한 것들 수정
ajy9851 Nov 8, 2024
6635e7e
chore: coolsms 추가
ajy9851 Nov 8, 2024
3f5cc53
refactor: 주석 제거
ajy9851 Nov 8, 2024
47fe1a0
fix: Converter를 통해 코드를 저장하도록 수정 + refactor
rbm0524 Nov 8, 2024
46cdfca
fix: SpotMapper에서 category가 매핑이 되지 않는 부분 수정
rbm0524 Nov 8, 2024
929af21
fix: response는 String이므로 비교 대상 수정
rbm0524 Nov 8, 2024
13794a9
style: 코드 스타일 수정
rbm0524 Nov 8, 2024
136032f
refactor: 사용하지 않는 import문 제거
rbm0524 Nov 8, 2024
4501e7a
Merge branch 'weekly_10' of https://github.com/kakao-tech-campus-2nd-…
ajy9851 Nov 8, 2024
31725c5
refactor: 페이지 리다이렉트 외부 url이 가능하도록 함
westzeroright Nov 8, 2024
ee23776
feat: 로그아웃 구현, 쿠키 삭제
westzeroright Nov 8, 2024
f886d21
refactor: 리다이렉트url을 value로 주입받음
westzeroright Nov 8, 2024
e15d181
fix: 응답헤더 토큰 쿠키 삭제
westzeroright Nov 8, 2024
5a37c04
feat: JwtInterceptor 구현
westzeroright Nov 8, 2024
9e568e8
Merge branch 'weekly_10' into feat/91/interceptor
westzeroright Nov 8, 2024
853d7c0
fix: 버전 수정
rbm0524 Nov 9, 2024
e44120e
fix: binding 의존성 추가
rbm0524 Nov 9, 2024
386a4ec
fix: 프론트에서 id값을 직접 주지 않으므로 id 필드 삭제
rbm0524 Nov 9, 2024
5cbda13
feat: PASSWORD 환경변수 설정
rbm0524 Nov 9, 2024
b5c614e
Merge pull request #93 from kakao-tech-campus-2nd-step3/feat/91/inter…
westzeroright Nov 9, 2024
c01e2d5
fix: API 명세에 맞게 수정
rbm0524 Nov 10, 2024
d4dec65
feat: 멤버 인증 추가
rbm0524 Nov 10, 2024
44fd141
feat: 멤버 아이디 설정
rbm0524 Nov 10, 2024
e13617f
feat: 생성한 Spot을 모두 조회하는 기능 추가, update 추가
rbm0524 Nov 10, 2024
4f193db
feat: 특정 멤버가 생성한 Spot을 모두 조회하는 기능 추가
rbm0524 Nov 10, 2024
b6f4e30
feat: MemberId 관련 기능 추가
rbm0524 Nov 10, 2024
1546571
feat: update 테스트 추가
rbm0524 Nov 10, 2024
30e8171
refactor: 위도, 경도도 반환하도록 수정
rbm0524 Nov 10, 2024
4ef1c8e
refactor: 값 검증 추가
rbm0524 Nov 10, 2024
d28aed9
fix: AfterMapping에서 spotDto를 반환하도록 수정
rbm0524 Nov 10, 2024
4ba6f46
fix: 바로 변환하는 것으로 수정
rbm0524 Nov 10, 2024
47ca4be
fix: 사용하지 않아도 된다고 판단해서 주석처리
rbm0524 Nov 10, 2024
02ba9c6
fix: 안쓰는 어노테이션 삭제
rbm0524 Nov 10, 2024
56d0b3c
fix: 주석 제거
rbm0524 Nov 11, 2024
a329e06
fix: setter로 넣을 필드값 수정
rbm0524 Nov 11, 2024
60905ec
refactor: 로깅 추가
rbm0524 Nov 11, 2024
28ddb2f
refactor: 로깅 추가
rbm0524 Nov 11, 2024
2ae4865
fix: 생성 메서드로 수정
rbm0524 Nov 11, 2024
e8703d7
refactor: 로그 추가
rbm0524 Nov 11, 2024
be26052
fix: 충돌 해결
ajy9851 Nov 11, 2024
33b2feb
refactor: 로그 추가, category 변환 추가
rbm0524 Nov 11, 2024
9dcc6cc
refactor: category 변환을 AfterMapping에서 수행하도록 수정
rbm0524 Nov 11, 2024
39f6c11
refactor: ToString 추가
rbm0524 Nov 11, 2024
d0a4cc6
refactor: 매핑 방법 수정에 따른 refactoring
rbm0524 Nov 11, 2024
f65461a
feat: Spot에 대한 임시 데이터 넣기
rbm0524 Nov 11, 2024
00a5100
fix: update에 대한 매핑 방식 변경
rbm0524 Nov 12, 2024
09ac369
refactor: memberService Mock으로 주입
rbm0524 Nov 12, 2024
584a2bf
weekly_10에 늦게 반영되었던 변경 사항 feat/95/spot-additional-test에 병합
rbm0524 Nov 12, 2024
8be26f2
refactor: JwtUtil의 패키지 이동에 대한 refactor
rbm0524 Nov 12, 2024
615e9d5
feat: 스팟 API도 인터셉터 제외 경로
westzeroright Nov 12, 2024
2d90524
Merge branch 'weekly_11' into feat/91/interceptor
westzeroright Nov 12, 2024
d34d7dd
refactor: log 추가
rbm0524 Nov 12, 2024
ff1a234
refactor: log 위치 변경
rbm0524 Nov 12, 2024
5f2fc3d
Merge pull request #96 from kakao-tech-campus-2nd-step3/feat/91/inter…
westzeroright Nov 12, 2024
fe24cd2
refactor: 로그 찍기
rbm0524 Nov 13, 2024
a19effe
Merge branch 'refs/heads/weekly_11' into feat/95/spot-additional-test
rbm0524 Nov 13, 2024
2c19bea
refactor: header 수정
rbm0524 Nov 13, 2024
9e9432d
refactor: 로그 추가
rbm0524 Nov 13, 2024
6fcb91c
refactor: 대소문자 변경
rbm0524 Nov 13, 2024
cbc0872
refactor: 구조 변경
rbm0524 Nov 13, 2024
a0f7ee0
refactor: 로그 추가
rbm0524 Nov 13, 2024
811d30d
refactor: 원래대로 수정
rbm0524 Nov 13, 2024
ceb8b55
Merge branch 'weekly_11' of https://github.com/kakao-tech-campus-2nd-…
ajy9851 Nov 13, 2024
5e033cf
refactor: 회원가입시 플랫폼 지정
westzeroright Nov 13, 2024
7667ec2
feat: db에 이메일과 플랫폼이 같은 회원 존재시 회원가입 불가
westzeroright Nov 13, 2024
8b66f03
refactor: 리다이렉트 상태코드 302
westzeroright Nov 13, 2024
2e527a5
fix: 값 반대로 들어가는 부분 수정
rbm0524 Nov 13, 2024
e4dce62
refactor: 회원 정보 받는 순서 수정
westzeroright Nov 13, 2024
87f4bc0
refacotr: 응답으로 멤버아이디를 보냄
westzeroright Nov 13, 2024
cf5d66d
fix: AfterMapping 삭제, 바로 매핑되도록 수정
rbm0524 Nov 13, 2024
ef16983
refactor: 불필요한 import문 제거
rbm0524 Nov 13, 2024
c46fd69
fix: spotDto로 수정
rbm0524 Nov 13, 2024
bb41dca
fix: 괄호 추가로 에러 수정
rbm0524 Nov 13, 2024
184336f
fix: Category 클래스 인식하도록 수정
rbm0524 Nov 13, 2024
550a343
fix: Optional로 반환하기 때문에 orElseThrow로 처리
rbm0524 Nov 13, 2024
0206b39
fix: 다시 getter로 가져오면 에러이므로 메시지만 보내기
rbm0524 Nov 13, 2024
3874817
fix: get 수정
rbm0524 Nov 13, 2024
65d266d
fix: 사용하지 않는 메서드 삭제
rbm0524 Nov 13, 2024
65d8923
Merge pull request #99 from kakao-tech-campus-2nd-step3/feat/91/inter…
westzeroright Nov 13, 2024
8cffee8
fix: 정확도 수정
rbm0524 Nov 13, 2024
c986309
weekly_11 최신 버전 반영
rbm0524 Nov 13, 2024
65175a6
Merge branch 'weekly_11' of https://github.com/kakao-tech-campus-2nd-…
ajy9851 Nov 13, 2024
af93a91
fix: 상태코드 FOUND 반환하도록 수정
rbm0524 Nov 13, 2024
df17260
fix: RestController로 수정
rbm0524 Nov 13, 2024
4011902
refactor: precision만큼 잘라서 비교하도록 수정
rbm0524 Nov 13, 2024
015544d
Merge branch 'weekly_11' into feat/58/get-my-orders
ajy9851 Nov 13, 2024
14d9260
Merge pull request #83 from ajy9851/feat/58/get-my-orders
rbm0524 Nov 13, 2024
4ea8a4a
Weekly_11의 최신 사항 반영
rbm0524 Nov 13, 2024
00e1de2
test: 인가코드로 사용자 정보 얻어오기 테스트
westzeroright Nov 13, 2024
9573060
Merge branch 'weekly_11' into test/101/auth
westzeroright Nov 13, 2024
84b9882
test: 중복 회원 검증 테스트
westzeroright Nov 13, 2024
2f722a0
fix: 잘못된 파일 수정
westzeroright Nov 13, 2024
b62bd89
fix: 파일 커밋
westzeroright Nov 13, 2024
307bc23
fix: RequestBody로 수정, 임시 데이터 넣기
rbm0524 Nov 13, 2024
2ae095e
style: Convention 수정
rbm0524 Nov 13, 2024
23608c0
test: 기존 회원 로그인 테스트코드 작성
westzeroright Nov 13, 2024
96dc80d
fix: 임시데이터 삭제
rbm0524 Nov 13, 2024
edea31e
refactor: RequestParam으로 받아서 로직 수행하도록 수정
rbm0524 Nov 13, 2024
d926ab8
test: 신규회원 리다이렉트 테스트 코드
westzeroright Nov 13, 2024
bb7954f
test: 회원가입 테스트코드 작성
westzeroright Nov 13, 2024
a57b2d1
test: 로그아웃 테스트코드 작성
westzeroright Nov 13, 2024
3ea80ff
Merge pull request #103 from kakao-tech-campus-2nd-step3/test/101/auth
westzeroright Nov 13, 2024
5992be6
fix: 멤버테스트 수정
westzeroright Nov 13, 2024
1d9736d
Merge pull request #105 from kakao-tech-campus-2nd-step3/fix/104/memb…
westzeroright Nov 13, 2024
89219e8
feat: sms 발송 기능 생성
ajy9851 Nov 13, 2024
32210df
ajy9851 Nov 13, 2024
6796603
refactor: order_detail 생성 로직 추가
rbm0524 Nov 13, 2024
525f037
fix: 충돌 해결
ajy9851 Nov 13, 2024
2c4be8e
refactor: spot에 참가하는 로직 추가
rbm0524 Nov 13, 2024
aaefe2a
feat: sms api 구현
rbm0524 Nov 13, 2024
d48b798
refactor: 경로 수정
rbm0524 Nov 13, 2024
f286b38
refactor: 경로 수정
rbm0524 Nov 13, 2024
1fe5da5
fix: PostMapping할 필요가 없는 부분 수정
rbm0524 Nov 14, 2024
e443b13
feat: 포인트 차감 기능 구현
nove1080 Nov 8, 2024
921f497
feat: 결제 데이터베이스 더미 코드 삽입 방식 변경
nove1080 Nov 11, 2024
ff160aa
rebase from weekly_11
nove1080 Nov 11, 2024
2584c63
feat: 배포 에러 해결
nove1080 Nov 13, 2024
c253e49
fix: spotDto의 memberId가 아니라 인자로 받은 memberId를 사용해야 함
rbm0524 Nov 14, 2024
1e8d5b4
feat: build, deploy 쉘 스크립트 작성
rbm0524 Nov 14, 2024
5f081f9
fix: Spot 생성 후 주문 생성하도록 수정
rbm0524 Nov 14, 2024
ed6ee8d
refactor: 저장할 spot의 precision 수정해서 saveAndFlush하기
rbm0524 Nov 14, 2024
82dc4f5
fix: 순서 변경
rbm0524 Nov 14, 2024
0f97883
test: 깨지는 테스트 코드 주석 처리
nove1080 Nov 14, 2024
397a385
refactor: spot 생성시 초기 주문금액 -1, @PathVariable로 수정
rbm0524 Nov 14, 2024
fa1f9cc
Weekly_11 최신 사항 반영
rbm0524 Nov 14, 2024
e979b3e
refactor: 로그 추가
rbm0524 Nov 14, 2024
9ad18d3
fix: member로 조회하도록
rbm0524 Nov 14, 2024
8ef25a7
fix: 페이지 맞추가
rbm0524 Nov 14, 2024
3784e8e
refactor: spotId도 함께 넘기는 것으로 수정
rbm0524 Nov 14, 2024
16729f3
refactor: creator의 id가 아닌 것만 필터링
rbm0524 Nov 14, 2024
fea474b
style: 컨벤션 수정
rbm0524 Nov 14, 2024
50038a1
refactor: pathvariable로 수정
rbm0524 Nov 14, 2024
23dbdf4
style: 컨벤션 수정
rbm0524 Nov 14, 2024
98f6b9a
Merge pull request #106 from kakao-tech-campus-2nd-step3/feat/95/spot…
rbm0524 Nov 14, 2024
8b7d05c
Merge branch 'weekly_11' of https://github.com/kakao-tech-campus-2nd-…
ajy9851 Nov 14, 2024
3d36ff5
fix: 멤버테스트 재수정
westzeroright Nov 14, 2024
0d1d050
feat: restclient timeout 예외 처리
westzeroright Nov 14, 2024
0123242
feat: ServiceToken만을 위한 클래스를 만들고 적용
westzeroright Nov 14, 2024
43b1289
feat: data.sql 포인트 데이터 수정
nove1080 Nov 14, 2024
3aac73d
feat: 주문 삭제와 isPayed true로 변경 기능
ajy9851 Nov 14, 2024
8e6b7ee
fix: 오타 수정
ajy9851 Nov 14, 2024
73560ff
Merge pull request #109 from kakao-tech-campus-2nd-step3/yeongu
westzeroright Nov 14, 2024
f31b3dc
Merge pull request #108 from ajy9851/feat/107/orderDeleteAndisPayedCh…
rbm0524 Nov 14, 2024
8b2d8e2
fix: 상세 정보 반환 수정
rbm0524 Nov 14, 2024
c1df2c3
fix: 상세 정보 반환 수정
rbm0524 Nov 14, 2024
e6c009a
refactor: 주문 정보 반환 시 날짜와 카테고리 올바르게 반환하도록 수정
rbm0524 Nov 14, 2024
f2837f0
feat: 결제 요청 독촉 기능
ajy9851 Nov 14, 2024
b631b9c
Merge branch 'weekly_11' of https://github.com/kakao-tech-campus-2nd-…
ajy9851 Nov 14, 2024
16db0ff
Merge pull request #111 from ajy9851/feat/110/remindOrder
rbm0524 Nov 14, 2024
78ab0f5
refactor: ENUM값이 아니라 StringCategory 값 반환
rbm0524 Nov 14, 2024
f95e162
test: 멤버 컨트롤러 테스트 코드 작성
westzeroright Nov 14, 2024
6c36c91
Merge pull request #113 from kakao-tech-campus-2nd-step3/test/112/mem…
westzeroright Nov 14, 2024
eddf054
refactor: deliveryStatus 세팅
rbm0524 Nov 14, 2024
8c34d89
refactor: deadlineTime 추가
rbm0524 Nov 14, 2024
245b2e7
refactor: status 반환하도록 수정
rbm0524 Nov 14, 2024
14d6982
fix: DeliveryStatus도 import
rbm0524 Nov 14, 2024
0d0e3dd
fix: Status 반환하도록 수정
rbm0524 Nov 14, 2024
6fb31ee
fix: 중복 컨버터 수정
rbm0524 Nov 14, 2024
8232a2c
fix: Convert 추가
rbm0524 Nov 14, 2024
86ef46e
fix: 방장이 자신의 스팟에 참여할 때 예외 처리
ajy9851 Nov 14, 2024
053cbd5
Merge branch 'weekly_11' of https://github.com/kakao-tech-campus-2nd-…
ajy9851 Nov 14, 2024
2bd0ed0
fix: converter 수정
rbm0524 Nov 14, 2024
c36fe8d
fix: id값 없앤 것 수정
rbm0524 Nov 14, 2024
911bafe
feat: DeliveryStatus도 매핑하도록 수정
rbm0524 Nov 14, 2024
b936bf7
Merge pull request #115 from ajy9851/fix/114/creatorFix
ajy9851 Nov 14, 2024
49519e5
fix: deliveryStatus 필드가 없기 때문에 수정
rbm0524 Nov 14, 2024
ab0d5f9
Merge remote-tracking branch 'origin/weekly_11' into feat/95/spot-add…
rbm0524 Nov 14, 2024
e86604c
fix: null로 받으면 DELIVERING으로 매핑하도록
rbm0524 Nov 14, 2024
56ae489
fix: status 제대로 반환하도록 수정
rbm0524 Nov 14, 2024
17cdbf6
fix: default를 매핑해서 수행하도록 함
rbm0524 Nov 14, 2024
57c5c55
refactor: 로그찍기, 반환값 수정
rbm0524 Nov 14, 2024
f88a05d
fix: deliveryStatus 삭제
rbm0524 Nov 14, 2024
1e44b8e
fix: 오타 수정, 예외 삭제
rbm0524 Nov 14, 2024
6be4e8e
fix: 예외처리 삭제
rbm0524 Nov 14, 2024
87f5adb
fix: null 체크
rbm0524 Nov 14, 2024
8de669c
fix: converter 수정
rbm0524 Nov 14, 2024
3a0ffa5
fix:DELETE 요청에 맞게 RequestBody가 아닌 PathVariable로 받도록 수정
ajy9851 Nov 14, 2024
09936d7
fix: converter 수정
rbm0524 Nov 14, 2024
c183290
refactor: 참여자, 방장이 주문 상세 get 요청시 시간을 모두 보내도록 수정
ajy9851 Nov 14, 2024
4138b60
Merge pull request #117 from ajy9851/fix/116/MappingFix
ajy9851 Nov 14, 2024
3be91ad
fix: Converter 수정
rbm0524 Nov 14, 2024
49d0020
fix: Converter 수정
rbm0524 Nov 14, 2024
a311366
fix: Converter 수정
rbm0524 Nov 14, 2024
67de80d
fix: Converter 수정
rbm0524 Nov 14, 2024
061987c
fix: Converter 수정
rbm0524 Nov 14, 2024
9c6720f
fix: Converter 수정
rbm0524 Nov 14, 2024
ff7b8d1
fix: static으로 선언된 Converter 삭제
rbm0524 Nov 14, 2024
fc2a1d9
fix: converter 수정
rbm0524 Nov 14, 2024
3f4f7d2
fix: converter 수정
rbm0524 Nov 15, 2024
f62f94c
fix: 원래대로 복귀
rbm0524 Nov 15, 2024
47d955d
fix: fromStringToEnum 수정
rbm0524 Nov 15, 2024
33b4c01
fix: autoapply = true로 수정
rbm0524 Nov 15, 2024
4993918
fix: 인자 수정
rbm0524 Nov 15, 2024
a2bceec
fix: rollback
rbm0524 Nov 15, 2024
77a5a10
fix: rollback
rbm0524 Nov 15, 2024
7521719
feat: PaymentHistory UTC -> KST
nove1080 Nov 15, 2024
6ef800c
fix: rollback
rbm0524 Nov 15, 2024
be2c14f
fix: rollback
rbm0524 Nov 15, 2024
43d6bae
feat: PaymentHistory UTC -> KST
nove1080 Nov 15, 2024
7a2a389
fix: rollback
rbm0524 Nov 15, 2024
8a12aee
weekly_11 최신 반영
rbm0524 Nov 15, 2024
0e8f77a
fix: delivery_status 삭제
rbm0524 Nov 15, 2024
d6b7634
Merge remote-tracking branch 'origin/feat/95/spot-additional-test' in…
rbm0524 Nov 15, 2024
53b9043
fix: 카테고리 enum의 문자열로 반환
rbm0524 Nov 15, 2024
bec71f6
fix: Wrapper 클래스 사용
rbm0524 Nov 15, 2024
fe944bb
fix: getIsPayed로 수정
rbm0524 Nov 15, 2024
90c6439
refactor: 로그 찍기
rbm0524 Nov 15, 2024
769b211
refactor: 직접 save하도록 수정
rbm0524 Nov 15, 2024
db1693b
refactor: 참여자 주문 상세 정보 조회 시 orderId를 넘기도록 수정
ajy9851 Nov 15, 2024
6943519
Merge pull request #118 from ajy9851/fix/116/MappingFix
ajy9851 Nov 15, 2024
dd134dc
refactor: SpotDto의 null이 아닌 필드만 Spot에 덮어쓰도록 수정
rbm0524 Nov 15, 2024
77a693d
Merge branch 'weekly_11' into feat/95/spot-additional-test
rbm0524 Nov 15, 2024
4649c41
refactor: StringCategory를 반환하도록 수정
rbm0524 Nov 15, 2024
79d01a2
feat: 필수 입력 사항에 대한 검증
westzeroright Nov 15, 2024
14ba31d
refactor: Mapper를 사용하지 않고 필요한 필드만 매핑
rbm0524 Nov 15, 2024
b118042
refactor: StringCategory 반환하도록 수정
rbm0524 Nov 15, 2024
b395169
Merge pull request #120 from kakao-tech-campus-2nd-step3/feat/119/val…
westzeroright Nov 15, 2024
75105fe
refactor: 가격 업데이트 로직에 주문 완료 코드 추가
ajy9851 Nov 15, 2024
d1d747c
Merge branch 'weekly_11' of https://github.com/kakao-tech-campus-2nd-…
ajy9851 Nov 15, 2024
1f1a891
Merge pull request #121 from ajy9851/fix/116/MappingFix
ajy9851 Nov 15, 2024
c761fc2
Merge branch 'weekly_11' into feat/95/spot-additional-test
rbm0524 Nov 15, 2024
bc2ba8c
style: 컨벤션 수정
rbm0524 Nov 15, 2024
f983586
fix: 삭제 cascade.refresh
rbm0524 Nov 15, 2024
798fad8
fix: 삭제 cascade.refresh
rbm0524 Nov 15, 2024
2963f78
Merge pull request #122 from kakao-tech-campus-2nd-step3/feat/95/spot…
rbm0524 Nov 15, 2024
279bd6e
docs: 리드미 초안 작성
westzeroright Nov 15, 2024
ca16fa0
feat: 인터셉터 경로에서 swagger url 제외
westzeroright Nov 15, 2024
07829c8
Merge pull request #125 from kakao-tech-campus-2nd-step3/readme
westzeroright Nov 15, 2024
270413f
fix: 응답 헤더를 text/html로 변경
rbm0524 Nov 15, 2024
0a7f2eb
Merge branch 'weekly_11' into feat/95/spot-additional-test
rbm0524 Nov 15, 2024
c87dd6e
fix: 인터셉터 swagger 제외 경로 수정
westzeroright Nov 15, 2024
d7c200c
Merge branch 'weekly_11' into fix/interceptor
westzeroright Nov 15, 2024
16ceff0
Merge pull request #126 from kakao-tech-campus-2nd-step3/fix/interceptor
westzeroright Nov 15, 2024
6d2381b
fix: 200 ok를 주고 프론트에서 redirect 시키도록 수정
rbm0524 Nov 15, 2024
0e308bf
Merge branch 'weekly_11' into feat/95/spot-additional-test
rbm0524 Nov 15, 2024
7e1384a
fix: Controller로 수정
rbm0524 Nov 15, 2024
1eba710
fix: rollback
rbm0524 Nov 15, 2024
a6e08dc
Merge pull request #127 from kakao-tech-campus-2nd-step3/feat/95/spot…
rbm0524 Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,65 @@
# Team14_BE

14조 백엔드

## 프로젝트 소개
- **프로젝트 명**: 요기먹때
- **프로젝트 기간**: 24.09 ~ 24.11
- **프로젝트 목표**: 높아진 배달 요구 금액에 대한 부담을 모르는 사람과 함께 주문하여 해결한다.

> 모르는 사람과 함께 배달을 시켜보세요!

![image](https://github.com/user-attachments/assets/0d40077d-5791-4a3d-981d-8c2726c2083f)

- 🙋🏻‍♀️배달 가격이 부담스러운 사람을 대상으로
- 👩‍👦함께 배달 음식을 주문할 수 있는 사람을 매칭해
- 💵배달 최소 주문 금액 부담을 덜고 추가적인 배달음식비 또는 배달팁을 줄여보세요!

## 배포 링크

✅FE: https://team14-fe.vercel.app/
✅BE: https://order-together.duckdns.org/api/v1

## 주요 기능
### 1️⃣ 카카오 소설 로그인 기능
| <img src="https://github.com/user-attachments/assets/b0cd3118-7f61-4fcd-b179-02b9e92a7b24" width=300> | - 카카오 로그인을 통한 회원등록 절차 간소화 |
|-------------------------------------------------------------------------------------------------------|-----------------------|

### 2️⃣ 주문 결제(토스 페이먼츠 API)
| <img src="https://github.com/user-attachments/assets/307c2341-0379-4ba6-acc4-6235477f1912" width=300> | - 토스페이먼츠 API 를 사용한 포인트 충전 시스템<br/>-요기먹때에서 사용되는 재화를 충전할 수 있습니다. |
|-------------------------------------------------------------------------------------------------------|------------------------------------------------------------|

### 3️⃣ SMS 보내기 기능
| <img src="https://github.com/user-attachments/assets/44da63a7-4a6a-4e82-9004-3a367d038590" width=300> | - 문자로 참여할 배민 함께주문 링크를 받을 수 있습니다. |
|------------------------------------------------------------------------------------------------------|----------------------------------|

### 4️⃣ 카카오 지도 API
| <img src="https://github.com/user-attachments/assets/ad48f508-3df6-4145-8e9c-a3c9c361396c" width=300> | - 카카오 지도를 통해 참여할 스팟을 확인할 수 있습니다. |
|------------------------------------------------------------------------------------------------------|----------------------------------|


## ERD 이미지

![image](https://github.com/user-attachments/assets/59b8b750-ceb3-4484-a538-acd53d7fc370)

## 개발 인원 : 7명

| 이름 | 담당 역할 및 기능 |
| ------ | ---------------------------------------------------------------------- |
| 강호정 | <img src="https://img.shields.io/badge/-FE-blue"> 마이페이지 |
| 서민지 | <img src="https://img.shields.io/badge/-FE-blue"> 스팟(메인)페이지 |
| 임지환 | <img src="https://img.shields.io/badge/-FE-blue"> 로그인 및 결제페이지 |
| 나제법 | <img src="https://img.shields.io/badge/-BE-red"> 결제 API |
| 서영우 | <img src="https://img.shields.io/badge/-BE-red"> 로그인 API, 회원 API |
| 안재영 | <img src="https://img.shields.io/badge/-BE-red"> SMS API, 결제내역 API |
| 유보민 | <img src="https://img.shields.io/badge/-BE-red"> 지도(스팟) API |

## ⚒️ BE 기술 스택
| **Category** | **Technology** |
|----------------|------------------------------------|
| **Language** | Java 21 |
| **Framework** | Spring Boot 3.3.3, Spring Data JPA |
| **Database** | MySQL 8.0 |
| **Infra** | Amazon Web Service |
| **Testing** | JUnit5, Mockito |

7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation "io.jsonwebtoken:jjwt-api:${jjwt_version}"
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:${swagger_version}"
implementation 'org.mapstruct:mapstruct:1.6.2'
implementation 'org.mapstruct:mapstruct:1.5.5.Final'
implementation 'ch.hsr:geohash:1.4.0'

annotationProcessor 'org.mapstruct:mapstruct-processor:1.6.2'
implementation 'net.nurigo:sdk:4.3.0'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.5.Final'
annotationProcessor 'org.projectlombok:lombok-mapstruct-binding:0.2.0'

testImplementation 'org.springframework.boot:spring-boot-starter-test'
// testImplementation 'org.springframework.security:spring-security-test'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
package com.ordertogether.team14_be.auth.application.dto;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.util.LinkedMultiValueMap;

@ConfigurationProperties(prefix = "kakao")
@Slf4j
public record KakaoProperties(
String clientId, String redirectUrl, String authTokenUrl, String userApiUrl) {
public LinkedMultiValueMap<String, String> createBody(String code) {
LinkedMultiValueMap<String, String> body = new LinkedMultiValueMap<>();

log.info("clientId: {}", clientId());
log.info("redirectUrl: {}", redirectUrl());
log.info("code: {}", code);

body.add("grant_type", "authorization_code");
body.add("client_id", clientId());
body.add("redirect_uri", redirectUrl());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.ordertogether.team14_be.auth.application.dto;

public record TokenDto(String token) {}
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.ordertogether.team14_be.auth.application.service;

import com.ordertogether.team14_be.auth.JwtUtil;
import com.ordertogether.team14_be.auth.persistence.JwtUtil;
import com.ordertogether.team14_be.auth.persistence.exception.AlreadyExistMember;
import com.ordertogether.team14_be.member.application.service.MemberService;
import com.ordertogether.team14_be.member.persistence.entity.Member;
import java.util.Optional;
import org.springframework.stereotype.Service;

@Service
Expand All @@ -15,15 +17,14 @@ public AuthService(MemberService memberService, JwtUtil jwtUtil) {
this.jwtUtil = jwtUtil;
}

public String register(String email, String deliveryName, String phoneNumber) {
Member member = new Member(email, deliveryName, phoneNumber);
memberService.registerMember(member);
Long memberId = memberService.getMemberId(email);
String serviceToken = jwtUtil.generateToken(memberId);
return serviceToken;
}

public String getServiceToken(String email) {
return jwtUtil.generateToken(memberService.getMemberId(email));
}

public void validMember(String email, String platform) {
Optional<Member> isAlreadyMember = memberService.findMemberByEmail(email);
if (isAlreadyMember.isPresent() && isAlreadyMember.get().getPlatform().equals(platform)) {
throw new AlreadyExistMember();
}
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,41 @@
package com.ordertogether.team14_be.auth.application.service;

import com.ordertogether.team14_be.auth.application.dto.KakaoUserInfo;
import com.ordertogether.team14_be.auth.persistence.JwtUtil;
import com.ordertogether.team14_be.auth.presentation.KakaoClient;
import com.ordertogether.team14_be.member.application.service.MemberService;
import com.ordertogether.team14_be.member.persistence.entity.Member;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestClientException;

@RequiredArgsConstructor
@Service
public class KakaoAuthService {
private final KakaoClient kakaoClient;
private final MemberService memberService;
private final JwtUtil jwtUtil;
private static final String LOGIN_PLATFORM = "KAKAO";
private final AuthService authService;

public String getKakaoUserEmail(String authorizationCode) {
String kakaoToken = kakaoClient.getAccessToken(authorizationCode);
KakaoUserInfo kakaoUserInfo = kakaoClient.getUserInfo((kakaoToken));
String userKakaoEmail = kakaoUserInfo.kakaoAccount().email();
return userKakaoEmail;
try {
String kakaoToken = kakaoClient.getAccessToken(authorizationCode);
KakaoUserInfo kakaoUserInfo = kakaoClient.getUserInfo((kakaoToken));
String userKakaoEmail = kakaoUserInfo.kakaoAccount().email();
return userKakaoEmail;
} catch (RestClientException e) {
System.err.println(e.getMessage());
return null;
}
}

public String register(String email, String deliveryName, String phoneNumber) {
Member member = new Member(email, 0, phoneNumber, deliveryName, LOGIN_PLATFORM);
authService.validMember(email, LOGIN_PLATFORM);
memberService.registerMember(member);
Long memberId = memberService.getMemberId(email);
String serviceToken = jwtUtil.generateToken(memberId);
return serviceToken;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package com.ordertogether.team14_be.auth.persistence;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.ordertogether.team14_be.auth.token.TokenContext;
import com.ordertogether.team14_be.member.application.exception.NotFoundMember;
import com.ordertogether.team14_be.member.persistence.entity.Member;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;

@RequiredArgsConstructor
@Slf4j
@Component
public class JwtInterceptor implements HandlerInterceptor {
private final JwtUtil jwtUtil;

@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws Exception {
log.info("JwtInterceptor 실행");
if (HttpMethod.OPTIONS.matches(request.getMethod())) {
log.info("OPTIONS 요청");
return true;
}

logRequestDetails(request);

String authorization = request.getHeader(HttpHeaders.AUTHORIZATION);
String token = authorization.replaceAll("Bearer ", "");

if (token != null && token.length() > 10) {
log.debug("토큰 상태:: " + token);

if (jwtUtil.vaildToken(token)) {
ObjectMapper objectMapper = new ObjectMapper();

String member = objectMapper.writeValueAsString(jwtUtil.decodeJwt(token).get("member"));
log.info("member = " + member);
Member accessMember = objectMapper.readValue(member, Member.class);
log.info("accessMember = " + accessMember);

request.setAttribute("member", accessMember);
Long memberId = Long.valueOf(jwtUtil.getSubject(token));
log.info("memberId = " + memberId);
TokenContext.addCurrentMemberId(memberId);
return true;
}
} else {
throw new NotFoundMember();
}
return false;
}

private static void logRequestDetails(HttpServletRequest request) {
String clientIp = request.getHeader("X-Forwarded-For");
if (clientIp == null || clientIp.isEmpty()) {
clientIp = request.getRemoteAddr();
}
log.info("Request URI = " + request.getRequestURI());
log.info("Client IP = " + clientIp);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package com.ordertogether.team14_be.auth;
package com.ordertogether.team14_be.auth.persistence;

import com.ordertogether.team14_be.auth.persistence.exception.InvalidToken;
import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.MalformedJwtException;
import io.jsonwebtoken.SignatureAlgorithm;
import io.jsonwebtoken.security.Keys;
import java.nio.charset.StandardCharsets;
Expand Down Expand Up @@ -38,4 +40,21 @@ public String generateToken(Long data) {
public Claims decodeJwt(String token) {
return Jwts.parserBuilder().setSigningKey(key).build().parseClaimsJws(token).getBody();
}

public String getSubject(String token) {
return decodeJwt(token).getSubject();
}

public boolean vaildToken(String token) throws InvalidToken {
try {
Claims claims =
Jwts.parser()
.setSigningKey(key)
.parseClaimsJws(token) // 토큰 파싱
.getBody();
return true; // 유효하다면 true 반환
} catch (MalformedJwtException e) {
throw new InvalidToken();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.ordertogether.team14_be.auth.persistence.exception;

public class AlreadyExistMember extends RuntimeException {
public AlreadyExistMember() {
super("이미 회원이 존재합니다.");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.ordertogether.team14_be.auth.persistence.exception;

public class InvalidToken extends IllegalAccessException {
public InvalidToken() {
super("토큰이 유효하지 않습니다.");
}
}
Loading