<?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="cn.czh.mapper.UploadFileMapper">

    <select id="pageFiles" resultType="cn.czh.entity.UploadFile">
        select * from upload_file
        <where>
            <if test="storageType != null and storageType != ''">
                and storage_type = #{storageType}
            </if>
            <if test="fileName != null and fileName !=''">
                and file_name like concat('%', #{fileName}, '%')
            </if>
            and is_finish = 1
        </where>
        order by id desc
    </select>
</mapper>