package ink.wgink.module.map.dao.grid;

import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.interfaces.init.IInitBaseTable;
import ink.wgink.module.map.pojo.dtos.grid.GridRelationDTO;
import org.springframework.stereotype.Repository;

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

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IGridDao
 * @Description: 网格业务
 * @Author: WangGeng
 * @Date: 2020/10/21 11:16
 * @Version: 1.0
 **/
@Repository
public interface IGridRelationDao extends IInitBaseTable {

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

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

    /**
     * 网格关联详情
     * @param params
     * @return
     * @throws SearchException
     */
    GridRelationDTO get(Map<String, Object> params) throws SearchException;

    /**
     * 网关关联列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<GridRelationDTO> list(Map<String, Object> params) throws SearchException;

}
