Browse Source

Attachment增加ossId

ops-management-platform-backend-dev
gjh 2 weeks ago
parent
commit
9593c8dcbf
  1. 33
      ruoyi-modules/guoyan-platform/src/main/java/org/dromara/platform/domain/Attachment.java
  2. 4
      ruoyi-modules/guoyan-platform/src/main/java/org/dromara/platform/domain/AttachmentSerializer.java

33
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;
}
}

4
ruoyi-modules/guoyan-platform/src/main/java/org/dromara/platform/domain/AttachmentSerializer.java

@ -52,8 +52,8 @@ public class AttachmentSerializer {
// 创建一些模拟数据
List<Attachment> 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")
);
// 序列化

Loading…
Cancel
Save