|
@@ -1,8 +1,5 @@
|
|
|
package com.hfln.portal.infrastructure.service.impl;
|
|
|
|
|
|
-import com.aliyun.oss.OSS;
|
|
|
-import com.aliyun.oss.OSSClientBuilder;
|
|
|
-import com.aliyun.oss.model.ObjectMetadata;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.hfln.portal.infrastructure.mapper.TblOssFileMapper;
|
|
@@ -11,10 +8,7 @@ import com.hfln.portal.infrastructure.po.TblOssFile;
|
|
|
import com.hfln.portal.infrastructure.service.OssFileService;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
-import java.io.IOException;
|
|
|
-import java.io.InputStream;
|
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
|
|
@@ -46,13 +40,15 @@ public class OssFileServiceImpl extends ServiceImpl<TblOssFileMapper, TblOssFile
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public TblOssFile queryOneFile(String busiType, String busiKey) {
|
|
|
+ public TblOssFile queryOneFile(String busiType, String busiKey, String fileName) {
|
|
|
LambdaQueryWrapper<TblOssFile> queryWrapper = new LambdaQueryWrapper<TblOssFile>()
|
|
|
- .select()
|
|
|
.eq(TblOssFile::getBusiType, busiType);
|
|
|
if (Objects.nonNull(busiKey)) {
|
|
|
queryWrapper.eq(TblOssFile::getBusiKey, busiKey);
|
|
|
}
|
|
|
+ if (Objects.nonNull(fileName)){
|
|
|
+ queryWrapper.eq(TblOssFile::getFileName, fileName);
|
|
|
+ }
|
|
|
return this.baseMapper.selectOne(queryWrapper);
|
|
|
}
|
|
|
|