Skip to content

Commit

Permalink
fix: 그룹스케줄 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
SangWoon123 committed Aug 8, 2024
1 parent 2d75ec5 commit 6ea752d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.tukorea.planding.domain.schedule.dto.request.ScheduleRequest;
import com.tukorea.planding.domain.schedule.dto.response.ScheduleResponse;
import com.tukorea.planding.domain.schedule.entity.Schedule;
import com.tukorea.planding.domain.schedule.repository.GroupScheduleRepository;
import com.tukorea.planding.domain.schedule.repository.ScheduleRepository;
import com.tukorea.planding.global.error.BusinessException;
import com.tukorea.planding.global.error.ErrorCode;
Expand All @@ -18,6 +19,7 @@
public class ScheduleQueryService {

private final ScheduleRepository scheduleRepository;
private final GroupScheduleRepository groupScheduleRepository;

public List<ScheduleResponse> findOverlapSchedule(Long userId, ScheduleRequest scheduleRequest) {
List<Schedule> overlapSchedules = scheduleRepository.findOverlapSchedules(userId, scheduleRequest.scheduleDate(), scheduleRequest.startTime(), scheduleRequest.endTime());
Expand Down Expand Up @@ -68,6 +70,10 @@ public void deleteById(Long scheduleId) {
scheduleRepository.deleteById(scheduleId);
}

public void deleteGroupScheduleById(Long scheduleId){
groupScheduleRepository.deleteById(scheduleId);
}

public List<Schedule> findByUserAndScheduleDateBetween(Long userId, LocalDate startOfWeek, LocalDate endOfWeek) {
return scheduleRepository.findByUserAndScheduleDateBetween(userId, startOfWeek, endOfWeek);
}
Expand Down

0 comments on commit 6ea752d

Please sign in to comment.