package com.usky.iot.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.usky.backend.domain.ProductTVAttributeVO;
import com.usky.common.mybatis.core.CrudMapper;
import com.usky.iot.domain.BaseAlarm;
import com.usky.iot.domain.DmpDeviceInfo;
import com.usky.iot.domain.DmpProductInfo;
import com.usky.iot.service.vo.DmpDeviceInfoRequest;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * <p>
 * 设备信息表 Mapper 接口
 * </p>
 *
 * @author ya
 * @since 2022-10-08
 */
public interface DmpDeviceInfoMapper extends CrudMapper<DmpDeviceInfo> {

    List<DmpProductInfo> getProductInfo(String productCode);

    Integer getMeetingFaceData(@Param("userId") Long userId);

    Integer[] getMeetingFaceDeviceList(@Param("fid") Integer fid);

//    Page<DmpDeviceInfo> page(IPage<DmpDeviceInfo> page, @Param("ar")DmpDeviceInfoRequest dmpDeviceInfoRequest, @Param("tenantId") Integer tenantId);

    List<ProductTVAttributeVO> attributeList(@Param("procutIdList") List<Integer> productIdList);

    Integer baseAlarmCount(@Param("deviceIdList") List<String> deviceIdList);

    Integer baseFaultCount(@Param("deviceIdList") List<String> deviceIdList);

    Integer deviceOfflineCount(@Param("deviceIdList") List<String> deviceIdList);

    List<BaseAlarm> baseAlarmList(@Param("deviceIdList") List<String> deviceIdList);

    Integer sysTenantId(@Param("domain") String domain);
}
