diff --git a/src/main/java/com/postgraduate/domain/salary/domain/repository/SalaryDslRepositoryImpl.java b/src/main/java/com/postgraduate/domain/salary/domain/repository/SalaryDslRepositoryImpl.java index 28574ea8..3a73d664 100644 --- a/src/main/java/com/postgraduate/domain/salary/domain/repository/SalaryDslRepositoryImpl.java +++ b/src/main/java/com/postgraduate/domain/salary/domain/repository/SalaryDslRepositoryImpl.java @@ -127,13 +127,14 @@ public List findAllByDone() { @Override public List findAllBySalaryNoneAccount(LocalDate salaryDate, Senior searchSenior) { - Salary nowSalary = queryFactory.selectFrom(salary) + List nowSalaries = queryFactory.selectFrom(salary) .where( salary.senior.eq(searchSenior), salary.salaryDate.eq(salaryDate) + .or(salary.salaryDate.goe(salaryDate)) ) - .fetchOne(); - if (nowSalary.getAccount() == null) { + .fetch(); + if (nowSalaries.get(0).getAccount() == null) { return queryFactory.selectFrom(salary) .distinct() .where( @@ -144,7 +145,7 @@ public List findAllBySalaryNoneAccount(LocalDate salaryDate, Senior sear .fetchJoin() .fetch(); } - return List.of(nowSalary); + return nowSalaries; } }