Skip to content

Commit fa17b77

Browse files
authored
Merge pull request #630 from hyeonic/feature/615-precedence-service-refactoring
[refactor] 일정 조율 기능을 제거한다.
2 parents 89103d1 + fac6d23 commit fa17b77

File tree

12 files changed

+103
-649
lines changed

12 files changed

+103
-649
lines changed

backend/src/main/java/com/allog/dallog/domain/composition/application/CalendarService.java

Lines changed: 0 additions & 102 deletions
This file was deleted.

backend/src/main/java/com/allog/dallog/domain/composition/application/SchedulerService.java

Lines changed: 0 additions & 54 deletions
This file was deleted.

backend/src/main/java/com/allog/dallog/domain/schedule/application/ScheduleService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ public ScheduleResponse findById(final Long id) {
5252
public List<IntegrationSchedule> findInternalByMemberIdAndDateRange(final Long memberId,
5353
final DateRangeRequest dateRange) {
5454
Subscriptions subscriptions = new Subscriptions(subscriptionRepository.findByMemberId(memberId));
55-
return integrationSchedules(dateRange, subscriptions);
55+
return toIntegrationSchedules(dateRange, subscriptions);
5656
}
5757

58-
private List<IntegrationSchedule> integrationSchedules(final DateRangeRequest dateRange,
59-
final Subscriptions subscriptions) {
58+
private List<IntegrationSchedule> toIntegrationSchedules(final DateRangeRequest dateRange,
59+
final Subscriptions subscriptions) {
6060
List<Category> categories = subscriptions.findInternalCategory();
6161
return scheduleRepository.getByCategoriesAndBetween(categories, dateRange.getStartDateTime(),
6262
dateRange.getEndDateTime());

backend/src/main/java/com/allog/dallog/domain/subscription/domain/SubscriptionRepository.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@ public interface SubscriptionRepository extends JpaRepository<Subscription, Long
1212

1313
boolean existsByIdAndMemberId(final Long id, final Long memberId);
1414

15-
void deleteByCategoryIdIn(final List<Long> categoryIds);
16-
1715
// TODO: N + 1 개선 예정
1816
// TODO: @EntityGraph(attributePaths = {"category", "category.member"})
1917
List<Subscription> findByMemberId(final Long memberId);
2018

2119
List<Subscription> findByCategoryId(final Long categoryId);
2220

21+
List<Subscription> findByMemberIdIn(final List<Long> memberIds);
22+
23+
void deleteByCategoryIdIn(final List<Long> categoryIds);
24+
2325
default Subscription getById(final Long id) {
2426
return findById(id)
2527
.orElseThrow(NoSuchSubscriptionException::new);

backend/src/main/java/com/allog/dallog/presentation/SchedulerController.java

Lines changed: 0 additions & 30 deletions
This file was deleted.

backend/src/test/java/com/allog/dallog/acceptance/SchedulerAcceptanceTest.java

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)