package com.yx.face.dao;

import com.yx.face.boot.component.tk.TKMapper;
import com.yx.face.model.entity.FaceDevice;
import com.yx.face.model.vo.AdminVO;
import com.yx.face.model.vo.FaceDeviceVO;
import org.apache.ibatis.annotations.Param;

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

/**
 * @description: 人脸设备信息表(FaceDevice)表数据库访问层 <br>
 * @author: PWB <br>
 * @since: 1.0 <br>
 * @date: 2021-06-04 14:25:45 <br>
 */

public interface FaceDeviceDao extends TKMapper<FaceDevice> {

    Integer getIdBySn(@Param("sn") String sn);

    Integer getAdminIdBySn(@Param("sn") String sn);

    FaceDevice getFaceDeviceBySn(@Param("sn") String sn);

    List<FaceDeviceVO> getFaceDevices(Map<String,Object> map);

    List<FaceDevice> getSnList(@Param("adminId") Integer adminId);

    List<FaceDeviceVO> getFaceDeviceList(Map<String, Object> map);

    List<String> selectList(@Param("adminId") Integer adminId);

    String getFaceDeviceOne(@Param("sn") String sn);

    List<String> selectListNo(@Param("adminId") Integer adminId);

    Integer selectAdminId(@Param("sn") String sn);

    /**
     *
     * @param type 类型 1 全量 2 账号 3 sn
     * @param sn sn码
     * @param  provinceId //leixng
     * @param adminId 账号id
     * @return
     */
    List<FaceDevice> selectSnList(@Param("type") Integer type, @Param("sn") String sn, @Param("provinceId") Integer provinceId, @Param("adminId") Integer adminId);

    Integer update(@Param("sn") String sn, @Param("type") int type, @Param("adminId") Integer adminId);

    List<FaceDevice> selectTypeFaceDev(@Param("type") int type);

    Integer updateStatus(@Param("sn") String sn, @Param("type") int type, @Param("adminId") Integer adminId);

    List<FaceDeviceVO> getBySnList(List<String> snList);

    List<FaceDevice> getByAdminAndType(@Param("adminVO")AdminVO adminVO );

    List<String> getByAminVo(@Param("adminVo")AdminVO info);

}

