<?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.zm.order.tool.server.reta.RetaAreaDao">

    <resultMap id="OrderMap" type="com.zm.order.tool.server.model.RetaArea">
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="pid" jdbcType="INTEGER" property="pid"/>
        <result column="name" jdbcType="VARCHAR" property="name"/>
    </resultMap>

    <sql id="tb">
        qm_public_area
    </sql>

    <sql id="cols_all">
        id,
        <include refid="cols_exclude_id"/>
    </sql>

    <sql id="cols_exclude_id">
        pid,
        name
    </sql>

    <select id="selectOne" parameterType="map" resultMap="OrderMap">
        select
        <include refid="cols_all"/>
        from
        <include refid="tb"/>
        where id = #{id} limit 1
    </select>


</mapper>