<?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.yeejoin.equipmanage.mapper.EqSourceFileMapper">

    <select id="findImgByFileCategory" resultType="com.yeejoin.equipmanage.common.vo.SourceFileVo">
        SELECT
            f.file_category,
            f.file_name,
            f.file_path,
            f.source_id
        FROM
            `wl_source_file` f
            <where>
                <if test="id != null">
                    f.source_id = #{id}
                </if>
                <if test="fileCategory != null and fileCategory != ''">
                    AND f.file_category = #{fileCategory}
                </if>
            </where>
    </select>
</mapper>
