package egovframework.service.impl;

import egovframework.rte.fdl.cmmn.EgovAbstractServiceImpl;
import egovframework.service.NoticeService;
import egovframework.service.mapper.NoticeMapper;
import egovframework.utill.PageCriteria;
import egovframework.vo.NoticeVO;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;

@RequiredArgsConstructor
@Service
public class NoticeServiceImpl extends EgovAbstractServiceImpl implements NoticeService {

    private final NoticeMapper noticeMapper;

    @Override
    public int getNoticeTotalCount(HashMap<String, String> paramMap) {
        return this.noticeMapper.getNoticeTotalCount(paramMap);
    }

    @Override
    public List<NoticeVO> getNoticeList(PageCriteria criteria) {
        List<NoticeVO> noticeList = this.noticeMapper.getNoticeList(criteria);
        return noticeList;
    }

    @Override
    public void updateNoticeReadCount(HashMap<String, String> paramMap) {
        this.noticeMapper.updateNoticeReadCount(paramMap);
    }

    public NoticeVO getNotice(HashMap<String, String> paramMap) {
        return this.noticeMapper.getNotice(paramMap);
    }

}
