<?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.yifu.cloud.plus.v1.yifu.process.mapper.TNodeTransferConfigMapper">
    <resultMap id="tNodeTransferConfigMap" type="com.yifu.cloud.plus.v1.yifu.process.entity.TNodeTransferConfig">
        <id property="id" column="ID"/>
        <result property="nodeId" column="NODE_ID"/>
        <result property="processId" column="PROCESS_ID"/>
        <result property="transferType" column="TRANSFER_TYPE"/>
        <result property="copyData" column="COPY_DATA"/>
        <result property="copyAtta" column="COPY_ATTA"/>
        <result property="starterType" column="STARTER_TYPE"/>
        <result property="starter" column="STARTER"/>
    </resultMap>
    <sql id="Base_Column_List">
             a.ID,
                  a.NODE_ID,
                  a.PROCESS_ID,
                  a.TRANSFER_TYPE,
                  a.COPY_DATA,
                  a.COPY_ATTA,
                  a.STARTER_TYPE,
                  a.STARTER
         </sql>
    <sql id="tNodeTransferConfig_where">
        <if test="tNodeTransferConfig != null">
            <if test="tNodeTransferConfig.id != null and tNodeTransferConfig.id.trim() != ''">
                AND a.ID = #{tNodeTransferConfig.id}
            </if>
            <if test="tNodeTransferConfig.nodeId != null and tNodeTransferConfig.nodeId.trim() != ''">
                AND a.NODE_ID = #{tNodeTransferConfig.nodeId}
            </if>
            <if test="tNodeTransferConfig.processId != null and tNodeTransferConfig.processId.trim() != ''">
                AND a.PROCESS_ID = #{tNodeTransferConfig.processId}
            </if>
            <if test="tNodeTransferConfig.transferType != null and tNodeTransferConfig.transferType.trim() != ''">
                AND a.TRANSFER_TYPE = #{tNodeTransferConfig.transferType}
            </if>
            <if test="tNodeTransferConfig.copyData != null and tNodeTransferConfig.copyData.trim() != ''">
                AND a.COPY_DATA = #{tNodeTransferConfig.copyData}
            </if>
            <if test="tNodeTransferConfig.copyAtta != null and tNodeTransferConfig.copyAtta.trim() != ''">
                AND a.COPY_ATTA = #{tNodeTransferConfig.copyAtta}
            </if>
            <if test="tNodeTransferConfig.starterType != null and tNodeTransferConfig.starterType.trim() != ''">
                AND a.STARTER_TYPE = #{tNodeTransferConfig.starterType}
            </if>
            <if test="tNodeTransferConfig.starter != null and tNodeTransferConfig.starter.trim() != ''">
                AND a.STARTER = #{tNodeTransferConfig.starter}
            </if>
        </if>
    </sql>
    <!--tNodeTransferConfig简单分页查询-->
    <select id="getTNodeTransferConfigPage" resultMap="tNodeTransferConfigMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_node_transfer_config a
        <where>
            1=1
            <include refid="tNodeTransferConfig_where"/>
        </where>
    </select>
</mapper>
