package com.shzg.project.worn.mapper;

import java.util.List;
import com.shzg.project.worn.domain.MqttSensorThreshold;

/**
 * 传感器阈值配置Mapper接口
 * 
 * @author shzg
 * @date 2026-04-01
 */
public interface MqttSensorThresholdMapper 
{
    /**
     * 查询传感器阈值配置
     * 
     * @param id 传感器阈值配置主键
     * @return 传感器阈值配置
     */
    public MqttSensorThreshold selectMqttSensorThresholdById(Long id);

    /**
     * 查询传感器阈值配置列表
     * 
     * @param mqttSensorThreshold 传感器阈值配置
     * @return 传感器阈值配置集合
     */
    public List<MqttSensorThreshold> selectMqttSensorThresholdList(MqttSensorThreshold mqttSensorThreshold);

    /**
     * 新增传感器阈值配置
     * 
     * @param mqttSensorThreshold 传感器阈值配置
     * @return 结果
     */
    public int insertMqttSensorThreshold(MqttSensorThreshold mqttSensorThreshold);

    /**
     * 修改传感器阈值配置
     * 
     * @param mqttSensorThreshold 传感器阈值配置
     * @return 结果
     */
    public int updateMqttSensorThreshold(MqttSensorThreshold mqttSensorThreshold);

    /**
     * 删除传感器阈值配置
     * 
     * @param id 传感器阈值配置主键
     * @return 结果
     */
    public int deleteMqttSensorThresholdById(Long id);

    /**
     * 批量删除传感器阈值配置
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMqttSensorThresholdByIds(Long[] ids);

    /**
     * 根据设备id和指标类型查询阈值配置
     * @param deviceId
     * @param metricType
     * @return
     */
    MqttSensorThreshold selectByDeviceAndMetric(Long deviceId, String metricType);

    /**
     * 根据部门id和指标类型查询阈值配置
     * @param deptId
     * @param metricType
     * @return
     */
    MqttSensorThreshold selectByDeptAndMetric(Long deptId, String metricType);

}
