Commit ca465bbc authored by liqin's avatar liqin :speech_balloon:

bug fixed

No related merge requests found
......@@ -591,7 +591,7 @@ public class FileUploadController extends BaseController {
String fileUrl = FastDFSUtils.uploadFile(file.getInputStream(), file.getSize(), originalFilename, metaDataSet);
final FileInfo fileInfo = FastDFSUtils.getFileInfo(fileUrl);
final int crc32 = fileInfo.getCrc32();
final Asset one = this.assetService.getOne(Wrappers.<Asset>lambdaQuery().eq(Asset::getCrc32, (long) crc32).last(" limit 1"));
// final Asset one = this.assetService.getOne(Wrappers.<Asset>lambdaQuery().eq(Asset::getCrc32, (long) crc32).last(" limit 1"));
final long fileSize = fileInfo.getFileSize();
final Asset asset = Asset.builder()
......@@ -604,10 +604,10 @@ public class FileUploadController extends BaseController {
.language(language)
.crc32((long) crc32)
.build();
if (one != null) {
FastDFSUtils.deleteFile(fileUrl);
asset.setFileUrl(one.getFileUrl());
}
// if (one != null) {
// FastDFSUtils.deleteFile(fileUrl);
// asset.setFileUrl(one.getFileUrl());
// }
this.assetService.save(asset);
fileList.add(asset);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment