<?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.technologicalProcessDetailDrawingUser.mapper.BizTechnologicalProcessDetailDrawingUserMapper">

    <resultMap type="cn.ezhizao.project.business.technologicalProcessDetailDrawingUser.domain.BizTechnologicalProcessDetailDrawingUser" id="BizTechnologicalProcessDetailDrawingUserResult">
        <id column="id" property="id"/>
    </resultMap>


    <select id="getList" parameterType="BizTechnologicalProcessDetailDrawingUser" resultMap="BizTechnologicalProcessDetailDrawingUserResult">
        SELECT * FROM biz_technological_process_detail_drawing_user
        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
            deleted = 0
            <if test="type != null  and type != ''"> AND type = #{type}</if>
            <if test="drawingName != null  and drawingName != ''"> AND drawing_name like concat('%', #{drawingName}, '%')</if>
            <if test="recordTime != null "> AND record_time = #{recordTime}</if>
            <if test="productVersion != null  and productVersion != ''"> AND product_version = #{productVersion}</if>
            <if test="processCode != null  and processCode != ''"> AND process_code = #{processCode}</if>
            <if test="nickName != null  and nickName != ''"> AND nick_name like concat('%', #{nickName}, '%')</if>
        </trim>
    </select>

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