<?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.fuyuanshen.app.mapper.AppBusinessFileMapper">

    <select id="queryAppFileList" resultType="com.fuyuanshen.app.domain.vo.AppFileVo">
        select a.id,a.business_id,a.file_id,b.file_name,b.url fileUrl from app_business_file a left join sys_oss b on a.file_id = b.oss_id
        where 1=1
        <if test="createBy != null">
            a.create_by = #{createBy}
        </if>
        <if test="businessId != null">
            and a.business_id = #{businessId}
        </if>
        <if test="fileId != null">
            and a.file_id = #{fileId}
        </if>
        <if test="fileType != null">
            and a.file_type = #{fileType}
        </if>
        <if test="createBy != null">
            and a.create_by = #{createBy}
        </if>
        order by a.create_time desc
    </select>
</mapper>
