Class StorybookServiceImpl

java.lang.Object
inha.dayoook_e.storybook.api.service.StorybookServiceImpl
All Implemented Interfaces:
StorybookService

@Service @Transactional public class StorybookServiceImpl extends Object implements StorybookService
StorybookServiceImpl은 동화 관련 비즈니스 로직을 처리하는 서비스 클래스.
  • Constructor Details

    • StorybookServiceImpl

      public StorybookServiceImpl()
  • Method Details

    • getStorybooks

      @Transactional(readOnly=true) public org.springframework.data.domain.Slice<StorybookSearchPageResponse> getStorybooks(User user, SearchCond searchCond, Integer page)
      동화 목록 조회
      Specified by:
      getStorybooks in interface StorybookService
      Parameters:
      user - 로그인한 사용자
      searchCond - 검색 조건
      page - 페이지 번호
      Returns:
      동화 목록 조회 결과
    • getStorybook

      @Transactional(readOnly=true) public StorybookSearchResponse getStorybook(User user, Integer storybookId, Integer pageNumber)
      동화 상세 조회
      Specified by:
      getStorybook in interface StorybookService
      Parameters:
      user - 로그인한 사용자
      storybookId - 동화 ID
      pageNumber - 페이지 번호
      Returns:
      동화 상세 조회 결과
    • createStorybook

      public StorybookResponse createStorybook(User user, CreateStorybookRequest createStorybookRequest, org.springframework.web.multipart.MultipartFile thumbnail, List<org.springframework.web.multipart.MultipartFile> pageImages)
      동화 생성
      Specified by:
      createStorybook in interface StorybookService
      Parameters:
      user - 로그인한 사용자
      createStorybookRequest - 동화 생성 요청
      thumbnail - 썸네일 이미지
      pageImages - 페이지 이미지 리스트
      Returns:
      동화 생성 결과
    • toggleLike

      public LikedTuteeStorybookProgressResponse toggleLike(User user, Integer storybookId)
      좋아요 토글
      Specified by:
      toggleLike in interface StorybookService
      Parameters:
      user - 로그인한 사용자
      storybookId - 동화 ID
      Returns:
      좋아요 토글 결과
    • completeStorybook

      public StorybookResponse completeStorybook(User user, Integer storybookId)
      동화 완료 처리
      Specified by:
      completeStorybook in interface StorybookService
      Parameters:
      user - 로그인한 사용자
      storybookId - 동화 ID
      Returns:
      동화 완료 처리 결과
    • updateLastReadPage

      public LastReadPageStorybookResponse updateLastReadPage(User user, Integer storybookId, Integer pageNumber)
      마지막으로 읽은 페이지 번호 업데이트
      Specified by:
      updateLastReadPage in interface StorybookService
      Parameters:
      user - 로그인한 사용자
      storybookId - 동화 ID
      pageNumber - 페이지 번호
      Returns:
      마지막으로 읽은 페이지 번호 업데이트 결과