删除兼容app端历史数据处理

This commit is contained in:
tianliyong 2022-12-20 17:05:23 +08:00
parent b710a7895d
commit 82be5cf601

View File

@ -104,7 +104,12 @@ public class FileServiceImpl implements FileService {
//兼容app端oss历史上传文件的url处理
String tgtFileKey = file.getFileUrl().substring(file.getFileUrl().indexOf(".com/") + 5);
log.debug("delete tgtFileKey = {}", tgtFileKey);
boolean deleteFlag = fileManager.delete(file.getBucketName(), tgtFileKey);
String bucketName = file.getBucketName();
if (file.getFileUrl().contains(APP_PRO_BUCKET_NAME)) {
//兼容处理支持app端bucketNameaxzo-pro
bucketName = APP_PRO_BUCKET_NAME;
}
boolean deleteFlag = fileManager.delete(bucketName, tgtFileKey);
log.info("delete deleteFlag = {}", deleteFlag);
if (deleteFlag) {
File updateFile = new File();