<?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.gree.mall.manager.commonmapper.CustomOfflineMapper">
    <select id="queryZoneList" resultType="com.gree.mall.manager.bean.offline.ZoneBean">
 <![CDATA[
        select az.id, az.parent_id, az.zone_name
        from admin_user_zone auz
                 left join admin_zone az on az.id = auz.admin_zone_id
        where auz.admin_user_id = #{adminUserId}
        ]]>
    </select>

    <select id="queryWebsitList" resultType="com.gree.mall.manager.bean.offline.WebsitBean">
 <![CDATA[
        select aw.name, aw.websit_number
        from admin_user_zone auz
                  join websit_zone wz on wz.admin_zone_id = auz.admin_zone_id
                  join admin_websit aw on aw.websit_number = wz.websit_number
        where auz.admin_user_id = #{adminUserId}
        GROUP BY wz.websit_number
        ]]>
    </select>


    <select id="queryZoneAllList" resultType="com.gree.mall.manager.bean.offline.ZoneBean">
 <![CDATA[
        select az.id, az.parent_id, az.zone_name
        from admin_zone az
        ]]>
    </select>

    <select id="queryWebsitAllList" resultType="com.gree.mall.manager.bean.offline.WebsitBean">
 <![CDATA[
        select aw.name, aw.websit_number
        from admin_websit aw
        ]]>
    </select>


</mapper>