package com.zcloud.fire.check.persistence.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jjb.saas.framework.datascope.annotation.DataScope;
import com.jjb.saas.framework.datascope.annotation.DataScopes;
import com.zcloud.fire.check.persistence.dataobject.DataStatisticDO;
import com.zcloud.fire.check.persistence.dataobject.FireDeviceDO;
import com.zcloud.fire.check.persistence.dataobject.FireDeviceStatisticDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

/**
 * web-infrastructure
 *
 * @Author zhaokai
 * @Date 2025-11-26 10:12:34
 */
@Mapper
@DataScopes({
        @DataScope(method = "getFireDevicePage", menuPerms = ""),
})
public interface FireDeviceMapper extends BaseMapper<FireDeviceDO> {

    List<FireDeviceStatisticDO> countByFireRegionIdIn(List<String> firePointIds);

    IPage<FireDeviceDO> getFireDevicePage(IPage<FireDeviceDO> iPage, Map<String, Object> params, String menuPerms);

    List<FireDeviceDO> getAllList(@Param("params")Map<String, Object> params);

    FireDeviceDO getInfoById(Long id);

    List<FireDeviceDO> getDeviceListByFirePointId(String firePointId);

    List<DataStatisticDO> countByCorpinfoIds(List<Long> corpinfoIds);

    Long getFireDeviceCount(Map<String, Object> params);

    IPage<FireDeviceDO> pageByPointId(IPage<FireDeviceDO> iPage, Map<String, Object> params);
}

