<?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.WarehouseCheckDetailMapper">

    <sql id="searchWarehouseCheckDetail">
        SELECT id,
               check_plan_id,
               goods_category_id,
               goods_category_name,
               goods_id,
               goods_name,
               good_sn,
               system_quantity,
               actual_quantity,
               difference_quantity,
               unit,
               suggestion,
               check_time,
               creator_id,
               modifier_id,
               create_time,
               modify_time
        FROM wh_warehouse_check_detail
    </sql>

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

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

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