package com.cm.smartgate.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.common.result.SuccessResult;
import com.cm.smartgate.pojo.dtos.SmartGateDTO;
import net.sf.jsqlparser.statement.update.Update;
import org.springframework.stereotype.Repository;

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

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: ISmartGateDao
 * @Description: 智慧网闸
 * @Author: WangGeng
 * @Date: 2020/8/27 9:48
 * @Version: 1.0
 **/
@Repository
public interface ISmartGateDao {
    /**
     * 新增智慧闸机
     *
     * @param params
     * @return
     * @throws SaveException
     */
    void saveSmartGate(Map<String, Object> params) throws SaveException;

    /**
     * 删除智慧闸机(id列表)
     *
     * @param params
     * @throws RemoveException
     */
    void removeSmartGate(Map<String, Object> params) throws RemoveException;

    /**
     * 删除智慧闸机(id列表)，物理删除
     *
     * @param params
     * @throws RemoveException
     */
    void deleteSmartGate(Map<String, Object> params) throws RemoveException;

    /**
     * 修改智慧闸机
     *
     * @param params
     * @return
     * @throws UpdateException
     */
    void updateSmartGate(Map<String, Object> params) throws UpdateException;

    /**
     * 更新智慧闸机模式
     *
     * @param params
     * @throws UpdateException
     */
    void updateMode(Map<String, Object> params) throws UpdateException;

    /**
     * 智慧闸机详情(通过ID)
     *
     * @param params
     * @return
     * @throws SearchException
     */
    SmartGateDTO getSmartGate(Map<String, Object> params) throws SearchException;

    /**
     * 智慧闸机列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<SmartGateDTO> listSmartGate(Map<String, Object> params) throws SearchException;

    /**
     * 智慧闸机统计
     *
     * @param params
     * @return
     * @throws SearchException
     */
    Integer countSmartGate(Map<String, Object> params) throws SearchException;

}
