<?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.miaxis.file.mapper.FileInfoMapper">

    <resultMap type="FileInfo" id="FileInfoResult">
        <result property="fileId"    column="file_id"    />
        <result property="seq"    column="seq"    />
        <result property="fileType"    column="file_type"    />
        <result property="fileUrl"    column="file_url"    />
        <result property="filePath"    column="file_path"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>

    <sql id="selectFileInfoVo">
        select file_id, seq, file_url, file_path, create_time, update_time from file_info
    </sql>

    <select id="selectFileInfoList" parameterType="FileInfo" resultMap="FileInfoResult">
        <include refid="selectFileInfoVo"/>
        <where>
            <if test="seq != null "> and seq = #{seq}</if>
            <if test="fileType != null  and fileType != ''"> and file_type = #{fileType}</if>
            <if test="fileUrl != null  and fileUrl != ''"> and file_url = #{fileUrl}</if>
            <if test="filePath != null  and filePath != ''"> and file_path = #{filePath}</if>
        </where>
    </select>

</mapper>
