|
|
@@ -17,6 +17,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.dromara.common.core.exception.ServiceException;
|
|
|
import org.dromara.common.core.utils.MapstructUtils;
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
|
+import org.dromara.common.encrypt.utils.EncryptUtils;
|
|
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
import org.dromara.common.oss.core.OssClient;
|
|
|
@@ -547,7 +548,6 @@ public class SmsbMinioDataServiceImpl implements ISmsbMinioDataService {
|
|
|
return new SmsbFileUploadMsgVo(Boolean.FALSE, "Invalid parameters", null);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// Save chunk
|
|
|
Path chunkDir = Paths.get(tempDir, uploadId);
|
|
|
Files.createDirectories(chunkDir);
|
|
|
@@ -825,7 +825,10 @@ public class SmsbMinioDataServiceImpl implements ISmsbMinioDataService {
|
|
|
@Override
|
|
|
public SysOssVo uploadSmsb(MultipartFile file) {
|
|
|
// 计算文件的MD5
|
|
|
- String md5 = getFileMD5(file);
|
|
|
+ File tempFile = convertMultipartFileToFile(file);
|
|
|
+ // String md5 = getFileMD5(file);
|
|
|
+ // 用 Sm3 替换 MD5
|
|
|
+ String md5 = EncryptUtils.digest_sm3(tempFile);
|
|
|
// 根据Md5查询当前租户下是否存在相同文件
|
|
|
SysOssVo sysOss = sysOssMapper.selectVoOne(new LambdaQueryWrapper<SysOss>().eq(SysOss::getFileMd5, md5));
|
|
|
if (sysOss != null) {
|