From 0cb299d3839f501349bf410c1809914043c2ca7d Mon Sep 17 00:00:00 2001 From: zcxlsm Date: Mon, 4 Aug 2025 21:36:42 +0800 Subject: [PATCH] feat(resource): 1 --- .../resource/api/RemoteFileServiceMock.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ruoyi-api/ruoyi-api-resource/src/main/java/org/dromara/resource/api/RemoteFileServiceMock.java b/ruoyi-api/ruoyi-api-resource/src/main/java/org/dromara/resource/api/RemoteFileServiceMock.java index fb6452fc..5a478bb7 100644 --- a/ruoyi-api/ruoyi-api-resource/src/main/java/org/dromara/resource/api/RemoteFileServiceMock.java +++ b/ruoyi-api/ruoyi-api-resource/src/main/java/org/dromara/resource/api/RemoteFileServiceMock.java @@ -2,6 +2,7 @@ package org.dromara.resource.api; import jakarta.servlet.http.HttpServletResponse; import lombok.extern.slf4j.Slf4j; +import org.dromara.common.core.exception.ServiceException; import org.dromara.common.core.utils.StringUtils; import org.dromara.resource.api.domain.RemoteFile; @@ -28,6 +29,18 @@ public class RemoteFileServiceMock implements RemoteFileService { return null; } + /** + * 文件上传 + * + * @param file 文件信息 + * @return 结果 + */ + @Override + public RemoteFile uploadImg(byte[] file) { + log.warn("服务调用异常 -> 降级处理"); + return null; + } + /** * 通过ossId查询对应的url * @@ -55,7 +68,7 @@ public class RemoteFileServiceMock implements RemoteFileService { /** * 文件下载方法,支持一次性下载完整文件 * - * @param ossId OSS对象ID + * @param ossId OSS对象ID * @return byte[] 返回下载的字节数组 */ public byte[] downloadToByteArray(Long ossId) throws IOException {