初始流量数据库读取mq入库
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class DeviceMessage {
|
||||
private String clientId;
|
||||
private String dataType;
|
||||
private String data;
|
||||
private LocalDateTime receiveTime = LocalDateTime.now();
|
||||
}
|
||||
+22
-131
@@ -1,177 +1,68 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
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;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 初始带宽流量对象 initial_bandwidth_traffic
|
||||
*
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-08-20
|
||||
*/
|
||||
@Data
|
||||
public class InitialBandwidthTraffic extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 唯一标识ID */
|
||||
private Long id;
|
||||
/** 表名 */
|
||||
private String tableName;
|
||||
|
||||
/** 接口名称 */
|
||||
@Excel(name = "接口名称")
|
||||
private String interfaceName;
|
||||
private String name;
|
||||
|
||||
/** MAC地址 */
|
||||
@Excel(name = "MAC地址")
|
||||
private String macAddress;
|
||||
private String mac;
|
||||
|
||||
/** 运行状态 */
|
||||
@Excel(name = "运行状态")
|
||||
private String operationStatus;
|
||||
private String status;
|
||||
|
||||
/** 接口类型 */
|
||||
@Excel(name = "接口类型")
|
||||
private String interfaceType;
|
||||
private String type;
|
||||
|
||||
/** IPv4地址 */
|
||||
@Excel(name = "IPv4地址")
|
||||
private String ipv4Address;
|
||||
private String ipV4;
|
||||
|
||||
/** 入站丢包率(%) */
|
||||
@Excel(name = "入站丢包率(%)")
|
||||
private BigDecimal inboundPacketLoss;
|
||||
private BigDecimal inDropped;
|
||||
|
||||
/** 出站丢包率(%) */
|
||||
@Excel(name = "出站丢包率(%)")
|
||||
private BigDecimal outboundPacketLoss;
|
||||
private BigDecimal outDropped;
|
||||
|
||||
/** 接收带宽(Mbps) */
|
||||
@Excel(name = "接收带宽(Mbps)")
|
||||
private BigDecimal receiveBandwidth;
|
||||
private String inSpeed;
|
||||
|
||||
/** 发送带宽(Mbps) */
|
||||
@Excel(name = "发送带宽(Mbps)")
|
||||
private BigDecimal sendBandwidth;
|
||||
private String outSpeed;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
/** 设备唯一标识 */
|
||||
@Excel(name = "设备唯一标识")
|
||||
private String clientId;
|
||||
/** 初始带宽流量集合 */
|
||||
private List<InitialBandwidthTraffic> list;
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setInterfaceName(String interfaceName)
|
||||
{
|
||||
this.interfaceName = interfaceName;
|
||||
}
|
||||
|
||||
public String getInterfaceName()
|
||||
{
|
||||
return interfaceName;
|
||||
}
|
||||
|
||||
public void setMacAddress(String macAddress)
|
||||
{
|
||||
this.macAddress = macAddress;
|
||||
}
|
||||
|
||||
public String getMacAddress()
|
||||
{
|
||||
return macAddress;
|
||||
}
|
||||
|
||||
public void setOperationStatus(String operationStatus)
|
||||
{
|
||||
this.operationStatus = operationStatus;
|
||||
}
|
||||
|
||||
public String getOperationStatus()
|
||||
{
|
||||
return operationStatus;
|
||||
}
|
||||
|
||||
public void setInterfaceType(String interfaceType)
|
||||
{
|
||||
this.interfaceType = interfaceType;
|
||||
}
|
||||
|
||||
public String getInterfaceType()
|
||||
{
|
||||
return interfaceType;
|
||||
}
|
||||
|
||||
public void setIpv4Address(String ipv4Address)
|
||||
{
|
||||
this.ipv4Address = ipv4Address;
|
||||
}
|
||||
|
||||
public String getIpv4Address()
|
||||
{
|
||||
return ipv4Address;
|
||||
}
|
||||
|
||||
public void setInboundPacketLoss(BigDecimal inboundPacketLoss)
|
||||
{
|
||||
this.inboundPacketLoss = inboundPacketLoss;
|
||||
}
|
||||
|
||||
public BigDecimal getInboundPacketLoss()
|
||||
{
|
||||
return inboundPacketLoss;
|
||||
}
|
||||
|
||||
public void setOutboundPacketLoss(BigDecimal outboundPacketLoss)
|
||||
{
|
||||
this.outboundPacketLoss = outboundPacketLoss;
|
||||
}
|
||||
|
||||
public BigDecimal getOutboundPacketLoss()
|
||||
{
|
||||
return outboundPacketLoss;
|
||||
}
|
||||
|
||||
public void setReceiveBandwidth(BigDecimal receiveBandwidth)
|
||||
{
|
||||
this.receiveBandwidth = receiveBandwidth;
|
||||
}
|
||||
|
||||
public BigDecimal getReceiveBandwidth()
|
||||
{
|
||||
return receiveBandwidth;
|
||||
}
|
||||
|
||||
public void setSendBandwidth(BigDecimal sendBandwidth)
|
||||
{
|
||||
this.sendBandwidth = sendBandwidth;
|
||||
}
|
||||
|
||||
public BigDecimal getSendBandwidth()
|
||||
{
|
||||
return sendBandwidth;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("interfaceName", getInterfaceName())
|
||||
.append("macAddress", getMacAddress())
|
||||
.append("operationStatus", getOperationStatus())
|
||||
.append("interfaceType", getInterfaceType())
|
||||
.append("ipv4Address", getIpv4Address())
|
||||
.append("inboundPacketLoss", getInboundPacketLoss())
|
||||
.append("outboundPacketLoss", getOutboundPacketLoss())
|
||||
.append("receiveBandwidth", getReceiveBandwidth())
|
||||
.append("sendBandwidth", getSendBandwidth())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class NetInterfaceInfo {
|
||||
private String name;
|
||||
private String type;
|
||||
private String status;
|
||||
private String ipV4;
|
||||
private String mac;
|
||||
private String inSpeed;
|
||||
private String outSpeed;
|
||||
private int inDropped;
|
||||
private int outDropped;
|
||||
public static List<NetInterfaceInfo> parseNetData(String jsonData) {
|
||||
return JSON.parseArray(jsonData, NetInterfaceInfo.class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user