diff --git a/ruoyi-modules/guoyan-platform/src/main/java/org/dromara/platform/domain/Attachment.java b/ruoyi-modules/guoyan-platform/src/main/java/org/dromara/platform/domain/Attachment.java index 69d1535..6b661fd 100644 --- a/ruoyi-modules/guoyan-platform/src/main/java/org/dromara/platform/domain/Attachment.java +++ b/ruoyi-modules/guoyan-platform/src/main/java/org/dromara/platform/domain/Attachment.java @@ -1,32 +1,15 @@ package org.dromara.platform.domain; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor public class Attachment { private String url; private String name; + private String ossId; - // 默认构造函数 - public Attachment() {} - - // 带参数的构造函数 - public Attachment(String url, String name) { - this.url = url; - this.name = name; - } - - // Getter 和 Setter 方法 - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } } diff --git a/ruoyi-modules/guoyan-platform/src/main/java/org/dromara/platform/domain/AttachmentSerializer.java b/ruoyi-modules/guoyan-platform/src/main/java/org/dromara/platform/domain/AttachmentSerializer.java index 43d031a..cc591c8 100644 --- a/ruoyi-modules/guoyan-platform/src/main/java/org/dromara/platform/domain/AttachmentSerializer.java +++ b/ruoyi-modules/guoyan-platform/src/main/java/org/dromara/platform/domain/AttachmentSerializer.java @@ -52,8 +52,8 @@ public class AttachmentSerializer { // 创建一些模拟数据 List attachmentList = List.of( - new Attachment("http://example.com/file1.pdf", "File One"), - new Attachment("http://example.com/file2.docx", "File Two") + new Attachment("http://example.com/file1.pdf", "File One", "ossId1"), + new Attachment("http://example.com/file2.docx", "File Two", "ossId2") ); // 序列化