Skip to content

Commit

Permalink
HotFix : itemReader 코드 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ywj9811 committed Nov 20, 2024
1 parent 879a0e3 commit 1aaacdf
Showing 1 changed file with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,28 +84,28 @@ public Step createSalaryStep() {

@Bean
public QueryDslZeroPagingItemReader<CreateSalary> salaryReader() {
LocalDate date = getSalaryDate().plusDays(7);
log.info("not in date : {}", date);
return new QueryDslZeroPagingItemReader<>(entityManagerFactory, CHUNK_SIZE, queryFactory ->
queryFactory.select(Projections.constructor(CreateSalary.class,
senior.seniorId,
account.accountId,
account.bank,
account.accountNumber,
account.accountHolder))
.distinct()
.from(senior)
.join(user)
.on(senior.user.eq(user))
.leftJoin(account)
.on(account.senior.eq(senior))
.where(senior.seniorId.notIn(
JPAExpressions
.select(salary.senior.seniorId)
.from(salary)
.where(salary.salaryDate.eq(date))
))
.orderBy(senior.seniorId.desc())
);
return new QueryDslZeroPagingItemReader<>(entityManagerFactory, CHUNK_SIZE, queryFactory -> {
LocalDate date = getSalaryDate().plusDays(7);
log.info("not in date : {}", date);
return queryFactory.select(Projections.constructor(CreateSalary.class,
senior.seniorId,
account.accountId,
account.bank,
account.accountNumber,
account.accountHolder))
.distinct()
.from(senior)
.join(user)
.on(senior.user.eq(user))
.leftJoin(account)
.on(account.senior.eq(senior))
.where(senior.seniorId.notIn(
JPAExpressions
.select(salary.senior.seniorId)
.from(salary)
.where(salary.salaryDate.eq(date))
))
.orderBy(senior.seniorId.desc());
});
}
}

0 comments on commit 1aaacdf

Please sign in to comment.