Package inha.git.notice.api.service
Class NoticeServiceImpl
java.lang.Object
inha.git.notice.api.service.NoticeServiceImpl
- All Implemented Interfaces:
NoticeService
공지사항 관련 비즈니스 로직을 처리하는 서비스 구현체입니다.
공지사항의 조회, 생성, 수정, 삭제 및 첨부파일 관리 기능을 제공합니다.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateNotice
(User user, CreateNoticeRequest createNoticeRequest, List<org.springframework.web.multipart.MultipartFile> attachmentList) 새로운 공지사항을 생성합니다.deleteNotice
(User user, Integer noticeIdx) 공지사항을 삭제(비활성화) 처리합니다.특정 공지사항의 상세 정보를 조회합니다.org.springframework.data.domain.Page<SearchNoticesResponse>
getNotices
(Integer page, Integer size) 공지사항 목록을 페이징하여 조회합니다.updateNotice
(User user, Integer noticeIdx, UpdateNoticeRequest updateNoticeRequest, List<org.springframework.web.multipart.MultipartFile> attachmentList) 기존 공지사항을 수정합니다.
-
Constructor Details
-
NoticeServiceImpl
public NoticeServiceImpl()
-
-
Method Details
-
getNotices
@Transactional(readOnly=true) public org.springframework.data.domain.Page<SearchNoticesResponse> getNotices(Integer page, Integer size) 공지사항 목록을 페이징하여 조회합니다.- Specified by:
getNotices
in interfaceNoticeService
- Parameters:
page
- 조회할 페이지 번호 (0부터 시작)size
- 페이지당 항목 수- Returns:
- 페이징된 공지사항 목록
-
getNotice
특정 공지사항의 상세 정보를 조회합니다.- Specified by:
getNotice
in interfaceNoticeService
- Parameters:
noticeIdx
- 조회할 공지사항 ID- Returns:
- 공지사항 상세 정보
- Throws:
BaseException
- NOT_FIND_USER: 작성자를 찾을 수 없는 경우 NOTICE_NOT_FOUND: 공지사항을 찾을 수 없는 경우
-
createNotice
public String createNotice(User user, CreateNoticeRequest createNoticeRequest, List<org.springframework.web.multipart.MultipartFile> attachmentList) 새로운 공지사항을 생성합니다.- Specified by:
createNotice
in interfaceNoticeService
- Parameters:
user
- 생성을 요청한 사용자 정보createNoticeRequest
- 생성할 공지사항 정보attachmentList
- 첨부파일 목록 (선택적)- Returns:
- 공지사항 생성 완료 메시지
-
updateNotice
public String updateNotice(User user, Integer noticeIdx, UpdateNoticeRequest updateNoticeRequest, List<org.springframework.web.multipart.MultipartFile> attachmentList) 기존 공지사항을 수정합니다.- Specified by:
updateNotice
in interfaceNoticeService
- Parameters:
user
- 수정을 요청한 사용자 정보noticeIdx
- 수정할 공지사항 IDupdateNoticeRequest
- 수정할 내용attachmentList
- 새로운 첨부파일 목록 (선택적)- Returns:
- 공지사항 수정 완료 메시지
- Throws:
BaseException
- NOTICE_NOT_FOUND: 공지사항을 찾을 수 없는 경우 NOTICE_NOT_AUTHORIZED: 수정 권한이 없는 경우
-
deleteNotice
공지사항을 삭제(비활성화) 처리합니다.- Specified by:
deleteNotice
in interfaceNoticeService
- Parameters:
user
- 삭제를 요청한 사용자 정보noticeIdx
- 삭제할 공지사항 ID- Returns:
- 공지사항 삭제 완료 메시지
- Throws:
BaseException
- NOTICE_NOT_FOUND: 공지사항을 찾을 수 없는 경우 NOTICE_NOT_AUTHORIZED: 삭제 권한이 없는 경우
-