<?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="org.springblade.modules.pl.productRework.mapper.ProductReworkMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="productReworkResultMap" type="org.springblade.modules.pl.productRework.entity.ProductReworkEntity">
        <result column="id" property="id"/>
        <result column="tenant_id" property="tenantId"/>
        <result column="factory_id" property="factoryId"/>
        <result column="product_id" property="productId"/>
        <result column="qr_code" property="qrCode"/>
        <result column="product_model_id" property="productModelId"/>
        <result column="product_name" property="productName"/>
        <result column="product_model" property="productModel"/>
        <result column="rework_date" property="reworkDate"/>
        <result column="rework_succeed_date" property="reworkSucceedDate"/>
        <result column="create_user" property="createUser"/>
        <result column="create_dept" property="createDept"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>


    <select id="selectProductReworkPage" resultMap="productReworkResultMap">
        select * from pl_product_rework where is_deleted = 0
    </select>


    <select id="exportProductRework" resultType="org.springblade.modules.pl.productRework.excel.ProductReworkExcel">
        SELECT * FROM pl_product_rework ${ew.customSqlSegment}
    </select>

</mapper>
