fix:1.提交邮件常量、ftp工具类、邮件实体、邮件日志实体

This commit is contained in:
panbaolin 2023-06-19 19:55:50 +08:00
parent bf6b784e78
commit 306e5e65dd
4 changed files with 37 additions and 25 deletions

View File

@ -0,0 +1,9 @@
package org.jeecg.common.constant;
/**
* 邮件服务常量
*/
public class EmailConstant {
public static final String EMAIL_STATUS_PREFIX = "email_status";
}

View File

@ -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)) {

View File

@ -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;
/**
* 创建日期

View File

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