Repository navigation
fix: 대학교 중복 오류 수정 #510
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
fix: 대학교 중복 오류 수정 #510
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,7 @@ | |
|
|
||
| public interface UnivApplyInfoFilterRepository { | ||
|
|
||
| List<UnivApplyInfo> findAllByRegionCodeAndKeywords(String regionCode, List<String> keywords); | ||
| List<UnivApplyInfo> findAllByRegionCodeAndKeywords(String regionCode, List<String> keywords, String term); | ||
|
Contributor
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. 함수명도 바꿔주시면 좋을 거 같습니다~
Contributor
Author
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. 반영했습니다! |
||
|
|
||
| List<UnivApplyInfo> findAllByFilter(LanguageTestType testType, String testScore, String term, List<String> countryKoreanNames); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,7 +31,7 @@ public UnivApplyInfoFilterRepositoryImpl(EntityManager em) { | |
| } | ||
|
|
||
| @Override | ||
| public List<UnivApplyInfo> findAllByRegionCodeAndKeywords(String regionCode, List<String> keywords) { | ||
| public List<UnivApplyInfo> findAllByRegionCodeAndKeywords(String regionCode, List<String> keywords, String term) { | ||
| QUnivApplyInfo univApplyInfo = QUnivApplyInfo.univApplyInfo; | ||
| QUniversity university = QUniversity.university; | ||
| QCountry country = QCountry.country; | ||
|
|
@@ -45,6 +45,7 @@ public List<UnivApplyInfo> findAllByRegionCodeAndKeywords(String regionCode, Lis | |
| .where( | ||
| regionCodeEq(country, regionCode) | ||
| .and(countryOrUniversityContainsKeyword(country, university, keywords)) | ||
| .and(univApplyInfo.term.eq(term)) | ||
| ) | ||
|
Comment on lines
46
to
49
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. term null 처리 누락으로 즉시 예외 위험! @@
- return queryFactory
+ if (term == null) {
+ throw new IllegalArgumentException("term must not be null");
+ }
+
+ return queryFactory
.selectFrom(univApplyInfo)
@@
- .and(univApplyInfo.term.eq(term))
+ .and(univApplyInfo.term.eq(term))🤖 Prompt for AI Agents |
||
| .distinct() | ||
| .fetch(); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.