<?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="bus.mapper.BStationInfoMapper">

 <select id="list" parameterType="bus.model.dto.BStationInfoPageDto" resultType="bus.model.dto.BStationInfoDto">
   select
   id,
   name,
   station_type,
   station_status,
   station_code,
   longitude,
   latitude,
   detail_address,
   pic_url,
   introduce,
   province,
   city,
   area
   from
   b_station_info
  <where>
     is_delete = 0
    <if test="name != null and name != ''">
      and name like concat('%',#{name},'%')
    </if>
    <if test="stationStatus != null and stationStatus != ''">
      and station_status = #{stationStatus}
    </if>
    <if test="stationType != null and stationType != ''">
      and station_type = #{stationType}
    </if>
    <if test="stationCode != null and stationCode != ''">
      and station_code = #{stationCode}
    </if>
    <if test="area != null and area != ''">
      and area = #{area}
    </if>

  </where>
 </select>

</mapper>
