09-22-文件服务暴露删除方法
This commit is contained in:
@ -18,6 +18,7 @@ import org.dromara.resource.service.ISysOssService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -86,4 +87,13 @@ public class RemoteFileServiceImpl implements RemoteFileService {
|
||||
List<SysOssVo> sysOssVos = sysOssService.listByIds(StringUtils.splitTo(ossIds, Convert::toLong));
|
||||
return MapstructUtils.convert(sysOssVos, RemoteFile.class);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void deleteFile(Collection<String> urls){
|
||||
OssClient storage = OssFactory.instance();
|
||||
for (String url : urls) {
|
||||
storage.delete(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user