BoardServiceImpl
페이지 정보
본문
package web.service;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import web.dto.BoardDto;
import web.dto.Criteria;
import web.mapper.BoardMapper;
@Service
public class BoardServiceImpl implements BoardService {
@Autowired //필요한 의존 객체의 “타입"에 해당하는 빈을 찾아 주입한다.
private BoardMapper boardMapper;
@Override
public List<BoardDto> selectBoardList() throws Exception {
return boardMapper.selectBoardList();
}
@Override
public void insertBoard(BoardDto board) throws Exception {
boardMapper.insertBoard(board);
}
@Override
public BoardDto selectBoardDetail(int boardIdx) throws Exception {
//조회수 +1
boardMapper.updateHitCount(boardIdx);
BoardDto board = boardMapper.selectBoardDetail(boardIdx);
return board;
}
@Override
public void updateBoard(BoardDto board) throws Exception {
boardMapper.updateBoard(board);
}
@Override
public void deleteBoard(int boardIdx) throws Exception {
boardMapper.deleteBoard(boardIdx);
}
@Override
public List<BoardDto> selectCriList(Criteria cri) throws Exception {
return boardMapper.selectCriList(cri);
}
@Override
public List<BoardDto> selectPageList(Criteria cri) throws Exception {
return boardMapper.selectPageList(cri);
}
@Override
public int listCount(Criteria cri) throws Exception {
return boardMapper.listCount(cri);
}
@Override
public List<BoardDto> selectSearchList(Criteria cri) throws Exception {
return boardMapper.selectSearchList(cri);
}
@Override
public int listSearchCount(Criteria cri) throws Exception {
return boardMapper.listSearchCount(cri);
}
}
- 이전글BoardService 24.06.10
- 다음글BoardMapper 24.06.10
댓글목록
등록된 댓글이 없습니다.