forked from github/dataease
perf(X-Pack): 优化邮件设置
This commit is contained in:
parent
daa7789590
commit
a19003f698
@ -102,6 +102,17 @@
|
||||
<artifactId>selenium-java</artifactId>
|
||||
<version>${selenium-java.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.angus</groupId>
|
||||
<artifactId>angus-mail</artifactId>
|
||||
<version>${angus-mail.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.eclipse.angus</groupId>
|
||||
<artifactId>angus-activation</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit b27c2cc4ed5d9ab277d3320f8239895f0a353330
|
||||
Subproject commit 50699c9a2be31a1896e3d355013bbc0c1c20cd6a
|
8
pom.xml
8
pom.xml
@ -44,17 +44,11 @@
|
||||
<maven.exec.version>3.1.0</maven.exec.version>
|
||||
<guava.version>31.1-jre</guava.version>
|
||||
<selenium-java.version>4.19.1</selenium-java.version>
|
||||
<jakarta.mail-api.version>2.1.3</jakarta.mail-api.version>
|
||||
<angus-mail.version>2.0.3</angus-mail.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>${guava.version}</version>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||
|
@ -1,7 +1,9 @@
|
||||
package io.dataease.api.email;
|
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
import io.dataease.api.email.dto.EmailDTO;
|
||||
import io.dataease.api.system.vo.SettingItemVO;
|
||||
import io.swagger.v3.oas.annotations.Hidden;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -25,4 +27,8 @@ public interface EmailApi {
|
||||
@Operation(summary = "校验邮件设置")
|
||||
@PostMapping("/setting/validate")
|
||||
void validate(@RequestBody List<SettingItemVO> settingItemVOS);
|
||||
|
||||
@PostMapping("/send")
|
||||
@Hidden
|
||||
void send(@RequestBody EmailDTO dto);
|
||||
}
|
||||
|
@ -0,0 +1,35 @@
|
||||
package io.dataease.api.email.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EmailDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 3599154848839436838L;
|
||||
|
||||
private List<String> recipientList;
|
||||
|
||||
private String from;
|
||||
|
||||
private String subject;
|
||||
|
||||
private byte[] content;
|
||||
|
||||
private List<File> fileList;
|
||||
|
||||
private List<EmailFile> emailFiles;
|
||||
|
||||
public boolean existFile() {
|
||||
return CollectionUtils.isNotEmpty(fileList) || CollectionUtils.isNotEmpty(emailFiles);
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package io.dataease.api.email.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class EmailFile implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = -3898069299109267651L;
|
||||
|
||||
private String fileName;
|
||||
|
||||
private byte[] fileByte;
|
||||
}
|
Loading…
Reference in New Issue
Block a user