package com.sptg.permissions.biz.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.sptg.device.api.entity.Device;
import com.sptg.permissions.api.dto.DeviceAuthorizeDto;
import com.sptg.permissions.api.dto.RegionDto;
import com.sptg.permissions.api.entity.DeviceAuthorize;
import com.sptg.permissions.api.entity.Region;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * title: DeviceAuthorizeMapper
 * package: com.sptg.permissions.biz.mapper
 * description: 设备权限-DAO接口
 *
 *                  
 *                
 */
public interface DeviceAuthorizeMapper extends BaseMapper<DeviceAuthorize> {

    /**
     * 功能描述: 查询授权区域信息
     * @param dto 查询条件
     * @param page 分页信息
     * @return List<Region>
     *                  
     *                       
     */
    List<Region> selectAuthorizeRegion(@Param(value = "dto")RegionDto dto, @Param(value = "page") Page page);

    /**
     * 功能描述:获取设备数量
     * @param dto
     * @return Long
     *                
     *                     
     */
    Long getCount(@Param(value = "dto")DeviceAuthorizeDto dto);

    List<Device> getOfflineDeviceAccount(DeviceAuthorizeDto dto);
}
