<?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.xrtygis.mapper.FileMapper">

    <resultMap id="fileMap" type="com.tofly.xrtygis.entity.File">
        <id property="id" column="ID"/>
        <result property="tableName" column="TABLE_NAME"/>
        <result property="tableId" column="TABLE_ID"/>
        <result property="filePath" column="FILE_PATH"/>
        <result property="statusFlag" column="STATUS_FLAG"/>
        <result property="fileName" column="FILE_NAME"/>
        <result property="otherName" column="OTHER_NAME"/>
        <result property="fileFormat" column="FILE_FORMAT"/>
        <result property="fileSize" column="FILE_SIZE"/>
        <result property="createTime" column="CREATE_TIME"/>
        <result property="createUser" column="CREATE_USER"/>
        <association property="createUserName" column="CREATE_USER"
                     select="com.tofly.baseapi.mapper.ToflyCodeCommonMapper.getUserName"/>
    </resultMap>

    <select id="getPath" resultType="string">
        select FILE_PATH from TF_YWPN_FILE_W where ID = #{id}
    </select>

    <select id="getPaths" resultType="string">
        select FILE_PATH from TF_YWPN_FILE_W where id in (${ids})
    </select>
</mapper>
