File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
src/main/java/com/somemore/domains/recruitboard/repository Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -210,24 +210,27 @@ public List<RecruitBoard> findAll() {
210210 }
211211
212212 @ Override
213- public long updateRecruitingToClosedByStartDate (LocalDateTime startTime , LocalDateTime endTime ) {
214- BooleanExpression exp = statusEq (RECRUITING )
215- .and (volunteerStartDateTimeBetween (startTime , endTime ));
216-
213+ public long updateRecruitingToClosedByStartDate (LocalDateTime startTime ,
214+ LocalDateTime endTime ) {
217215 return queryFactory .update (recruitBoard )
218216 .set (recruitBoard .recruitStatus , CLOSED )
219- .where (exp )
217+ .where (
218+ statusEq (RECRUITING ),
219+ volunteerStartDateTimeBetween (startTime , endTime ),
220+ isNotDeleted ()
221+ )
220222 .execute ();
221223 }
222224
223225 @ Override
224226 public long updateClosedToCompletedByEndDate (LocalDateTime now ) {
225- BooleanExpression exp = statusEq (CLOSED )
226- .and (volunteerEndDateTimeBefore (now ));
227-
228227 return queryFactory .update (recruitBoard )
229228 .set (recruitBoard .recruitStatus , COMPLETED )
230- .where (exp )
229+ .where (
230+ statusEq (CLOSED ),
231+ volunteerEndDateTimeBefore (now ),
232+ isNotDeleted ()
233+ )
231234 .execute ();
232235 }
233236
You can’t perform that action at this time.
0 commit comments