<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.base.biz.mapper.StationInfoMapper">

    <select id="getStationInfoDTOList" parameterType="com.base.biz.model.dto.request.StationInfoDTOListReq" resultType="com.base.biz.model.entity.StationInfo">
        select * from station_info
        <where>
            <if test="req.ids != null and req.ids.size()>0">
                id in
                <foreach collection="req.ids" index="index" item="item" open="(" separator="," close=")">
                    #{item}
                </foreach>
            </if>
            <if test="req.stationCode != null and req.stationCode != ''">
                and station_code like "%${req.stationCode}%"
            </if>
        </where>
    </select>

    <select id="getStationInfoDTOSet" parameterType="com.base.biz.model.dto.request.StationInfoDTOSetReq" resultType="com.base.biz.model.entity.StationInfo">
        select * from station_info
        <where>
            <if test="req.ids != null and req.ids.size()>0">
                id in
                <foreach collection="req.ids" index="index" item="item" open="(" separator="," close=")">
                    #{item}
                </foreach>
            </if>
            <if test="req.stationCode != null and req.stationCode != ''">
                and station_code like "%${req.stationCode}%"
            </if>
        </where>
    </select>

</mapper>
