-
Notifications
You must be signed in to change notification settings - Fork 2
prod :전반적인 도메인 로직 내에서 validation 체크 및 NPE 안정성 보강 #309
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
Merged
Merged
Changes from all commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
6e365b9
refactor: banner valid 추가
chominju02 510da44
refactor: AdminDashboard response 수정
chominju02 84a88f2
refactor: AdminDashboard count 함수 구현
chominju02 cc3e589
refactor: 신청 중복 검증 로직 이동
chominju02 36f5a58
refactor: 신청 약관 동의 체크 validator 구현
chominju02 c9f0463
refactor: 신청 응시과목 notNull 추가
chominju02 77ec41d
refactor: event null 체크 및 duration startDate 변경
chominju02 59a4aee
refactor: recommendation 변수 변경 및 notBlank 추가
chominju02 da821bd
refactor: profile null 체크 추가
chominju02 eb090a8
refactor: 신청 multi-insert 시 deleted 옵션 추가, 과목 삭제 시 p.deleted 옵션 검사 추가
chominju02 f883a22
refactor: 에러 코드 추가
chominju02 37fc049
refactor: request valid 검증 및 lunch 등록 여부 검증 로직 추가
chominju02 1562bbc
remove: 주석 제거
chominju02 af910d3
refactor: examTicketImgUrl 생성 함수 추가
chominju02 bc960b8
Merge branch 'develop' of https://github.com/mosu-dev/mosu-server int…
chominju02 ebfa48d
refactor: 관리자 DashBoardResponse 수정
chominju02 f279815
refactor: whiteList 수정
chominju02 c8c936c
feat: enhance admin dashboard to count aborted refunds and update ban…
polyglot-k 3a9d195
feat: add agreement validation method to AgreementRequest
polyglot-k 5951dc1
feat: remove existsByUserIdAndExamIds query from ApplicationJpaReposi…
polyglot-k f85c830
feat: update subjects field to use List instead of Set in Application…
polyglot-k a46f2ac
feat: enhance application validation by adding agreement check and im…
polyglot-k cd6da2b
feat: remove commented code from BannerRequest to improve clarity
polyglot-k c825149
feat: rename refundCounts to refundAbortedCounts in DashBoardResponse…
polyglot-k 26e233c
feat: update DurationRequest to use current date for startDate in toD…
polyglot-k 201b2b8
feat: simplify education description in EditProfileRequest schema
polyglot-k ec85327
feat: add error codes for terms agreement and exam application requir…
polyglot-k c72ab75
feat: improve null handling for attachment and duration in EventReque…
polyglot-k e9372d1
feat: add deleted flag handling in ExamApplication repository queries
polyglot-k 29053d7
feat: refactor exam ticket image URL retrieval and enhance request va…
polyglot-k a1d61d4
feat: enhance lunch availability check to include lunch price validation
polyglot-k d7ecbe2
feat: add validation annotations for required fields in ExamRequest
polyglot-k d3d563a
feat: add exam date validation in register method of ExamService
polyglot-k 64800d9
feat: add filter for deleted payments in deleteExamSubjectsWithDonePa…
polyglot-k d2a4f2d
feat: remove logging from GetApplicationsStepProcessor
polyglot-k 716093d
feat: rename recommendee fields to recommender in projection and DTO
polyglot-k 14dcdf9
feat: add method to count users by role exclusion in UserJpaRepository
polyglot-k 4084362
feat: simplify user existence check in SignUpAccountStepProcessor
polyglot-k d8331c6
Merge pull request #250 from mosu-dev/refactor/mosu-241
polyglot-k 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -23,7 +23,9 @@ public class ExamService { | |||||||||||||
|
|
||||||||||||||
| @Transactional | ||||||||||||||
| public void register(ExamRequest request) { | ||||||||||||||
| validateExamDate(request); | ||||||||||||||
| ExamJpaEntity exam = request.toEntity(); | ||||||||||||||
|
|
||||||||||||||
| examJpaRepository.save(exam); | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
|
|
@@ -71,4 +73,10 @@ public void close(Long examId) { | |||||||||||||
| .orElseThrow(() -> new CustomRuntimeException(ErrorCode.EXAM_NOT_FOUND)); | ||||||||||||||
| exam.close(); | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| private void validateExamDate(ExamRequest request) { | ||||||||||||||
| if (!request.deadlineTime().isBefore(request.examDate().atStartOfDay())) { | ||||||||||||||
| throw new CustomRuntimeException(ErrorCode.EXAM_DATE_AFTER_DEADLINE); | ||||||||||||||
| } | ||||||||||||||
|
Comment on lines
+78
to
+80
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Suggested change
|
||||||||||||||
| } | ||||||||||||||
| } | ||||||||||||||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
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.
The validation to check if all requested exams exist has been removed.
findAllByIdwill silently ignore non-existent IDs, which could lead to unexpected behavior. It's important to verify that all providedexamIds correspond to actual exams in the database by comparing the size of theexamIdSetwith the number ofexistingExamsfound.