<?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.pm.subsystem.mapper.CommonMapper">

    <select id="selectBuildingList" resultType="pd">
        select distinct building_id as id, building_name as name
        from ibms_building
        where building_id is not null
        order by building_name
    </select>

    <select id="selectFloorList" parameterType="pd" resultType="pd">
        select distinct floor_id as id, floor_name as name
        from ibms_building
        where building_id = #{buildingId}
          and floor_id is not null
        order by floor_id
    </select>

</mapper>