package com.yx.face.dao;

import com.yx.face.boot.component.tk.TKMapper;
import com.yx.face.model.entity.UserControlEarlyWarningList;
import com.yx.face.model.search.UserControlEarlyWarningDelete;
import com.yx.face.model.vo.AdminAndUserEarlyWarningVO;
import com.yx.face.model.vo.UserControlEarlyWarningVO;
import org.apache.ibatis.annotations.Param;

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

/**
 * <p>
 * 预警人员 Mapper 接口
 * </p>
 *
 * @author wxg
 * @since 2022-01-24
 */
public interface UserControlEarlyWarningListDao extends TKMapper<UserControlEarlyWarningList> {
    /*分页查询预警人员列表*/
    List<UserControlEarlyWarningVO> getPageList(Map<String, Object> map);

    /**
     *
     * @param deviceSn 设备编号
     * @param idNumber  身份证
     * @param isControlEarlyWarning 是否开启 1 开启2 否
     * @return
     * 2022-01-29  修改 isControlEarlyWarning 这个只做前端的判定，不对后端的逻辑进行处理
     */
    AdminAndUserEarlyWarningVO getAdminWarningInformation(@Param("deviceSn") String deviceSn, @Param("idNumber") String idNumber, @Param("isControlEarlyWarning") Integer isControlEarlyWarning);

    List<UserControlEarlyWarningVO> getControlUnitList(Map<String, Object> map);

    Integer batchDelete(UserControlEarlyWarningDelete userControlEarlyWarningDelete);
}
