修改nms上报的信息中date类型spring自动加8小时的问题
This commit is contained in:
@@ -5,6 +5,8 @@ import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.nis.util.JsonDateDeserializer;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
public class NmsDiRule implements Serializable {
|
||||
@@ -154,19 +156,19 @@ public class NmsDiRule implements Serializable {
|
||||
public void setDetectionSetInfoId(long detectionSetInfoId) {
|
||||
this.detectionSetInfoId = detectionSetInfoId;
|
||||
}
|
||||
|
||||
@JsonDeserialize(using = JsonDateDeserializer.class)
|
||||
public Date getDataCheckTime() {
|
||||
return dataCheckTime;
|
||||
}
|
||||
|
||||
@JsonDeserialize(using = JsonDateDeserializer.class)
|
||||
public void setDataCheckTime(Date dataCheckTime) {
|
||||
this.dataCheckTime = dataCheckTime;
|
||||
}
|
||||
|
||||
@JsonDeserialize(using = JsonDateDeserializer.class)
|
||||
public Date getDataArriveTime() {
|
||||
return dataArriveTime;
|
||||
}
|
||||
|
||||
@JsonDeserialize(using = JsonDateDeserializer.class)
|
||||
public void setDataArriveTime(Date dataArriveTime) {
|
||||
this.dataArriveTime = dataArriveTime;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.nis.util.JsonDateDeserializer;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
public class TrafficNetflowPortInfo implements Serializable {
|
||||
@@ -26,81 +28,109 @@ public class TrafficNetflowPortInfo implements Serializable {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "dataArriveTime", notes = "")
|
||||
private Date recvTime;
|
||||
|
||||
public long getStat_id() {
|
||||
return stat_id;
|
||||
}
|
||||
|
||||
public void setStat_id(long stat_id) {
|
||||
this.stat_id = stat_id;
|
||||
}
|
||||
|
||||
public long getPort() {
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPort(long port) {
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
public String getNodeName() {
|
||||
return nodeName;
|
||||
}
|
||||
|
||||
public void setNodeName(String nodeName) {
|
||||
this.nodeName = nodeName;
|
||||
}
|
||||
|
||||
public String getNodeIp() {
|
||||
return nodeIp;
|
||||
}
|
||||
|
||||
public void setNodeIp(String nodeIp) {
|
||||
this.nodeIp = nodeIp;
|
||||
}
|
||||
|
||||
public String getPortDesc() {
|
||||
return portDesc;
|
||||
}
|
||||
|
||||
public void setPortDesc(String portDesc) {
|
||||
this.portDesc = portDesc;
|
||||
}
|
||||
|
||||
public long getBandwidth() {
|
||||
return bandwidth;
|
||||
}
|
||||
|
||||
public void setBandwidth(long bandwidth) {
|
||||
this.bandwidth = bandwidth;
|
||||
}
|
||||
|
||||
public long getInoctets() {
|
||||
return inoctets;
|
||||
}
|
||||
|
||||
public void setInoctets(long inoctets) {
|
||||
this.inoctets = inoctets;
|
||||
}
|
||||
|
||||
public long getOutoctets() {
|
||||
return outoctets;
|
||||
}
|
||||
|
||||
public void setOutoctets(long outoctets) {
|
||||
this.outoctets = outoctets;
|
||||
}
|
||||
|
||||
public long getInoctetsSpeed() {
|
||||
return inoctetsSpeed;
|
||||
}
|
||||
|
||||
public void setInoctetsSpeed(long inoctetsSpeed) {
|
||||
this.inoctetsSpeed = inoctetsSpeed;
|
||||
}
|
||||
|
||||
public long getOutoctetsSpeed() {
|
||||
return outoctetsSpeed;
|
||||
}
|
||||
|
||||
public void setOutoctetsSpeed(long outoctetsSpeed) {
|
||||
this.outoctetsSpeed = outoctetsSpeed;
|
||||
}
|
||||
|
||||
public long getInpktsSpeed() {
|
||||
return inpktsSpeed;
|
||||
}
|
||||
|
||||
public void setInpktsSpeed(long inpktsSpeed) {
|
||||
this.inpktsSpeed = inpktsSpeed;
|
||||
}
|
||||
|
||||
public long getOutpktsSpeed() {
|
||||
return outpktsSpeed;
|
||||
}
|
||||
|
||||
public void setOutpktsSpeed(long outpktsSpeed) {
|
||||
this.outpktsSpeed = outpktsSpeed;
|
||||
}
|
||||
|
||||
@JsonDeserialize(using = JsonDateDeserializer.class)
|
||||
public Date getRecvTime() {
|
||||
return recvTime;
|
||||
}
|
||||
|
||||
@JsonDeserialize(using = JsonDateDeserializer.class)
|
||||
public void setRecvTime(Date recvTime) {
|
||||
this.recvTime = recvTime;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import com.nis.util.JsonDateDeserializer;
|
||||
import com.wordnik.swagger.annotations.ApiModel;
|
||||
import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
@@ -36,11 +38,11 @@ public class TrafficNmsServerStatistic implements Serializable {
|
||||
private Integer abnormal;//
|
||||
@ApiModelProperty(value = "abnormalMachineList", notes = "异常主机列表")
|
||||
private List<AbnormalMachine> abnormalMachineList;
|
||||
|
||||
@JsonDeserialize(using = JsonDateDeserializer.class)
|
||||
public Date getCommitTime() {
|
||||
return commitTime;
|
||||
}
|
||||
|
||||
@JsonDeserialize(using = JsonDateDeserializer.class)
|
||||
public void setCommitTime(Date commitTime) {
|
||||
this.commitTime = commitTime;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ public class NmsInfoController extends BaseRestController {
|
||||
Constants.IS_DEBUG ? nmsDiRuleList : null);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/nms/v1/rafficNetflowPortInfo", method = RequestMethod.POST)
|
||||
@RequestMapping(value = "/nms/v1/trafficNetflowPortInfo", method = RequestMethod.POST)
|
||||
@ApiOperation(value = "存储trafficNetflowPortInfo接口", httpMethod = "POST", response = Map.class, notes = "接收NMS系统上报的trafficNetflowPort信息")
|
||||
@ApiParam(value = "存储trafficNetflowPortInfo接口", name = "saveTrafficNetflowPortInfo", required = true)
|
||||
public Map<String, Object> saveTrafficNetflowPortInfo(
|
||||
|
||||
@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.nis.domain.LogEntity;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.restful.DkBehaviorLog;
|
||||
import com.nis.domain.restful.NtcAppLog;
|
||||
import com.nis.domain.restful.NtcBgpLog;
|
||||
import com.nis.domain.restful.NtcDdosLog;
|
||||
|
||||
Reference in New Issue
Block a user