package com.haha.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.haha.entity.LayerTemplate;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 设备层模版数据访问层
 */
public interface LayerTemplateMapper extends BaseMapper<LayerTemplate> {

    /**
     * 根据设备ID查询层模版
     *
     * @param deviceId 设备ID（SN号）
     * @return 层模版列表
     */
    @Select("SELECT * FROM t_layer_template WHERE device_id = #{deviceId} AND is_deleted = 0")
    List<LayerTemplate> selectByDeviceId(@Param("deviceId") String deviceId);
}
