<?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.yx.face.dao.PoliceStationDao">

<!--    <select id="getPoliceStationIdByCode" resultType="java.lang.Integer">-->
<!--        SELECT id-->
<!--        FROM police_station-->
<!--        WHERE code = #{code}-->
<!--    </select>-->
<!--    <select id="getPoliceName" resultType="java.lang.String">-->
<!--        SELECT name-->
<!--        FROM police_station-->
<!--        WHERE code = #{code}-->
<!--    </select>-->
<!--    <select id="getPoliceStation" resultType="com.yx.face.model.entity.PoliceStation">-->
<!--        SELECT name,-->
<!--               code-->
<!--        FROM police_station-->
<!--        WHERE address_code = #{addressCode}-->
<!--    </select>-->

<!--    <select id="getPoliceList" resultType="com.yx.face.model.vo.PoliceStationVO">-->
<!--        SELECT name         AS policeName,-->
<!--               code         AS policeCode,-->
<!--               address      AS address,-->
<!--               address_code AS addressCode-->
<!--        FROM police_station-->
<!--        WHERE address_code = #{addressCode}-->
<!--    </select>-->
    <select id="getList" resultType="com.yx.face.model.vo.PoliceStationVO">
        select
            name as policeStationName,
            code as policeStationCode
        from
            police_station
        where
            address_code = #{areaCode}

    </select>
    <select id="getByPoliceStation" resultType="com.yx.face.model.entity.PoliceStation">
        select *
        from police_station
        where code =#{policeStationCode}
            limit 0,1
    </select>

</mapper>

