package com.unis.detectionnum.server.service.impl;

import java.util.Map;

import com.unis.detectionnum.server.entity.AnnouncementDO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageInfo;
import com.unis.detectionnum.common.vo.AnnouncementVO;
import com.unis.detectionnum.server.domain.AnnouncementDomain;
import com.unis.detectionnum.server.service.AnnouncementService;

/** 
 * @ClassName: AnnouncementServiceImpl 
 * @Description: 公告管理service实现类 
 * @author LiuFeng 
 * @date 2019年10月28日 下午3:27:48  
 */
@Service
public class AnnouncementServiceImpl implements AnnouncementService {
	
	@Autowired
	private AnnouncementDomain announcementDomain;

	/**
	 * <p>Title: getAnnouncementPageList</p> 
	 * <p>Description: </p> 
	 * @param paramMap
	 * @param pageNum
	 * @param pageSize
	 * @return 
	 * @see com.unis.detectionnum.server.service.AnnouncementService#getAnnouncementPageList(java.util.Map, java.lang.Integer, java.lang.Integer) 
	 */
	@Override
	public PageInfo<AnnouncementVO> getAnnouncementPageList(Map<String, Object> paramMap, Integer pageNum,
			Integer pageSize) {
		
		return announcementDomain.getAnnouncementPageList(paramMap,pageNum,pageSize);
	}

	/**
	 * <p>Title: saveAnnouncement</p> 
	 * <p>Description: </p> 
	 * @param announcementVO
	 * @return 
	 * @see com.unis.detectionnum.server.service.AnnouncementService#saveAnnouncement(com.unis.detectionnum.common.vo.AnnouncementVO) 
	 */
	@Override
	public int saveAnnouncement(AnnouncementVO announcementVO) {
		
		return announcementDomain.saveAnnouncement(announcementVO);
	}

	/**
	 * <p>Title: updateAnnouncement</p> 
	 * <p>Description: 修改公告</p> 
	 * @param announcementVO
	 * @return 
	 * @see com.unis.detectionnum.server.service.AnnouncementService#updateAnnouncement(com.unis.detectionnum.common.vo.AnnouncementVO) 
	 */
	@Override
	public int updateAnnouncement(AnnouncementVO announcementVO) {
		// TODO Auto-generated method stub
		return announcementDomain.updateAnnouncement(announcementVO);
	}

	/**
	 * <p>Title: deleteAnnouncement</p> 
	 * <p>Description: </p> 
	 * @param announcementId
	 * @return 
	 * @see com.unis.detectionnum.server.service.AnnouncementService#deleteAnnouncement(java.lang.Integer) 
	 */
	@Override
	public int deleteAnnouncement(Integer announcementId) {
		// TODO Auto-generated method stub
		return announcementDomain.deleteAnnouncement(announcementId);
	}

	@Override
	public AnnouncementDO selectByPrimaryKey(Integer announcementId) {
		return announcementDomain.selectByPrimaryKey(announcementId);
	}

}
