diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/EmailConstant.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/EmailConstant.java new file mode 100644 index 00000000..b547a7ee --- /dev/null +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/EmailConstant.java @@ -0,0 +1,9 @@ +package org.jeecg.common.constant; + +/** + * 邮件服务常量 + */ +public class EmailConstant { + + public static final String EMAIL_STATUS_PREFIX = "email_status"; +} diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java index 44f2e925..22e7468e 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/FTPUtil.java @@ -50,11 +50,9 @@ public class FTPUtil { // 切换为本地被动模式,可以解决FTP上传后文件为空的问题,但需要服务器将FTP服务添加至防火墙白名单 ftp.enterLocalPassiveMode(); //连接 - ftp.connect("182.92.183.230", 21); -// ftp.connect(host, port); + ftp.connect(host, port); //登录 - ftp.login("xiao", "123456"); -// ftp.login(userName, password); + ftp.login(userName, password); //判断是否连接成功 int reply = ftp.getReplyCode(); if (!FTPReply.isPositiveCompletion(reply)) { diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/SysEmail.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/SysEmail.java index b0a4f1f1..820cdccf 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/SysEmail.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/SysEmail.java @@ -22,10 +22,10 @@ public class SysEmail implements Serializable { private String id; /** - * 邮箱名称 + * email服务地址 */ - @TableField(value = "name") - private String name; + @TableField(value = "email_server_address") + private String emailServerAddress; /** * 邮箱类型(1-收件地址,2-发件地址) @@ -34,7 +34,7 @@ public class SysEmail implements Serializable { private Integer emilType; /** - * email地址 + * 邮箱登录名称 */ @TableField(value = "username") private String username; @@ -49,7 +49,7 @@ public class SysEmail implements Serializable { * 端口 */ @TableField(value = "port") - private String port; + private Integer port; /** * 是否启用邮箱(0-不启用,1-启用) @@ -58,10 +58,10 @@ public class SysEmail implements Serializable { private Integer enabled; /** - * 监测周期(秒) + * 定时获取邮件时间周期(秒) */ - @TableField(value = "monitoring_cycle") - private Integer monitoringCycle; + @TableField(value = "receive_mail_fixed_cycle") + private Integer receiveMailFixedCycle; /** * 创建日期 diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/SysEmailLog.java b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/SysEmailLog.java index 3d29f926..b46fff86 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/SysEmailLog.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/modules/base/entity/SysEmailLog.java @@ -7,10 +7,12 @@ import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; - import java.io.Serializable; import java.util.Date; +/** + * 邮件接收日志数据表 + */ @Data @TableName(value = "sys_email_log") public class SysEmailLog implements Serializable { @@ -18,34 +20,37 @@ public class SysEmailLog implements Serializable { @TableId(value = "id", type = IdType.ASSIGN_ID) private String id; + /** + * 邮件id + */ @TableField(value = "email_id") private String emailId; + /** + * 邮件主题 + */ @TableField(value = "subject") private String subject; + /** + * 邮件内容 + */ @TableField(value = "context") private String context; + /** + * 接收时间 + */ @TableField(value = "receive_time") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date receiveTime; + /** + * 创建时间 + */ @TableField(value = "create_time") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date createTime; - - @TableField(value = "create_by") - private String createBy; - - @TableField(value = "update_time") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - @TableField(value = "update_by") - private String updateBy; - }