fix:1.提交邮件常量、ftp工具类、邮件实体、邮件日志实体
This commit is contained in:
parent
bf6b784e78
commit
306e5e65dd
|
@ -0,0 +1,9 @@
|
||||||
|
package org.jeecg.common.constant;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮件服务常量
|
||||||
|
*/
|
||||||
|
public class EmailConstant {
|
||||||
|
|
||||||
|
public static final String EMAIL_STATUS_PREFIX = "email_status";
|
||||||
|
}
|
|
@ -50,11 +50,9 @@ public class FTPUtil {
|
||||||
// 切换为本地被动模式,可以解决FTP上传后文件为空的问题,但需要服务器将FTP服务添加至防火墙白名单
|
// 切换为本地被动模式,可以解决FTP上传后文件为空的问题,但需要服务器将FTP服务添加至防火墙白名单
|
||||||
ftp.enterLocalPassiveMode();
|
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();
|
int reply = ftp.getReplyCode();
|
||||||
if (!FTPReply.isPositiveCompletion(reply)) {
|
if (!FTPReply.isPositiveCompletion(reply)) {
|
||||||
|
|
|
@ -22,10 +22,10 @@ public class SysEmail implements Serializable {
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邮箱名称
|
* email服务地址
|
||||||
*/
|
*/
|
||||||
@TableField(value = "name")
|
@TableField(value = "email_server_address")
|
||||||
private String name;
|
private String emailServerAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 邮箱类型(1-收件地址,2-发件地址)
|
* 邮箱类型(1-收件地址,2-发件地址)
|
||||||
|
@ -34,7 +34,7 @@ public class SysEmail implements Serializable {
|
||||||
private Integer emilType;
|
private Integer emilType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* email地址
|
* 邮箱登录名称
|
||||||
*/
|
*/
|
||||||
@TableField(value = "username")
|
@TableField(value = "username")
|
||||||
private String username;
|
private String username;
|
||||||
|
@ -49,7 +49,7 @@ public class SysEmail implements Serializable {
|
||||||
* 端口
|
* 端口
|
||||||
*/
|
*/
|
||||||
@TableField(value = "port")
|
@TableField(value = "port")
|
||||||
private String port;
|
private Integer port;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否启用邮箱(0-不启用,1-启用)
|
* 是否启用邮箱(0-不启用,1-启用)
|
||||||
|
@ -58,10 +58,10 @@ public class SysEmail implements Serializable {
|
||||||
private Integer enabled;
|
private Integer enabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 监测周期(秒)
|
* 定时获取邮件时间周期(秒)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "monitoring_cycle")
|
@TableField(value = "receive_mail_fixed_cycle")
|
||||||
private Integer monitoringCycle;
|
private Integer receiveMailFixedCycle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建日期
|
* 创建日期
|
||||||
|
|
|
@ -7,10 +7,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮件接收日志数据表
|
||||||
|
*/
|
||||||
@Data
|
@Data
|
||||||
@TableName(value = "sys_email_log")
|
@TableName(value = "sys_email_log")
|
||||||
public class SysEmailLog implements Serializable {
|
public class SysEmailLog implements Serializable {
|
||||||
|
@ -18,34 +20,37 @@ public class SysEmailLog implements Serializable {
|
||||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮件id
|
||||||
|
*/
|
||||||
@TableField(value = "email_id")
|
@TableField(value = "email_id")
|
||||||
private String emailId;
|
private String emailId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮件主题
|
||||||
|
*/
|
||||||
@TableField(value = "subject")
|
@TableField(value = "subject")
|
||||||
private String subject;
|
private String subject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮件内容
|
||||||
|
*/
|
||||||
@TableField(value = "context")
|
@TableField(value = "context")
|
||||||
private String context;
|
private String context;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 接收时间
|
||||||
|
*/
|
||||||
@TableField(value = "receive_time")
|
@TableField(value = "receive_time")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date receiveTime;
|
private Date receiveTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
@TableField(value = "create_time")
|
@TableField(value = "create_time")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date createTime;
|
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;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user