package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.PoNotice;
import com.ruoyi.system.mapper.PoNoticeMapper;
import com.ruoyi.system.service.IPoNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 公告 服务层实现
 *
 * @author blue
 */
@Service
public class PoNoticeServiceImpl implements IPoNoticeService {
    @Autowired
    private PoNoticeMapper noticeMapper;

    /**
     * 查询公告信息
     *
     * @param noticeId 公告ID
     * @return 公告信息
     */
    @Override
    public PoNotice selectPoNoticeById(Long noticeId) {
        return noticeMapper.selectPoNoticeById(noticeId);
    }

    /**
     * 查询公告列表
     *
     * @param notice 公告信息
     * @return 公告集合
     */
    @Override
    public List<PoNotice> selectPoNoticeList(PoNotice notice) {
        return noticeMapper.selectPoNoticeList(notice);
    }

    /**
     * 新增公告
     *
     * @param notice 公告信息
     * @return 结果
     */
    @Override
    public int insertPoNotice(PoNotice notice) {
        return noticeMapper.insertPoNotice(notice);
    }

    /**
     * 修改公告
     *
     * @param notice 公告信息
     * @return 结果
     */
    @Override
    public int updatePoNotice(PoNotice notice) {
        return noticeMapper.updatePoNotice(notice);
    }

    /**
     * 删除公告对象
     *
     * @param noticeId 公告ID
     * @return 结果
     */
    @Override
    public int deletePoNoticeById(Long noticeId) {
        return noticeMapper.deletePoNoticeById(noticeId);
    }

    /**
     * 批量删除公告信息
     *
     * @param noticeIds 需要删除的公告ID
     * @return 结果
     */
    @Override
    public int deletePoNoticeByIds(Long[] noticeIds) {
        return noticeMapper.deletePoNoticeByIds(noticeIds);
    }
}
