<?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.tofly.xrtymis.mapper.GdglflowMapper">

    <resultMap id="gdglflowMap" type="com.tofly.xrtymis.entity.Gdglflow">
        <result property="gdbh" column="GDBH"/>
        <result property="id" column="ID"/>
        <result property="clry" column="CLRY"/>
        <result property="clsj" column="CLSJ"/>
        <result property="clyj" column="CLYJ"/>
        <result property="lcjd" column="LCJD"/>
        <result property="lcds" column="LCDS"/>
        <result property="bbhYj" column="BBH_YJ"/>
        <result property="bbhClsj" column="BBH_CLSJ"/>
        <result property="bbhFileid" column="BBH_FILEID"/>
        <result property="bbhLcjd" column="BBH_LCJD"/>
        <result property="createTime" column="CREATE_TIME"/>
        <result property="updateTime" column="UPDATE_TIME"/>
        <result property="statusFlag" column="STATUS_FLAG"/>
        <result property="createUser" column="CREATE_USER"/>
        <association property="files" column="BBH_FILEID" select="files"/>
    </resultMap>

    <select id="files" resultType="File">
        select * FROM TF_YWPN_FILE_W WHERE ID in
        <if test="fileid != null and fileid.trim() != ''">
            <foreach item="fileid" index="fileid" collection="fileid.split(',')" separator="," open="(" close=")">
                #{fileid}
            </foreach>
        </if>
    </select>

</mapper>
