<?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="net.lab1024.sa.admin.module.business.wms.base.area.dao.AreaDao">

    <!-- 查询结果列 -->
    <sql id="base_columns">
        t_area.area_id,
        t_area.area_code,
        t_area.area_name,
        t_area.remark,
        t_area.disabled_flag,
        t_area.create_time
    </sql>

    <!-- 分页查询 -->
    <select id="queryPage" resultType="net.lab1024.sa.admin.module.business.wms.base.area.domain.vo.AreaVO">
        SELECT
        <include refid="base_columns"/>
        FROM t_area
        <where>
            <!--库区-->
            <if test="queryForm.areaId != null">
                AND t_area.area_id=#{queryForm.areaId}
            </if>
            <!--是否启用-->
            <if test="queryForm.disabledFlag != null">
                AND t_area.disabled_flag=#{queryForm.disabledFlag}
            </if>
        </where>
        ORDER BY t_area.area_code
    </select>


</mapper>
