Skip to content

Commit

Permalink
refactor: myGroupList에서 myGroups로 이름 변경 #371
Browse files Browse the repository at this point in the history
  • Loading branch information
SongJaeHoonn committed Jun 11, 2024
1 parent b1bdd49 commit 9e47f20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

public interface ScheduleRepositoryCustom {

Page<Schedule> findByDateRangeAndMember(LocalDate startDate, LocalDate endDate, List<ActivityGroup> myGroupList, Pageable pageable);
Page<Schedule> findByDateRangeAndMember(LocalDate startDate, LocalDate endDate, List<ActivityGroup> myGroups, Pageable pageable);

Page<Schedule> findByConditions(Integer year, Integer month, SchedulePriority priority, Pageable pageable);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ScheduleRepositoryImpl implements ScheduleRepositoryCustom {
private final JPAQueryFactory queryFactory;

@Override
public Page<Schedule> findByDateRangeAndMember(LocalDate startDate, LocalDate endDate, List<ActivityGroup> myGroupList, Pageable pageable) {
public Page<Schedule> findByDateRangeAndMember(LocalDate startDate, LocalDate endDate, List<ActivityGroup> myGroups, Pageable pageable) {
QSchedule schedule = QSchedule.schedule;
BooleanBuilder builder = new BooleanBuilder();

Expand All @@ -37,9 +37,9 @@ public Page<Schedule> findByDateRangeAndMember(LocalDate startDate, LocalDate en
builder.and(schedule.endDateTime.goe(startDateTime))
.and(schedule.startDateTime.loe(endDateTime));

if (myGroupList != null && !myGroupList.isEmpty()) {
if (myGroups != null && !myGroups.isEmpty()) {
builder.and(schedule.activityGroup.isNull()
.or(schedule.activityGroup.in(myGroupList)));
.or(schedule.activityGroup.in(myGroups)));
} else {
builder.and(schedule.activityGroup.isNull());
}
Expand Down

0 comments on commit 9e47f20

Please sign in to comment.