package com.fastbee.iot.mapper;

import java.util.List;

import com.fastbee.common.mybatis.mapper.BaseMapperX;
import com.fastbee.iot.domain.ModbusConfig;
import org.apache.ibatis.annotations.Param;

/**
 * modbus配置Mapper接口
 *
 * @author kerwincui
 * @date 2024-05-22
 */
public interface ModbusConfigMapper extends BaseMapperX<ModbusConfig>
{

    /**
     * 批量添加modbus配置
     * @param list
     * @return
     */
    int insertModbusConfigBatch(List<ModbusConfig> list);

    /**
     * 批量更新modbus配置
     * @param list
     * @return
     */
    int updateModbusConfigBatch(List<ModbusConfig> list);

    /**
     * 获取modbus配置简要字段
     * @param config
     * @return
     */
    public List<ModbusConfig> selectShortListByProductId(ModbusConfig config);

    /**
     * 根据标识查询配置
     * @param productId
     * @param identifiers
     * @return
     */
    List<ModbusConfig> selectListByProductIdAndIdentifiers(@Param("productId") Long productId, @Param("identifiers") List<String> identifiers);
}
