<?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.ruoyi.cms.mapper.FileMapper">
    
    <resultMap type="File" id="FileResult">
        <result property="id"    column="id"    />
        <result property="fileUrl"    column="file_url"    />
        <result property="bussinessId"    column="bussinessId"    />
        <result property="delFlag"    column="del_flag"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
    </resultMap>

    <sql id="selectFileVo">
        select id, file_url, bussinessId, del_flag, create_by, create_time, update_by, update_time from file
    </sql>

    <select id="selectFileList" parameterType="File" resultMap="FileResult">
        <include refid="selectFileVo"/>
        <where>  del_flag = '0'
            <if test="fileUrl != null  and fileUrl != ''"> and file_url = #{fileUrl}</if>
            <if test="bussinessId != null "> and bussinessId = #{bussinessId}</if>
        </where>
    </select>
</mapper>