package com.ruoyi.system.domain;
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
|
import java.util.Date;
|
|
/**
|
* 通知任务主表实体类
|
* 用于统一管理待发送的通知任务
|
*
|
* @author ruoyi
|
* @date 2025-12-07
|
*/
|
public class NotifyTask extends BaseEntity {
|
private static final long serialVersionUID = 1L;
|
|
// ==================== 通知类型常量 ====================
|
/** 通知类型:任务分配 */
|
public static final String NOTIFY_TYPE_TASK_ASSIGN = "TASK_ASSIGN";
|
/** 通知类型:状态变更 */
|
public static final String NOTIFY_TYPE_STATUS_CHANGE = "STATUS_CHANGE";
|
/** 通知类型:任务创建 */
|
public static final String NOTIFY_TYPE_TASK_CREATE = "TASK_CREATE";
|
|
// ==================== 处理状态常量 ====================
|
/** 处理状态:待处理 */
|
public static final String STATUS_PENDING = "0";
|
/** 处理状态:处理中 */
|
public static final String STATUS_PROCESSING = "1";
|
/** 处理状态:已完成 */
|
public static final String STATUS_COMPLETED = "2";
|
/** 处理状态:失败 */
|
public static final String STATUS_FAILED = "3";
|
|
/** 主键ID */
|
private Long id;
|
|
/** 关联的业务任务ID */
|
@Excel(name = "任务ID")
|
private Long taskId;
|
|
/** 任务编号 */
|
@Excel(name = "任务编号")
|
private String taskCode;
|
|
/** 通知类型 */
|
@Excel(name = "通知类型")
|
private String notifyType;
|
|
/** 接收用户ID */
|
@Excel(name = "用户ID")
|
private Long userId;
|
|
/** 接收用户姓名 */
|
@Excel(name = "用户姓名")
|
private String userName;
|
|
/** 接收用户手机号 */
|
@Excel(name = "手机号")
|
private String userPhone;
|
|
/** 通知标题 */
|
@Excel(name = "通知标题")
|
private String title;
|
|
/** 通知内容 */
|
@Excel(name = "通知内容")
|
private String content;
|
|
/** 扩展数据(JSON格式) */
|
private String extraData;
|
|
/** 处理状态 */
|
@Excel(name = "处理状态", readConverterExp = "0=待处理,1=处理中,2=已完成,3=失败")
|
private String status;
|
|
/** 重试次数 */
|
private Integer retryCount;
|
|
/** 最大重试次数 */
|
private Integer maxRetry;
|
|
/** 错误信息 */
|
private String errorMsg;
|
|
public Long getId() {
|
return id;
|
}
|
|
public void setId(Long id) {
|
this.id = id;
|
}
|
|
public Long getTaskId() {
|
return taskId;
|
}
|
|
public void setTaskId(Long taskId) {
|
this.taskId = taskId;
|
}
|
|
public String getTaskCode() {
|
return taskCode;
|
}
|
|
public void setTaskCode(String taskCode) {
|
this.taskCode = taskCode;
|
}
|
|
public String getNotifyType() {
|
return notifyType;
|
}
|
|
public void setNotifyType(String notifyType) {
|
this.notifyType = notifyType;
|
}
|
|
public Long getUserId() {
|
return userId;
|
}
|
|
public void setUserId(Long userId) {
|
this.userId = userId;
|
}
|
|
public String getUserName() {
|
return userName;
|
}
|
|
public void setUserName(String userName) {
|
this.userName = userName;
|
}
|
|
public String getUserPhone() {
|
return userPhone;
|
}
|
|
public void setUserPhone(String userPhone) {
|
this.userPhone = userPhone;
|
}
|
|
public String getTitle() {
|
return title;
|
}
|
|
public void setTitle(String title) {
|
this.title = title;
|
}
|
|
public String getContent() {
|
return content;
|
}
|
|
public void setContent(String content) {
|
this.content = content;
|
}
|
|
public String getExtraData() {
|
return extraData;
|
}
|
|
public void setExtraData(String extraData) {
|
this.extraData = extraData;
|
}
|
|
public String getStatus() {
|
return status;
|
}
|
|
public void setStatus(String status) {
|
this.status = status;
|
}
|
|
public Integer getRetryCount() {
|
return retryCount;
|
}
|
|
public void setRetryCount(Integer retryCount) {
|
this.retryCount = retryCount;
|
}
|
|
public Integer getMaxRetry() {
|
return maxRetry;
|
}
|
|
public void setMaxRetry(Integer maxRetry) {
|
this.maxRetry = maxRetry;
|
}
|
|
public String getErrorMsg() {
|
return errorMsg;
|
}
|
|
public void setErrorMsg(String errorMsg) {
|
this.errorMsg = errorMsg;
|
}
|
|
@Override
|
public String toString() {
|
return "NotifyTask{" +
|
"id=" + id +
|
", taskId=" + taskId +
|
", taskCode='" + taskCode + '\'' +
|
", notifyType='" + notifyType + '\'' +
|
", userId=" + userId +
|
", userName='" + userName + '\'' +
|
", status='" + status + '\'' +
|
'}';
|
}
|
}
|