package com.sptg.device.biz.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.sptg.device.api.dto.DeviceDto;
import com.sptg.device.api.entity.Device;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * title: DeviceMapper
 * package: com.sptg.device.biz.mapper
 * description: 设备-DAO接口,增删改查
 *
 *
 *
 */
public interface DeviceMapper extends BaseMapper<Device> {

    /**
     * 功能描述: 获取某小区下的设备最大排序值
     * @param xqId 小区Id
     * @return Integer
     *
     *
     */
    Integer selectMaxXqSort(@Param(value = "xqId") Long xqId);

    List<Device> selectListByPathUse(@Param(value = "xqId") Long xqId, @Param(value = "unitId") Long unitId, @Param(value = "pathUse") Integer pathUse);

    List<Device> getOfflineDeviceAccount(@Param(value = "orgPosition") String orgPosition);

    List<Device> selectFaceListByPathUse(@Param(value = "xqId") Long xqId, @Param(value = "unitId") Long unitId, @Param(value = "pathUse") Integer pathUse);

    List<Device> selectCardListByPathUse(@Param(value = "xqId") Long xqId, @Param(value = "unitId") Long unitId, @Param(value = "pathUse") Integer pathUse);

    List<Device> selectFaceCardListByPathUse(@Param(value = "xqId") Long xqId, @Param(value = "unitId") Long unitId, @Param(value = "pathUse") Integer pathUse);
}
