Skip to content

Commit

Permalink
feat: 내 재활 운동 기록 통계 API 추가 완료 (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
limehee authored Sep 26, 2024
1 parent 1e29eec commit 771b9b2
Show file tree
Hide file tree
Showing 86 changed files with 139 additions and 1,934 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.stempo.api.domain.presentation.dto.request.BoardRequestDto;
import com.stempo.api.domain.presentation.dto.request.BoardUpdateRequestDto;
import com.stempo.api.domain.presentation.dto.response.BoardResponseDto;
import com.stempo.api.global.common.dto.PagedResponseDto;
import com.stempo.api.global.dto.PagedResponseDto;
import org.springframework.data.domain.Pageable;

public interface BoardService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import com.stempo.api.domain.presentation.dto.request.BoardRequestDto;
import com.stempo.api.domain.presentation.dto.request.BoardUpdateRequestDto;
import com.stempo.api.domain.presentation.dto.response.BoardResponseDto;
import com.stempo.api.global.common.dto.PagedResponseDto;
import com.stempo.api.global.dto.PagedResponseDto;
import com.stempo.api.global.exception.PermissionDeniedException;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
Expand Down Expand Up @@ -55,8 +55,8 @@ public Long deleteBoard(Long boardId) {
User user = userService.getCurrentUser();
Board board = repository.findByIdOrThrow(boardId);
board.validateAccessPermission(user);
board.delete();
return repository.save(board).getId();
repository.delete(board);
return board.getId();
}

private void validateAccessPermissionForSuggestion(BoardCategory category) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.stempo.api.domain.presentation.dto.request.HomeworkRequestDto;
import com.stempo.api.domain.presentation.dto.request.HomeworkUpdateRequestDto;
import com.stempo.api.domain.presentation.dto.response.HomeworkResponseDto;
import com.stempo.api.global.common.dto.PagedResponseDto;
import com.stempo.api.global.dto.PagedResponseDto;
import org.springframework.data.domain.Pageable;

public interface HomeworkService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.stempo.api.domain.presentation.dto.request.HomeworkRequestDto;
import com.stempo.api.domain.presentation.dto.request.HomeworkUpdateRequestDto;
import com.stempo.api.domain.presentation.dto.response.HomeworkResponseDto;
import com.stempo.api.global.common.dto.PagedResponseDto;
import com.stempo.api.global.dto.PagedResponseDto;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.stempo.api.domain.presentation.dto.request.RecordRequestDto;
import com.stempo.api.domain.presentation.dto.response.RecordResponseDto;
import com.stempo.api.domain.presentation.dto.response.RecordStatisticsResponseDto;

import java.time.LocalDate;
import java.util.List;
Expand All @@ -11,4 +12,6 @@ public interface RecordService {
String record(RecordRequestDto requestDto);

List<RecordResponseDto> getRecordsByDateRange(LocalDate startDate, LocalDate endDate);

RecordStatisticsResponseDto getRecordStatistics();
}
Loading

0 comments on commit 771b9b2

Please sign in to comment.