<?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.njzscloud.dispose.wh.mapper.WarehouseCheckPlanMapper">

    <sql id="searchWarehouseCheckPlan">
        SELECT id,
               sn,
               plan_status,
               warehouse_id,
               plan_complete_time,
               complete_time,
               memo,
               creator_id,
               modifier_id,
               create_time,
               modify_time
        FROM wh_warehouse_check_plan
    </sql>

    <resultMap id="searchWarehouseCheckPlanResultMap" autoMapping="true" type="com.njzscloud.dispose.wh.pojo.result.SearchWarehouseCheckPlanResult">
    </resultMap>

    <select id="paging" resultMap="searchWarehouseCheckPlanResultMap">
        <include refid="searchWarehouseCheckPlan"/>
        <where>
            <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
                ${ew.customSqlSegment}
            </if>
        </where>
    </select>

    <select id="detail" resultMap="searchWarehouseCheckPlanResultMap">
        <include refid="searchWarehouseCheckPlan"/>
        WHERE deleted = 0
        AND id = #{id}
    </select>
</mapper>
