package ink.wgink.module.instantmessage.dao;

import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.exceptions.UpdateException;
import ink.wgink.interfaces.init.IInitBaseTable;
import ink.wgink.module.instantmessage.pojo.dtos.NoticeDTO;
import ink.wgink.module.instantmessage.pojo.pos.NoticePO;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: INoticeDao
 * @Description: 消息通知
 * @Author: wanggeng
 * @Date: 2021/3/29 4:37 下午
 * @Version: 1.0
 */
@Repository
public interface INoticeDao extends IInitBaseTable {

    /**
     * 保存
     *
     * @param params
     * @throws SaveException
     */
    void save(Map<String, Object> params) throws SaveException;

    /**
     * 修改已办
     *
     * @param params
     * @throws UpdateException
     */
    void updateHandle(Map<String, Object> params) throws UpdateException;

    /**
     * 修改已发送
     *
     * @param params
     * @throws UpdateException
     */
    void updateSend(Map<String, Object> params) throws UpdateException;

    /**
     * 详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    NoticePO getPO(Map<String, Object> params) throws SearchException;

    /**
     * 列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<NoticePO> listPO(Map<String, Object> params) throws SearchException;

    /**
     * 系统列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<String> listSystems(Map<String, Object> params) throws SearchException;

    /**
     * 模块列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<String> listModules(Map<String, Object> params) throws SearchException;

    /**
     * 菜单列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<String> listMenus(Map<String, Object> params) throws SearchException;

    /**
     * 统计
     *
     * @param params
     * @return
     * @throws SearchException
     */
    Integer count(Map<String, Object> params) throws SearchException;

    /**
     * 删除
     *
     * @param params
     * @throws RemoveException
     */
    void delete(Map<String, Object> params) throws RemoveException;

    /**
     * 删除
     *
     * @param params
     * @throws RemoveException
     */
    void remove(Map<String, Object> params) throws RemoveException;

    /**
     * 通知列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<NoticeDTO> list(Map<String, Object> params) throws SearchException;

}
