package com.gyee.alarm.mapper.auto;

import com.gyee.alarm.model.auto.ProBasicDeviceModelMetrics;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 设备模型指标 Mapper 接口
 * </p>
 *
 * @author shilin
 * @since 2023-08-01
 */
public interface ProBasicDeviceModelMetricsMapper extends BaseMapper<ProBasicDeviceModelMetrics> {
    @Select({"<script>",
            "select * from pro_basic_device_model_metrics a ",
            "<where>",

            "<if test='metriccode !=null '>",
            "and a.metric_code=#{metriccode}",
            "</if>",
            "</where>",

            "</script>"})

    List<ProBasicDeviceModelMetrics> getDeviceModelMetricsById(@Param("metriccode")String metriccode);
}
