File tree Expand file tree Collapse file tree
src/main/java/ceos/backend
domain/application/repository Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import ceos .backend .domain .application .domain .ApplicationInterview ;
66import java .util .List ;
77import org .springframework .data .jpa .repository .JpaRepository ;
8+ import org .springframework .data .jpa .repository .Query ;
9+ import org .springframework .data .repository .query .Param ;
810
911public interface ApplicationInterviewRepository extends JpaRepository <ApplicationInterview , Long > {
1012 List <ApplicationInterview > findAllByApplication (Application application );
13+
14+ @ Query (
15+ "select ai from ApplicationInterview ai"
16+ + " join fetch ai.interview"
17+ + " where ai.application = :application" )
18+ List <ApplicationInterview > findAllByApplicationFetchInterview (
19+ @ Param ("application" ) Application application );
1120}
Original file line number Diff line number Diff line change 1111import ceos .backend .infra .ses .domain .EmailType ;
1212import ceos .backend .infra .ses .domain .SendStatus ;
1313import ceos .backend .infra .ses .repository .EmailSendHistoryRepository ;
14- import java .util .List ;
1514import lombok .RequiredArgsConstructor ;
1615import lombok .extern .slf4j .Slf4j ;
1716import org .springframework .beans .factory .annotation .Value ;
2019import org .springframework .stereotype .Component ;
2120import org .thymeleaf .context .Context ;
2221
22+ import java .util .List ;
23+
2324@ Slf4j
2425@ Component
2526@ RequiredArgsConstructor
@@ -59,7 +60,8 @@ public void retryFailedApplicationEmails() {
5960 final List <ApplicationAnswer > answers =
6061 applicationAnswerRepository .findAllByApplication (application );
6162 final List <ApplicationInterview > interviews =
62- applicationInterviewRepository .findAllByApplication (application );
63+ applicationInterviewRepository .findAllByApplicationFetchInterview (
64+ application );
6365 final Context context =
6466 awsSESMailGenerator .generateApplicationMailContext (
6567 application , answers , interviews );
You can’t perform that action at this time.
0 commit comments