<?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.usky.sas.mapper.SasPoliceStationMapper">

    <resultMap id="BaseResultMap" type="com.usky.sas.domain.SasPoliceStation">
        <id column="code" property="code"/>
        <result column="name" property="name"/>
    </resultMap>

    <select id="selectByCodes" resultMap="BaseResultMap">
        SELECT code, name FROM sas_police_station
        WHERE code IN
        <foreach collection="codes" item="code" open="(" separator="," close=")">
            #{code}
        </foreach>
    </select>

</mapper>
