mirror of https://gitee.com/stylefeng/roses
【8.1.5】【file】文件列表信息增加文件大小的返回
parent
863604986c
commit
8373a5766f
|
@ -46,4 +46,11 @@ public class AntdvFileInfo {
|
|||
*/
|
||||
private String thumbUrl;
|
||||
|
||||
/**
|
||||
* 文件大小:xx kb, xx mb
|
||||
* <p>
|
||||
* 【2024年4月10日新增】
|
||||
*/
|
||||
private String sizeInfo;
|
||||
|
||||
}
|
||||
|
|
|
@ -576,12 +576,13 @@ public class SysFileInfoServiceImpl extends ServiceImpl<SysFileInfoMapper, SysFi
|
|||
// 设置文件名称
|
||||
LambdaQueryWrapper<SysFileInfo> sysFileInfoLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
sysFileInfoLambdaQueryWrapper.eq(SysFileInfo::getFileId, fileId);
|
||||
sysFileInfoLambdaQueryWrapper.select(SysFileInfo::getFileOriginName);
|
||||
sysFileInfoLambdaQueryWrapper.select(SysFileInfo::getFileOriginName, SysFileInfo::getFileSizeInfo);
|
||||
SysFileInfo sysFileInfo = this.getOne(sysFileInfoLambdaQueryWrapper);
|
||||
if (sysFileInfo == null) {
|
||||
continue;
|
||||
}
|
||||
antdvFileInfo.setName(sysFileInfo.getFileOriginName());
|
||||
antdvFileInfo.setSizeInfo(sysFileInfo.getFileSizeInfo());
|
||||
|
||||
// 设置文件的访问url
|
||||
String fileAuthUrl = this.getFileAuthUrl(fileId);
|
||||
|
|
Loading…
Reference in New Issue