拆分文件中查询到多个文件内容处理
This commit is contained in:
+64
-14
@@ -112,12 +112,20 @@ public class FileSpiltService {
|
||||
try {
|
||||
//获取文件地址
|
||||
String connectId = sarFileSplitInfoEO.getConnectId();
|
||||
if (StringUtils.isEmpty(connectId)) {
|
||||
String fileName = sarFileSplitInfoEO.getFileName();
|
||||
if (StringUtils.isEmpty(connectId) || StringUtils.isEmpty(fileName)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
}
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper();
|
||||
queryWrapper.eq(OSSFile::getConnectId, connectId);
|
||||
OSSFile ossFile = iossFileService.getOne(queryWrapper);
|
||||
queryWrapper.eq(OSSFile::getFileName, fileName);
|
||||
queryWrapper.orderByDesc(OSSFile::getCreateTime);
|
||||
List<OSSFile> ossFileList = iossFileService.list(queryWrapper);
|
||||
if (CollectionUtils.isEmpty(ossFileList)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
}
|
||||
OSSFile ossFile = ossFileList.get(0);
|
||||
|
||||
String readFilePath = ossFile.getUrl();
|
||||
if (StringUtils.isEmpty(readFilePath)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
@@ -592,12 +600,19 @@ public class FileSpiltService {
|
||||
try {
|
||||
//获取文件地址
|
||||
String connectId = sarFileSplitInfoEO.getConnectId();
|
||||
if (StringUtils.isEmpty(connectId)) {
|
||||
String fileName = sarFileSplitInfoEO.getFileName();
|
||||
if (StringUtils.isEmpty(connectId) || StringUtils.isEmpty(fileName)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
}
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper();
|
||||
queryWrapper.eq(OSSFile::getConnectId, connectId);
|
||||
OSSFile ossFile = iossFileService.getOne(queryWrapper);
|
||||
queryWrapper.eq(OSSFile::getFileName, fileName);
|
||||
queryWrapper.orderByDesc(OSSFile::getCreateTime);
|
||||
List<OSSFile> ossFileList = iossFileService.list(queryWrapper);
|
||||
if (CollectionUtils.isEmpty(ossFileList)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
}
|
||||
OSSFile ossFile = ossFileList.get(0);
|
||||
String readFilePath = ossFile.getUrl();
|
||||
if (StringUtils.isEmpty(readFilePath)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
@@ -756,12 +771,19 @@ public class FileSpiltService {
|
||||
try {
|
||||
//获取文件地址
|
||||
String connectId = sarFileSplitInfoEO.getConnectId();
|
||||
if (StringUtils.isEmpty(connectId)) {
|
||||
String fileName = sarFileSplitInfoEO.getFileName();
|
||||
if (StringUtils.isEmpty(connectId) || StringUtils.isEmpty(fileName)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
}
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper();
|
||||
queryWrapper.eq(OSSFile::getConnectId, connectId);
|
||||
OSSFile ossFile = iossFileService.getOne(queryWrapper);
|
||||
queryWrapper.eq(OSSFile::getFileName, fileName);
|
||||
queryWrapper.orderByDesc(OSSFile::getCreateTime);
|
||||
List<OSSFile> ossFileList = iossFileService.list(queryWrapper);
|
||||
if (CollectionUtils.isEmpty(ossFileList)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
}
|
||||
OSSFile ossFile = ossFileList.get(0);
|
||||
String readFilePath = ossFile.getUrl();
|
||||
if (StringUtils.isEmpty(readFilePath)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
@@ -924,12 +946,19 @@ public class FileSpiltService {
|
||||
try {
|
||||
//获取文件地址
|
||||
String connectId = sarFileSplitInfoEO.getConnectId();
|
||||
if (StringUtils.isEmpty(connectId)) {
|
||||
String fileName = sarFileSplitInfoEO.getFileName();
|
||||
if (StringUtils.isEmpty(connectId) || StringUtils.isEmpty(fileName)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
}
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper();
|
||||
queryWrapper.eq(OSSFile::getConnectId, connectId);
|
||||
OSSFile ossFile = iossFileService.getOne(queryWrapper);
|
||||
queryWrapper.eq(OSSFile::getFileName, fileName);
|
||||
queryWrapper.orderByDesc(OSSFile::getCreateTime);
|
||||
List<OSSFile> ossFileList = iossFileService.list(queryWrapper);
|
||||
if (CollectionUtils.isEmpty(ossFileList)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
}
|
||||
OSSFile ossFile = ossFileList.get(0);
|
||||
String readFilePath = ossFile.getUrl();
|
||||
if (StringUtils.isEmpty(readFilePath)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
@@ -1092,12 +1121,19 @@ public class FileSpiltService {
|
||||
try {
|
||||
//获取文件地址
|
||||
String connectId = sarFileSplitInfoEO.getConnectId();
|
||||
if (StringUtils.isEmpty(connectId)) {
|
||||
String fileName = sarFileSplitInfoEO.getFileName();
|
||||
if (StringUtils.isEmpty(connectId) || StringUtils.isEmpty(fileName)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
}
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper();
|
||||
queryWrapper.eq(OSSFile::getConnectId, connectId);
|
||||
OSSFile ossFile = iossFileService.getOne(queryWrapper);
|
||||
queryWrapper.eq(OSSFile::getFileName, fileName);
|
||||
queryWrapper.orderByDesc(OSSFile::getCreateTime);
|
||||
List<OSSFile> ossFileList = iossFileService.list(queryWrapper);
|
||||
if (CollectionUtils.isEmpty(ossFileList)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
}
|
||||
OSSFile ossFile = ossFileList.get(0);
|
||||
String readFilePath = ossFile.getUrl();
|
||||
if (StringUtils.isEmpty(readFilePath)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
@@ -1257,12 +1293,19 @@ public class FileSpiltService {
|
||||
try {
|
||||
//获取文件地址
|
||||
String connectId = sarFileSplitInfoEO.getConnectId();
|
||||
if (StringUtils.isEmpty(connectId)) {
|
||||
String fileName = sarFileSplitInfoEO.getFileName();
|
||||
if (StringUtils.isEmpty(connectId) || StringUtils.isEmpty(fileName)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
}
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper();
|
||||
queryWrapper.eq(OSSFile::getConnectId, connectId);
|
||||
OSSFile ossFile = iossFileService.getOne(queryWrapper);
|
||||
queryWrapper.eq(OSSFile::getFileName, fileName);
|
||||
queryWrapper.orderByDesc(OSSFile::getCreateTime);
|
||||
List<OSSFile> ossFileList = iossFileService.list(queryWrapper);
|
||||
if (CollectionUtils.isEmpty(ossFileList)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
}
|
||||
OSSFile ossFile = ossFileList.get(0);
|
||||
String readFilePath = ossFile.getUrl();
|
||||
if (StringUtils.isEmpty(readFilePath)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
@@ -1427,12 +1470,19 @@ public class FileSpiltService {
|
||||
try {
|
||||
//获取文件地址
|
||||
String connectId = sarFileSplitInfoEO.getConnectId();
|
||||
if (StringUtils.isEmpty(connectId)) {
|
||||
String fileName = sarFileSplitInfoEO.getFileName();
|
||||
if (StringUtils.isEmpty(connectId) || StringUtils.isEmpty(fileName)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
}
|
||||
LambdaQueryWrapper<OSSFile> queryWrapper = new LambdaQueryWrapper();
|
||||
queryWrapper.eq(OSSFile::getConnectId, connectId);
|
||||
OSSFile ossFile = iossFileService.getOne(queryWrapper);
|
||||
queryWrapper.eq(OSSFile::getFileName, fileName);
|
||||
queryWrapper.orderByDesc(OSSFile::getCreateTime);
|
||||
List<OSSFile> ossFileList = iossFileService.list(queryWrapper);
|
||||
if (CollectionUtils.isEmpty(ossFileList)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
}
|
||||
OSSFile ossFile = ossFileList.get(0);
|
||||
String readFilePath = ossFile.getUrl();
|
||||
if (StringUtils.isEmpty(readFilePath)) {
|
||||
throw new JeroBootException("当前文件未找到,请重新选择!");
|
||||
|
||||
Reference in New Issue
Block a user