增加agent联调,获取最新策略应答功能
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
@@ -11,12 +12,17 @@ import lombok.Data;
|
||||
* @date 2025-09-08
|
||||
*/
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class InitialHeartbeatListen extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 客户端ID */
|
||||
private String clientId;
|
||||
/** 节点 */
|
||||
private String logicalNode;
|
||||
/** sn */
|
||||
private String sn;
|
||||
|
||||
/** 强度值 */
|
||||
@Excel(name = "强度值")
|
||||
|
||||
@@ -74,5 +74,11 @@ public class RmAgentManagement extends BaseEntity
|
||||
private String includeNames;
|
||||
/** 查询条件名称 */
|
||||
private String queryName;
|
||||
/** 文件MD5 */
|
||||
private String fileMd5;
|
||||
/** 客户端id */
|
||||
private String clientId;
|
||||
/** 部署设备 */
|
||||
private String deployDevice;
|
||||
|
||||
}
|
||||
|
||||
@@ -81,4 +81,12 @@ public class RmDeploymentPolicy extends BaseEntity
|
||||
private String resourceGroupName;
|
||||
/** 资源组置空 */
|
||||
private Boolean resourceGroupIdNull;
|
||||
/** 部署设备 */
|
||||
private String deployDevice;
|
||||
/** 业务脚本名称 */
|
||||
private String scriptName;
|
||||
/** 业务脚本文件地址 */
|
||||
private String scriptPath;
|
||||
/** 业务脚本参数 */
|
||||
private String defaultParams;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 文件信息对象 rm_file_info
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-15
|
||||
*/
|
||||
public class RmFileInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 文件ID */
|
||||
private Long id;
|
||||
|
||||
/** 文件名称 */
|
||||
@Excel(name = "文件名称")
|
||||
private String name;
|
||||
|
||||
/** 文件类型(如:jpg、pdf、exe等) */
|
||||
@Excel(name = "文件类型", readConverterExp = "如=:jpg、pdf、exe等")
|
||||
private String type;
|
||||
|
||||
/** 文件描述 */
|
||||
@Excel(name = "文件描述")
|
||||
private String description;
|
||||
|
||||
/** 文件大小(KB) */
|
||||
@Excel(name = "文件大小", readConverterExp = "K=B")
|
||||
private Long fileSize;
|
||||
|
||||
/** 文件MD5值 */
|
||||
@Excel(name = "文件MD5值")
|
||||
private String md5;
|
||||
|
||||
/** 文件存储路径 */
|
||||
@Excel(name = "文件存储路径")
|
||||
private String path;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setFileSize(Long fileSize)
|
||||
{
|
||||
this.fileSize = fileSize;
|
||||
}
|
||||
|
||||
public Long getFileSize()
|
||||
{
|
||||
return fileSize;
|
||||
}
|
||||
|
||||
public void setMd5(String md5)
|
||||
{
|
||||
this.md5 = md5;
|
||||
}
|
||||
|
||||
public String getMd5()
|
||||
{
|
||||
return md5;
|
||||
}
|
||||
|
||||
public void setPath(String path)
|
||||
{
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public String getPath()
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("type", getType())
|
||||
.append("description", getDescription())
|
||||
.append("fileSize", getFileSize())
|
||||
.append("md5", getMd5())
|
||||
.append("path", getPath())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 客户端策略关联对象 rm_policy_device_details
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
public class RmPolicyDeviceDetails extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 客户端ID */
|
||||
@Excel(name = "客户端ID")
|
||||
private String clientId;
|
||||
|
||||
/** 策略ID */
|
||||
@Excel(name = "策略ID")
|
||||
private String policyId;
|
||||
|
||||
/** 脚本ID */
|
||||
@Excel(name = "脚本ID")
|
||||
private String scriptId;
|
||||
|
||||
/** 版本ID */
|
||||
@Excel(name = "版本ID")
|
||||
private String versionId;
|
||||
|
||||
/** 状态(0-未下发,1-已下发) */
|
||||
@Excel(name = "状态(0-未下发,1-已下发)")
|
||||
private String policyStatus;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setClientId(String clientId)
|
||||
{
|
||||
this.clientId = clientId;
|
||||
}
|
||||
|
||||
public String getClientId()
|
||||
{
|
||||
return clientId;
|
||||
}
|
||||
|
||||
public void setPolicyId(String policyId)
|
||||
{
|
||||
this.policyId = policyId;
|
||||
}
|
||||
|
||||
public String getPolicyId()
|
||||
{
|
||||
return policyId;
|
||||
}
|
||||
|
||||
public void setScriptId(String scriptId)
|
||||
{
|
||||
this.scriptId = scriptId;
|
||||
}
|
||||
|
||||
public String getScriptId()
|
||||
{
|
||||
return scriptId;
|
||||
}
|
||||
|
||||
public void setVersionId(String versionId)
|
||||
{
|
||||
this.versionId = versionId;
|
||||
}
|
||||
|
||||
public String getVersionId()
|
||||
{
|
||||
return versionId;
|
||||
}
|
||||
|
||||
public void setPolicyStatus(String policyStatus)
|
||||
{
|
||||
this.policyStatus = policyStatus;
|
||||
}
|
||||
|
||||
public String getPolicyStatus()
|
||||
{
|
||||
return policyStatus;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("clientId", getClientId())
|
||||
.append("policyId", getPolicyId())
|
||||
.append("scriptId", getScriptId())
|
||||
.append("versionId", getVersionId())
|
||||
.append("policyStatus", getPolicyStatus())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AgentUpdateMsgVo {
|
||||
/**文件地址,外网HTTP(S)地址 */
|
||||
private String fileUrl;
|
||||
/** 文件MD5 */
|
||||
private String fileMd5;
|
||||
/** 执行方式:0、立即执行;1、定时执行; */
|
||||
private Integer method;
|
||||
/** 定时时间,执行方式为1、定时执行时该字段必传 */
|
||||
private long policyTime;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@Data
|
||||
public class PolicyTypeVo {
|
||||
|
||||
/** 服务器监控策略信息 */
|
||||
private String monitors;
|
||||
/** 服务器脚本策略信息 */
|
||||
private String scripts;
|
||||
/** agent更新信息 */
|
||||
private String versions;
|
||||
/** 时间戳 */
|
||||
private Long timestamp = Instant.now().getEpochSecond();
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.ruoyi.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class PolicyVo<T> {
|
||||
/** 更新时间戳 */
|
||||
private Long upTime = Instant.now().getEpochSecond();
|
||||
/** 更新内容 */
|
||||
private List<T> contents;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.rocketmq.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ServerScriptPolicyVo {
|
||||
/** 策略名称 */
|
||||
private String policyName;
|
||||
/** 外网Http(s)地址 */
|
||||
private String fileUrl;
|
||||
/** 脚本参数 */
|
||||
private String commandParams;
|
||||
/** 执行方式 */
|
||||
private int method;
|
||||
/** 定时时间 精确到秒的时间戳 */
|
||||
private Long policyTime;
|
||||
}
|
||||
Reference in New Issue
Block a user