Skip to content

Commit

Permalink
Merge pull request #108 from solid-connection/main
Browse files Browse the repository at this point in the history
[RELEASE] 오류 수정, DB 변경
  • Loading branch information
wibaek authored Nov 9, 2024
2 parents 84ac06d + d908841 commit b3b17ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public interface UniversityInfoForApplyRepository extends JpaRepository<Universi

Optional<UniversityInfoForApply> findByIdAndTerm(Long id, String term);

Optional<UniversityInfoForApply> findByKoreanNameAndTerm(String koreanName, String term);
Optional<UniversityInfoForApply> findFirstByKoreanNameAndTerm(String koreanName, String term);

@Query("SELECT c FROM UniversityInfoForApply c WHERE c.university IN :universities AND c.term = :term")
List<UniversityInfoForApply> findByUniversitiesAndTerm(@Param("universities") List<University> universities, @Param("term") String term);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class GeneralRecommendUniversities {
public void init() {
int i = 0;
while (recommendUniversities.size() < RECOMMEND_UNIVERSITY_NUM && i < candidates.size()) {
universityInfoForApplyRepository.findByKoreanNameAndTerm(candidates.get(i), term)
universityInfoForApplyRepository.findFirstByKoreanNameAndTerm(candidates.get(i), term)
.ifPresent(recommendUniversities::add);
i++;
}
Expand Down

0 comments on commit b3b17ea

Please sign in to comment.