1
0

文件管理代码优化

This commit is contained in:
2025-07-12 15:31:27 +08:00
parent e13e3c57a6
commit 6f4e18fb3f
3 changed files with 16 additions and 5 deletions

View File

@ -5,16 +5,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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
select a.id,a.business_id,a.file_id,b.file_name,b.url fileUrl,a.file_type from app_business_file a left join sys_oss b on a.file_id = b.oss_id
where
<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="createBy != null">
a.create_by = #{createBy}
<if test="fileType != null">
and a.file_type = #{fileType}
</if>
order by a.create_time desc
</select>