Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop동기화 #259

Merged
merged 8 commits into from
May 8, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,14 @@ public List<Salary> findAllByDone() {

@Override
public List<Salary> findAllBySalaryNoneAccount(LocalDate salaryDate, Senior searchSenior) {
Salary nowSalary = queryFactory.selectFrom(salary)
List<Salary> 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(
Expand All @@ -144,7 +145,7 @@ public List<Salary> findAllBySalaryNoneAccount(LocalDate salaryDate, Senior sear
.fetchJoin()
.fetch();
}
return List.of(nowSalary);
return nowSalaries;
}
}

Loading