DeviceMapper.java 885 Bytes
package cn.com.glsx.stdinterface.modules.mapper;

import cn.com.glsx.stdinterface.modules.entity.Device;
import com.glsx.plat.mybatis.mapper.CommonBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Collection;
import java.util.List;

@Mapper
public interface DeviceMapper extends CommonBaseMapper<Device> {

    /**
     * 根据 source 类型获取sn集合
     *
     * @param source 1有源 0无源
     * @return sn集合
     */
    List<String> listSnBySource(Integer source);

    /**
     * 根据设备号获取设备数据
     *
     * @param sn 设备号
     * @return
     */
    Device getDeviceBySn(@Param("sn") String sn);

    /**
     * 根据设备号查找设备信息
     *
     * @param sns 设备号
     * @return
     */
    List<Device> selectBySns(@Param("sns") Collection<String> sns);
}