package com.prolog.eis.dao.led;

import com.prolog.eis.model.led.LedConnectInfo;
import com.prolog.framework.dao.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface LedConnectInfoMapper  extends BaseMapper<LedConnectInfo> {

    @Select("SELECT\n" +
            "\tled_connect_info.id AS id,\n" +
            "\tled_connect_info.port_no AS portNo,\n" +
            "\tled_connect_info.port_ip AS portIp,\n" +
            "\tled_connect_info.port_type AS portType,\n" +
            "\tled_connect_info.area_no AS areaNo,\n" +
            "\tled_connect_info.port_location AS portLocation,\n" +
            "\tled_connect_info.remark AS remark \n" +
            "FROM\n" +
            "\tled_connect_info\n" +
              "WHERE\n" +
            "\tled_connect_info.port_type = 1")
    List<LedConnectInfo> findAllInboundStation();

    @Select("SELECT\n" +
            "\tled_connect_info.id AS id,\n" +
            "\tled_connect_info.port_no AS portNo,\n" +
            "\tled_connect_info.port_ip AS portIp,\n" +
            "\tled_connect_info.port_type AS portType,\n" +
            "\tled_connect_info.area_no AS areaNo,\n" +
            "\tled_connect_info.port_location AS portLocation,\n" +
            "\tled_connect_info.remark AS remark \n" +
            "FROM\n" +
            "\tled_connect_info\n" +
            "WHERE\n" +
            "\tled_connect_info.port_type = 2")
    List<LedConnectInfo> findAllOutBoundStation();
}
