新闻采集修改,完成发送邮件
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
package org.xyzh.common.dto.crontab;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description 创建定时任务请求
|
||||
* @filename CreateTaskRequest.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-11-18
|
||||
*/
|
||||
public class CreateTaskRequest {
|
||||
|
||||
/**
|
||||
* @description 任务信息
|
||||
*/
|
||||
private TbCrontabTask task;
|
||||
|
||||
/**
|
||||
* @description 任务元数据ID(用于查找默认接收人配置)
|
||||
*/
|
||||
private String metaId;
|
||||
|
||||
/**
|
||||
* @description 额外添加的接收人列表(从系统用户中选择,前端传入完整信息避免重复查询)
|
||||
*/
|
||||
private List<RecipientUserInfo> additionalRecipients;
|
||||
|
||||
public TbCrontabTask getTask() {
|
||||
return task;
|
||||
}
|
||||
|
||||
public void setTask(TbCrontabTask task) {
|
||||
this.task = task;
|
||||
}
|
||||
|
||||
public String getMetaId() {
|
||||
return metaId;
|
||||
}
|
||||
|
||||
public void setMetaId(String metaId) {
|
||||
this.metaId = metaId;
|
||||
}
|
||||
|
||||
public List<RecipientUserInfo> getAdditionalRecipients() {
|
||||
return additionalRecipients;
|
||||
}
|
||||
|
||||
public void setAdditionalRecipients(List<RecipientUserInfo> additionalRecipients) {
|
||||
this.additionalRecipients = additionalRecipients;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 接收人用户信息(从tb_sys_user选择)
|
||||
*/
|
||||
public static class RecipientUserInfo {
|
||||
/**
|
||||
* @description 用户ID
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* @description 用户邮箱
|
||||
*/
|
||||
private String userEmail;
|
||||
|
||||
/**
|
||||
* @description 用户名称
|
||||
*/
|
||||
private String username;
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserEmail() {
|
||||
return userEmail;
|
||||
}
|
||||
|
||||
public void setUserEmail(String userEmail) {
|
||||
this.userEmail = userEmail;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "RecipientUserInfo{" +
|
||||
"userId='" + userId + '\'' +
|
||||
", userEmail='" + userEmail + '\'' +
|
||||
", username='" + username + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CreateTaskRequest{" +
|
||||
"task=" + task +
|
||||
", metaId='" + metaId + '\'' +
|
||||
", additionalRecipients=" + additionalRecipients +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
package org.xyzh.common.dto.crontab;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
/**
|
||||
* @description 定时任务邮件通知默认接收人员表
|
||||
* @filename TbCrontabEmailDefault.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-11-18
|
||||
*/
|
||||
public class TbCrontabEmailDefault extends BaseDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 默认ID
|
||||
*/
|
||||
private String defaultId;
|
||||
|
||||
/**
|
||||
* @description 关联任务元数据ID
|
||||
*/
|
||||
private String metaId;
|
||||
|
||||
/**
|
||||
* @description 关联用户ID
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* @description 关联用户邮箱
|
||||
*/
|
||||
private String userEmail;
|
||||
|
||||
/**
|
||||
* @description 关联用户名称
|
||||
*/
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* @description 创建者
|
||||
*/
|
||||
private String creator;
|
||||
/**
|
||||
* @description 更新者
|
||||
*/
|
||||
private String updater;
|
||||
|
||||
public String getDefaultId() {
|
||||
return defaultId;
|
||||
}
|
||||
|
||||
public void setDefaultId(String defaultId) {
|
||||
this.defaultId = defaultId;
|
||||
}
|
||||
|
||||
public String getMetaId() {
|
||||
return metaId;
|
||||
}
|
||||
|
||||
public void setMetaId(String metaId) {
|
||||
this.metaId = metaId;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserEmail() {
|
||||
return userEmail;
|
||||
}
|
||||
|
||||
public void setUserEmail(String userEmail) {
|
||||
this.userEmail = userEmail;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getUpdater() {
|
||||
return updater;
|
||||
}
|
||||
|
||||
public void setUpdater(String updater) {
|
||||
this.updater = updater;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbCrontabEmailDefault{" +
|
||||
"id=" + getID() +
|
||||
", defaultId='" + defaultId + '\'' +
|
||||
", metaId='" + metaId + '\'' +
|
||||
", userId='" + userId + '\'' +
|
||||
", userEmail='" + userEmail + '\'' +
|
||||
", username='" + username + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
package org.xyzh.common.dto.crontab;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
/**
|
||||
* @description 定时任务邮件接收人表
|
||||
* @filename TbCrontabEmailRecipient.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-11-18
|
||||
*/
|
||||
public class TbCrontabEmailRecipient extends BaseDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 接收人ID
|
||||
*/
|
||||
private String recipientId;
|
||||
|
||||
/**
|
||||
* @description 关联任务ID(NULL表示不属于任务)
|
||||
*/
|
||||
private String taskId;
|
||||
|
||||
/**
|
||||
* @description 关联用户ID
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* @description 邮箱地址
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* @description 接收人姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* @description 创建者
|
||||
*/
|
||||
private String creator;
|
||||
|
||||
/**
|
||||
* @description 更新者
|
||||
*/
|
||||
private String updater;
|
||||
|
||||
public String getRecipientId() {
|
||||
return recipientId;
|
||||
}
|
||||
|
||||
public void setRecipientId(String recipientId) {
|
||||
this.recipientId = recipientId;
|
||||
}
|
||||
|
||||
public String getTaskId() {
|
||||
return taskId;
|
||||
}
|
||||
|
||||
public void setTaskId(String taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getUpdater() {
|
||||
return updater;
|
||||
}
|
||||
|
||||
public void setUpdater(String updater) {
|
||||
this.updater = updater;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbCrontabEmailRecipient{" +
|
||||
"id=" + getID() +
|
||||
", recipientId='" + recipientId + '\'' +
|
||||
", taskId='" + taskId + '\'' +
|
||||
", userId='" + userId + '\'' +
|
||||
", email='" + email + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,16 @@ public class TbCrontabTask extends BaseDTO {
|
||||
*/
|
||||
private String methodParams;
|
||||
|
||||
/**
|
||||
* @description 元数据ID(关联任务元数据表)
|
||||
*/
|
||||
private String metaId;
|
||||
|
||||
/**
|
||||
* @description 是否使用默认接收人(false:否 true:是)
|
||||
*/
|
||||
private Boolean defaultRecipient;
|
||||
|
||||
/**
|
||||
* @description Cron表达式
|
||||
*/
|
||||
@@ -126,6 +136,22 @@ public class TbCrontabTask extends BaseDTO {
|
||||
this.methodParams = methodParams;
|
||||
}
|
||||
|
||||
public String getMetaId() {
|
||||
return metaId;
|
||||
}
|
||||
|
||||
public void setMetaId(String metaId) {
|
||||
this.metaId = metaId;
|
||||
}
|
||||
|
||||
public Boolean getDefaultRecipient() {
|
||||
return defaultRecipient;
|
||||
}
|
||||
|
||||
public void setDefaultRecipient(Boolean defaultRecipient) {
|
||||
this.defaultRecipient = defaultRecipient;
|
||||
}
|
||||
|
||||
public String getCronExpression() {
|
||||
return cronExpression;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
package org.xyzh.common.dto.crontab;
|
||||
|
||||
import org.xyzh.common.dto.BaseDTO;
|
||||
|
||||
/**
|
||||
* @description 定时任务元数据表
|
||||
* @filename TbCrontabTaskMeta.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-11-18
|
||||
*/
|
||||
public class TbCrontabTaskMeta extends BaseDTO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description 元数据ID
|
||||
*/
|
||||
private String metaId;
|
||||
|
||||
/**
|
||||
* @description 任务名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* @description 任务描述
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* @description 任务分类(如:人民日报新闻爬取)
|
||||
*/
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* @description Bean名称(执行器类名)
|
||||
*/
|
||||
private String beanName;
|
||||
|
||||
/**
|
||||
* @description 执行方法名
|
||||
*/
|
||||
private String methodName;
|
||||
|
||||
/**
|
||||
* @description Python脚本路径(相对于basePath)
|
||||
*/
|
||||
private String scriptPath;
|
||||
|
||||
/**
|
||||
* @description 参数模板(JSON格式)
|
||||
*/
|
||||
private String paramSchema;
|
||||
|
||||
/**
|
||||
* @description 是否自动发布
|
||||
*/
|
||||
private Boolean autoPublish;
|
||||
|
||||
/**
|
||||
* @description 排序号
|
||||
*/
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* @description 创建者
|
||||
*/
|
||||
private String creator;
|
||||
|
||||
/**
|
||||
* @description 更新者
|
||||
*/
|
||||
private String updater;
|
||||
|
||||
public String getMetaId() {
|
||||
return metaId;
|
||||
}
|
||||
|
||||
public void setMetaId(String metaId) {
|
||||
this.metaId = metaId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getBeanName() {
|
||||
return beanName;
|
||||
}
|
||||
|
||||
public void setBeanName(String beanName) {
|
||||
this.beanName = beanName;
|
||||
}
|
||||
|
||||
public String getMethodName() {
|
||||
return methodName;
|
||||
}
|
||||
|
||||
public void setMethodName(String methodName) {
|
||||
this.methodName = methodName;
|
||||
}
|
||||
|
||||
public String getScriptPath() {
|
||||
return scriptPath;
|
||||
}
|
||||
|
||||
public void setScriptPath(String scriptPath) {
|
||||
this.scriptPath = scriptPath;
|
||||
}
|
||||
|
||||
public String getParamSchema() {
|
||||
return paramSchema;
|
||||
}
|
||||
|
||||
public void setParamSchema(String paramSchema) {
|
||||
this.paramSchema = paramSchema;
|
||||
}
|
||||
|
||||
public Boolean getAutoPublish() {
|
||||
return autoPublish;
|
||||
}
|
||||
|
||||
public void setAutoPublish(Boolean autoPublish) {
|
||||
this.autoPublish = autoPublish;
|
||||
}
|
||||
|
||||
public Integer getSortOrder() {
|
||||
return sortOrder;
|
||||
}
|
||||
|
||||
public void setSortOrder(Integer sortOrder) {
|
||||
this.sortOrder = sortOrder;
|
||||
}
|
||||
|
||||
public String getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
public void setCreator(String creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
public String getUpdater() {
|
||||
return updater;
|
||||
}
|
||||
|
||||
public void setUpdater(String updater) {
|
||||
this.updater = updater;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TbCrontabTaskMeta{" +
|
||||
"id=" + getID() +
|
||||
", metaId='" + metaId + '\'' +
|
||||
", name='" + name + '\'' +
|
||||
", category='" + category + '\'' +
|
||||
", beanName='" + beanName + '\'' +
|
||||
", methodName='" + methodName + '\'' +
|
||||
", scriptPath='" + scriptPath + '\'' +
|
||||
", paramSchema='" + paramSchema + '\'' +
|
||||
", autoPublish=" + autoPublish +
|
||||
", sortOrder=" + sortOrder +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user