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

채팅방 생성 API 수정 및 테스트 코드 추가 #95

Merged
merged 11 commits into from
Oct 14, 2023

Conversation

1jeongg
Copy link
Member

@1jeongg 1jeongg commented Oct 14, 2023

작업 내용

  • 채팅방 생성시 chatId 반환하도록 변경
  • 플래너와 유저 당 채팅방은 최대 하나만 생성 가능하도록 변경
  • BaseException 내용 리팩토링(깔끔하게 정리)
  • MatchRepositoryTest, CoupleRepositoryTest, PlannerRepositoryTest, UserRepositoryTest, UserRestControllerTest, PaymentRestControllerTest, TokenRepositoryTest의 테스트 코드 추가
  • 채팅방 생성 API Test

Todo

  • sql 파일에서 table의 id가 1부터 시작하면 Dataintegrityviolationexception 에러가 발생한다. -> 멘토님께 질문하기

close #89

- null에서 chatId를 반환하도록 변환
- 플래너와 예비 부부 사이에 하나의 매칭 내역만 존재하도록 변경
- add할 때 Transaction 걸어주기
- BadRequest 에러 메시지 404 -> 400
- sql파일: order_id와 payment_amount 추가, match_tb id가 2부터 시작
- dummyEntity: 비활성화된 플래너, 새로운 Match, 새로운 Token 추가
@1jeongg 1jeongg added Done 진행 완료 test 테스트 코드 작성 labels Oct 14, 2023
@1jeongg 1jeongg self-assigned this Oct 14, 2023
@@ -14,4 +14,7 @@ public interface MatchJPARepository extends JpaRepository<Match, Long> {

@Query("select m from Match m where m.planner = :planner and m.confirmedAt != null order by m.confirmedAt desc limit 10")
List<Match> findLatestTenByPlanner(@Param("planner") Planner planner);

@Query("select m from Match m where m.planner = :planner and m.couple = :couple")
List<Match> findByCoupleAndPlanner(@Param("couple") Couple couple, @Param("planner") Planner plannerId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

별 거 아니긴 한데 Planner 뒤에 plannerId 말고 planner 라고 하려고 하셨던 거 아닌가욧!?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

헉 고치다가 잘못썼네요 ㅠㅠ 나중에 수정하겠습니다!

@chaee813
Copy link
Contributor

테스트 케이스 이렇게 꼼꼼하게 짜주시다니.. 고생 많으셨겠어요 ㅠㅠ!! 짱짱 수고하셨습니다!! 👍👍

@chaee813 chaee813 merged commit 57c525d into Step3-kakao-tech-campus:weekly Oct 14, 2023
1 check passed
@chaee813
Copy link
Contributor

chaee813 commented Oct 14, 2023

아 그리고 id 1부터 있을 때 에러 나는 건 여기 참고하시면 될 것 같아요! @ ActiveProfiles는 이미 붙어있어서 application-test.yml 파일만 2단계 때 쓰던 거 그대로 들고 오니까 Auto-increment 적용되고 teardown.sql에 있는 값들의 다음 id부터 생기네욥!!

@1jeongg
Copy link
Member Author

1jeongg commented Oct 15, 2023

헉 참고 블로그까지 ㅠㅠ 알려주셔서 감사합니다!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Done 진행 완료 test 테스트 코드 작성
Projects
None yet
Development

Successfully merging this pull request may close these issues.

채팅방 생성 API 수정 및 테스트코드 추가
2 participants