附属属性相关接口修改
This commit is contained in:
parent
0d8c35afc1
commit
72573c30c0
@ -444,7 +444,9 @@ public class SysEquipmentServiceImpl implements SysEquipmentService {
|
||||
List<SysEquipmentDocs> collectDelete = sysEquipmentDocs.stream().filter(item -> !collect.contains(item.getId())).collect(Collectors.toList());
|
||||
//删除minio文件和数据库记录
|
||||
for (SysEquipmentDocs item : collectDelete){
|
||||
sysEquipmentDocsMapper.deleteById(item.getId());
|
||||
deleteFile(item);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -543,7 +545,6 @@ public class SysEquipmentServiceImpl implements SysEquipmentService {
|
||||
|
||||
@Override
|
||||
public void readFileToSteam(String path, OutputStream stream) {
|
||||
path = minioAutoProperties.getPublicBucket()+ FileConstants.FILE_SEPARATOR+ path;
|
||||
minioViewsServcie.readFileToStream(path, stream);
|
||||
}
|
||||
|
||||
|
@ -200,7 +200,7 @@ public class MinioViewsServcie {
|
||||
public void readFileToStream(String path, OutputStream stream) {
|
||||
|
||||
try (GetObjectResponse res = minioClient.getObject(
|
||||
GetObjectArgs.builder().bucket(minioProperties.getBucket()).object(path).build())) {
|
||||
GetObjectArgs.builder().bucket(minioProperties.getPublicBucket()).object(path).build())) {
|
||||
res.transferTo(stream);
|
||||
} catch (Exception e) {
|
||||
log.error("minio读取文件失败", e);
|
||||
|
Loading…
Reference in New Issue
Block a user