@@ -50,44 +50,44 @@ public List<ConcertSearchInfo> findConcertDetailsByIds(List<UUID> concertIds) {
5050 return Collections .emptyList ();
5151 }
5252 return queryFactory
53- .select (Projections .constructor (ConcertSearchInfo .class ,
54- CONCERT .concertId ,
55- CONCERT .concertName ,
56- CONCERT_HALL .concertHallName ,
57- // 선예매 오픈일
58- Expressions .dateTimeTemplate (
59- Instant .class ,
60- "min({0})" ,
61- new CaseBuilder ()
62- .when (TICKET_OPEN_DATE .ticketOpenType .eq (TicketOpenType .PRE_OPEN ))
63- .then (TICKET_OPEN_DATE .openDate )
64- .otherwise ((Instant ) null )
65- ).as ("ticketPreOpenDate" ),
66- // 일반 예매 오픈일
67- Expressions .dateTimeTemplate (
68- Instant .class ,
69- "min({0})" ,
70- new CaseBuilder ()
71- .when (TICKET_OPEN_DATE .ticketOpenType .eq (TicketOpenType .GENERAL_OPEN ))
72- .then (TICKET_OPEN_DATE .openDate )
73- .otherwise ((Instant ) null )
74- ).as ("ticketGeneralOpenDate" ),
75- CONCERT_DATE .performanceDate .min ().as ("startDate" ),
76- CONCERT_DATE .performanceDate .max ().as ("endDate" ),
77- CONCERT .concertThumbnailStoredPath ,
78- Expressions .constant (0.0 )
79- ))
80- .from (CONCERT )
81- .leftJoin (CONCERT .concertHall , CONCERT_HALL )
82- .join (CONCERT_DATE ).on (CONCERT .eq (CONCERT_DATE .concert ))
83- .join (TICKET_OPEN_DATE ).on (CONCERT .eq (TICKET_OPEN_DATE .concert ))
84- .where (CONCERT .concertId .in (concertIds ))
85- .groupBy (CONCERT .concertId ,
86- CONCERT .concertName ,
87- CONCERT_HALL .concertHallName ,
88- CONCERT .concertThumbnailStoredPath
89- )
90- .fetch ();
53+ .select (Projections .constructor (ConcertSearchInfo .class ,
54+ CONCERT .concertId ,
55+ CONCERT .concertName ,
56+ CONCERT_HALL .concertHallName ,
57+ // 선예매 오픈일
58+ Expressions .dateTimeTemplate (
59+ Instant .class ,
60+ "min({0})" ,
61+ new CaseBuilder ()
62+ .when (TICKET_OPEN_DATE .ticketOpenType .eq (TicketOpenType .PRE_OPEN ))
63+ .then (TICKET_OPEN_DATE .openDate )
64+ .otherwise ((Instant ) null )
65+ ).as ("ticketPreOpenDate" ),
66+ // 일반 예매 오픈일
67+ Expressions .dateTimeTemplate (
68+ Instant .class ,
69+ "min({0})" ,
70+ new CaseBuilder ()
71+ .when (TICKET_OPEN_DATE .ticketOpenType .eq (TicketOpenType .GENERAL_OPEN ))
72+ .then (TICKET_OPEN_DATE .openDate )
73+ .otherwise ((Instant ) null )
74+ ).as ("ticketGeneralOpenDate" ),
75+ CONCERT_DATE .performanceDate .min ().as ("startDate" ),
76+ CONCERT_DATE .performanceDate .max ().as ("endDate" ),
77+ CONCERT .concertThumbnailStoredPath ,
78+ Expressions .constant (0.0 )
79+ ))
80+ .from (CONCERT )
81+ .leftJoin (CONCERT .concertHall , CONCERT_HALL )
82+ .join (CONCERT_DATE ).on (CONCERT .eq (CONCERT_DATE .concert ))
83+ .join (TICKET_OPEN_DATE ).on (CONCERT .eq (TICKET_OPEN_DATE .concert ))
84+ .where (CONCERT .concertId .in (concertIds ))
85+ .groupBy (CONCERT .concertId ,
86+ CONCERT .concertName ,
87+ CONCERT_HALL .concertHallName ,
88+ CONCERT .concertThumbnailStoredPath
89+ )
90+ .fetch ();
9191 }
9292
9393 /**
@@ -102,20 +102,20 @@ public List<AgentSearchInfo> findAgentDetailsByIds(List<UUID> agentIds) {
102102 return Collections .emptyList ();
103103 }
104104 return queryFactory
105- .select (Projections .constructor (AgentSearchInfo .class ,
106- MEMBER .memberId ,
107- MEMBER .nickname ,
108- MEMBER .profileImgStoredPath ,
109- PORTFOLIO .portfolioDescription ,
110- AGENT_PERFORMANCE_SUMMARY .averageRating ,
111- AGENT_PERFORMANCE_SUMMARY .reviewCount ,
112- Expressions .constant (0.0 )
113- ))
114- .from (MEMBER )
115- .leftJoin (PORTFOLIO ).on (PORTFOLIO .member .eq (MEMBER ))
116- .innerJoin (AGENT_PERFORMANCE_SUMMARY ).on (MEMBER .eq (AGENT_PERFORMANCE_SUMMARY .agent ))
117- .where (MEMBER .memberId .in (agentIds ))
118- .fetch ();
105+ .select (Projections .constructor (AgentSearchInfo .class ,
106+ MEMBER .memberId ,
107+ MEMBER .nickname ,
108+ MEMBER .profileImgStoredPath ,
109+ PORTFOLIO .portfolioDescription ,
110+ AGENT_PERFORMANCE_SUMMARY .averageRating ,
111+ AGENT_PERFORMANCE_SUMMARY .reviewCount ,
112+ Expressions .constant (0.0 )
113+ ))
114+ .from (MEMBER )
115+ .leftJoin (PORTFOLIO ).on (PORTFOLIO .member .eq (MEMBER ))
116+ .innerJoin (AGENT_PERFORMANCE_SUMMARY ).on (MEMBER .eq (AGENT_PERFORMANCE_SUMMARY .agent ))
117+ .where (MEMBER .memberId .in (agentIds ))
118+ .fetch ();
119119 }
120120
121121 /**
@@ -129,21 +129,21 @@ public List<AgentSearchInfo> findAgentDetailsByIds(List<UUID> agentIds) {
129129 public List <UUID > findAgentIdsByKeyword (String keyword , int limit ) {
130130 // 동적 WHERE 절 조합
131131 BooleanExpression whereClause = QueryDslUtil .allOf (
132- MEMBER .memberType .eq (MemberType .AGENT ),
133- QueryDslUtil .anyOf (
134- QueryDslUtil .likeIgnoreCase (MEMBER .nickname , keyword ),
135- QueryDslUtil .likeIgnoreCase (PORTFOLIO .portfolioDescription , keyword )
136- )
132+ MEMBER .memberType .eq (MemberType .AGENT ),
133+ QueryDslUtil .anyOf (
134+ QueryDslUtil .likeIgnoreCase (MEMBER .nickname , keyword ),
135+ QueryDslUtil .likeIgnoreCase (PORTFOLIO .portfolioDescription , keyword )
136+ )
137137 );
138138
139139 return queryFactory
140- .select (MEMBER .memberId )
141- .from (MEMBER )
142- .innerJoin (PORTFOLIO )
143- .on ((PORTFOLIO .member ).eq (MEMBER ))
144- .where (whereClause )
145- .limit (limit )
146- .fetch ();
140+ .select (MEMBER .memberId )
141+ .from (MEMBER )
142+ .innerJoin (PORTFOLIO )
143+ .on ((PORTFOLIO .member ).eq (MEMBER ))
144+ .where (whereClause )
145+ .limit (limit )
146+ .fetch ();
147147 }
148148
149149 /**
0 commit comments