Skip to content

refactor: 백신 도메인 리펙토링#230

Merged
jun23314 merged 30 commits intodevelopfrom
refactor/#215_vaccination
May 9, 2025
Merged

refactor: 백신 도메인 리펙토링#230
jun23314 merged 30 commits intodevelopfrom
refactor/#215_vaccination

Conversation

@parkhs21
Copy link
Collaborator

#️⃣연관된 이슈

📝작업 내용

@parkhs21 parkhs21 added the 🔧 Refactor 기능 고도화, 리팩토링을 진행할 때 사용합니다 label Mar 18, 2025
@parkhs21 parkhs21 self-assigned this Mar 18, 2025
@parkhs21 parkhs21 linked an issue Mar 18, 2025 that may be closed by this pull request
3 tasks
@github-actions
Copy link

github-actions bot commented Mar 18, 2025

Test Results

22 tests  +4   17 ✅ +4   8s ⏱️ +3s
23 suites +5    0 💤 ±0 
23 files   +5    5 ❌ ±0 

For more details on these failures, see this check.

Results for commit c8b94a1. ± Comparison against base commit ff5a9c8.

♻️ This comment has been updated with latest results.

Copy link
Collaborator

@2dhhh 2dhhh left a comment

Choose a reason for hiding this comment

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

리뷰확인해주세요

Copy link
Collaborator

Choose a reason for hiding this comment

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

생성자 of로 통일하기로 하지 않았나요?
혹시 준희님 코드에 맞춰서 저렇게 일부로 수정하신건가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

v1은 수정하지 않았습니다.

Copy link
Collaborator

Choose a reason for hiding this comment

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

build() 빼도 될 것 같습니다

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

v1은 수정하지 않았습니다.


@Query("SELECT v FROM Vaccination v WHERE v.pet = :pet ORDER BY v.timeYear DESC, v.timeMonth DESC, v.timeDay DESC")
List<Vaccination> findAllByMemberAndPet(@Param("pet") Pet pet);
List<Vaccination> findAllByPetOrderByVaccinatedAtDesc(@Param("pet") Pet pet);
Copy link
Contributor

Choose a reason for hiding this comment

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

@query 부분 삭제했는데 @param은 왜 남아있는건가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

반영했어요

List<Vaccination> findAllByPetOrderByVaccinatedAtDesc(@Param("pet") Pet pet);

default @NonNull Vaccination getById(@NonNull Long id) {
return findById(id).orElseThrow(VaccinationNotFoundExceptionV2::new);
Copy link
Contributor

Choose a reason for hiding this comment

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

@NotNull을 사용하는 이유가 따로 있나요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

interface 구현에 따라서, validation 적용

@PathVariable Long petId,
@RequestBody CreateVaccinationRequest request) {
vaccinationService.createVaccinationInfo(loginInfo.memberId(), petId, request);
vaccinationService.createVaccinationInfo(petId, request);
Copy link
Contributor

Choose a reason for hiding this comment

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

왜 제대로된 LoginInfo인지 확인은 안해주나요,,

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

반영했어요

@jun23314 jun23314 merged commit d316640 into develop May 9, 2025
0 of 3 checks passed
@jun23314 jun23314 deleted the refactor/#215_vaccination branch May 9, 2025 10:57
2dhhh pushed a commit that referenced this pull request May 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔧 Refactor 기능 고도화, 리팩토링을 진행할 때 사용합니다

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] 백신 도메인 리팩토링

3 participants