<?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.TProcessApprovalConfMapper">
    <resultMap id="tProcessApprovalConfMap" type="com.yifu.cloud.plus.v1.yifu.process.entity.TProcessApprovalConf">
        <id property="id" column="id"/>
        <result property="fieldName" column="field_name"/>
        <result property="processId" column="process_id"/>
        <result property="parentId" column="parent_id"/>
        <result property="type" column="type"/>
        <result property="deleteFlag" column="delete_flag"/>
    </resultMap>
    <sql id="Base_Column_List">
             a.id,
                  a.field_name,
                  a.process_id,
                  a.parent_id,
                  a.type,
                  a.delete_flag
         </sql>
    <sql id="tProcessApprovalConf_where">
        <if test="tProcessApprovalConf != null">
            <if test="tProcessApprovalConf.id != null and tProcessApprovalConf.id.trim() != ''">
                AND a.id = #{tProcessApprovalConf.id}
            </if>
            <if test="tProcessApprovalConf.fieldName != null and tProcessApprovalConf.fieldName.trim() != ''">
                AND a.field_name = #{tProcessApprovalConf.fieldName}
            </if>
            <if test="tProcessApprovalConf.processId != null and tProcessApprovalConf.processId.trim() != ''">
                AND a.process_id = #{tProcessApprovalConf.processId}
            </if>
            <if test="tProcessApprovalConf.parentId != null and tProcessApprovalConf.parentId.trim() != ''">
                AND a.parent_id = #{tProcessApprovalConf.parentId}
            </if>
            <if test="tProcessApprovalConf.type != null and tProcessApprovalConf.type.trim() != ''">
                AND a.type = #{tProcessApprovalConf.type}
            </if>
            <if test="tProcessApprovalConf.deleteFlag != null and tProcessApprovalConf.deleteFlag.trim() != ''">
                AND a.delete_flag = #{tProcessApprovalConf.deleteFlag}
            </if>
        </if>
    </sql>
    <!--tProcessApprovalConf简单分页查询-->
    <select id="getTProcessApprovalConfPage" resultMap="tProcessApprovalConfMap">
        SELECT
        <include refid="Base_Column_List"/>
        FROM t_process_approval_conf a
        <where>
            1=1
            <include refid="tProcessApprovalConf_where"/>
        </where>
    </select>
</mapper>
