<?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.TNodeTimeoutConfigMapper">
    <resultMap id="tNodeTimeoutConfigMap" type="com.yifu.cloud.plus.v1.yifu.process.entity.TNodeTimeoutConfig">
        <id property="id" column="ID"/>
        <result property="timeOut" column="TIME_OUT"/>
        <result property="day" column="DAY"/>
        <result property="hour" column="HOUR"/>
        <result property="workHourFlag" column="WORK_HOUR_FLAG"/>
        <result property="nodeId" column="NODE_ID"/>
    </resultMap>
    <sql id="Base_Column_List">
             a.ID,
                  a.TIME_OUT,
                  a.DAY,
                  a.HOUR,
                  a.WORK_HOUR_FLAG,
                  a.NODE_ID
         </sql>
    <sql id="tNodeTimeoutConfig_where">
        <if test="tNodeTimeoutConfig != null">
            <if test="tNodeTimeoutConfig.id != null and tNodeTimeoutConfig.id.trim() != ''">
                AND a.ID = #{tNodeTimeoutConfig.id}
            </if>
            <if test="tNodeTimeoutConfig.timeOut != null and tNodeTimeoutConfig.timeOut.trim() != ''">
                AND a.TIME_OUT = #{tNodeTimeoutConfig.timeOut}
            </if>
            <if test="tNodeTimeoutConfig.day != null">
                AND a.DAY = #{tNodeTimeoutConfig.day}
            </if>
            <if test="tNodeTimeoutConfig.hour != null">
                AND a.HOUR = #{tNodeTimeoutConfig.hour}
            </if>
            <if test="tNodeTimeoutConfig.workHourFlag != null and tNodeTimeoutConfig.workHourFlag.trim() != ''">
                AND a.WORK_HOUR_FLAG = #{tNodeTimeoutConfig.workHourFlag}
            </if>
            <if test="tNodeTimeoutConfig.nodeId != null and tNodeTimeoutConfig.nodeId.trim() != ''">
                AND a.NODE_ID = #{tNodeTimeoutConfig.nodeId}
            </if>
        </if>
    </sql>
    <!--tNodeTimeoutConfig简单分页查询-->
    <select id="getTNodeTimeoutConfigPage" resultMap="tNodeTimeoutConfigMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_node_timeout_config a
        <where>
            1=1
            <include refid="tNodeTimeoutConfig_where"/>
        </where>
    </select>
</mapper>
