<?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="cn.ezhizao.project.business.mapper.BizProductInspectionInstructionMapper">

    <resultMap type="cn.ezhizao.project.business.domain.BizProductInspectionInstruction" id="BizProductInspectionInstructionResult">
        <id column="id" property="id"/>
    </resultMap>


    <select id="getList" parameterType="BizProductInspectionInstruction" resultMap="BizProductInspectionInstructionResult">
        SELECT * FROM biz_product_inspection_instruction
        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
            deleted = 0
            <if test="type != null "> AND type = #{type}</if>
            <if test="technologyVersion != null  and technologyVersion != ''"> AND technology_version = #{technologyVersion}</if>
            <if test="productId != null "> AND product_id = #{productId}</if>
            <if test="processId != null "> AND process_id = #{processId}</if>
            <if test="standard != null  and standard != ''"> AND standard = #{standard}</if>
            <if test="equipment != null  and equipment != ''"> AND equipment = #{equipment}</if>
<!--            <if test="technologicalProcessDetailId != null"> AND technological_process_detail_id = #{technologicalProcessDetailId}</if>-->
        </trim>
    </select>

    <delete id="physicalDelete">
        DELETE FROM biz_product_inspection_instruction
        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
            <if test="id != null">
                id = #{id} AND
            </if>
       <!-- 删除条件为其他外键可以在这里加 -->
        </trim>
    </delete>
</mapper>
