Skip to content

Commit

Permalink
๐Ÿ”€ :: (#188) ์™ธ์ถœ ๋ณต๊ท€ ์‹œ ์™ธ์ถœ์ฆ ์กฐํšŒ ์•ˆ๋˜๊ฒŒ ์ˆ˜์ • (#117)
Browse files Browse the repository at this point in the history
๐Ÿ”€ :: (#188) ์™ธ์ถœ ๋ณต๊ท€ ์‹œ ์™ธ์ถœ์ฆ ์กฐํšŒ ์•ˆ๋˜๊ฒŒ ์ˆ˜์ • (#117)
  • Loading branch information
alsco39 authored Jul 8, 2023
1 parent de9c807 commit dedd170
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ class ApplicationPersistenceAdapter(
.selectFrom(applicationEntity)
.innerJoin(applicationEntity.statusEntity, statusEntity)
.on(applicationEntity.statusEntity.id.eq(statusId))
.where(statusEntity.studentId.eq(studentId))
.where(
statusEntity.studentId.eq(studentId),
applicationEntity.isReturn.eq(false),
)
.fetchFirst()
?.let(applicationMapper::entityToDomain)
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,13 @@ class StatusPersistenceAdapter(
override fun queryPicnicStudentByStudentIdAndToday(studentId: UUID): Status? =
jpaQueryFactory
.selectFrom(statusEntity)
.join(applicationEntity)
.on(statusEntity.id.eq(applicationEntity.statusEntity.id))
.where(
statusEntity.studentId.eq(studentId),
statusEntity.type.eq(StatusType.PICNIC),
statusEntity.date.eq(LocalDate.now()),
applicationEntity.isReturn.eq(false),
)
.fetchFirst()
?.let(statusMapper::entityToDomain)
Expand Down

0 comments on commit dedd170

Please sign in to comment.