package com.qmth.sop.business.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.sop.business.bean.result.SysNoticeResult;
import com.qmth.sop.business.entity.SysNotice;
import com.qmth.sop.common.enums.NoticeStatusEnum;
import com.qmth.sop.common.enums.NoticeTypeEnum;

import java.util.Map;

/**
 * 公告表 服务类
 *
 * @author: shudonghui
 * @date: 2023-08-07 13:53:29
 * @version: 1.0
 * @email: shudonghui@qmth.com.cn
 * @Company: www.qmth.com.cn
 */
public interface SysNoticeService extends IService<SysNotice>{

    /**
    * 查询列表
    *
    * @param iPage
    * @return
    */
    IPage<SysNoticeResult> query(IPage<Map> iPage, String query, NoticeStatusEnum status, NoticeTypeEnum type, Long startTime, Long endTime);

    /**
    * 新增修改公告表
    *
    * @param sysNotice
    */
    Boolean saveSysNotice(SysNotice sysNotice);


    /**
    * 删除公告表
    *
    * @param id
    */
    Boolean delete(Long id);


    boolean disable(long[] ids);

    boolean publishOrUnpublish(long id);


}