package com.cm.websocket.dao;

import com.cm.common.exception.RemoveException;
import com.cm.common.exception.SaveException;
import com.cm.common.exception.SearchException;
import com.cm.common.exception.UpdateException;
import com.cm.websocket.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 {

    /**
     * 保存
     *
     * @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
     * @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;
}
