From 306e5e65dd68d65d31bb6b17ec2e8bf1325dd3a0 Mon Sep 17 00:00:00 2001 From: panbaolin <123456> Date: Mon, 19 Jun 2023 19:55:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:1.=E6=8F=90=E4=BA=A4=E9=82=AE=E4=BB=B6?= =?UTF-8?q?=E5=B8=B8=E9=87=8F=E3=80=81ftp=E5=B7=A5=E5=85=B7=E7=B1=BB?= =?UTF-8?q?=E3=80=81=E9=82=AE=E4=BB=B6=E5=AE=9E=E4=BD=93=E3=80=81=E9=82=AE?= =?UTF-8?q?=E4=BB=B6=E6=97=A5=E5=BF=97=E5=AE=9E=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jeecg/common/constant/EmailConstant.java | 9 ++++++ .../java/org/jeecg/common/util/FTPUtil.java | 6 ++-- .../jeecg/modules/base/entity/SysEmail.java | 16 +++++----- .../modules/base/entity/SysEmailLog.java | 31 +++++++++++-------- 4 files changed, 37 insertions(+), 25 deletions(-) create mode 100644 jeecg-boot-base-core/src/main/java/org/jeecg/common/constant/EmailConstant.java 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; - }