1.增加了 地域流量,配置日志,丢弃量接口

2.增加了一个时间处理的工具类
This commit is contained in:
lihaochen
2018-12-10 17:55:36 +08:00
parent feb178ef2a
commit 067bc29ceb
8 changed files with 949 additions and 0 deletions

View File

@@ -0,0 +1,107 @@
package com.nis.domain.restful;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.nis.util.JsonDateSerializer;
import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;
/**
* @description 配置日志TOP统计API
* @author dell
* @date 2018年12月5日11:22:21
*/
@ApiModel(value = "配置日志对象", description = "用来封装配置日志")
public class CfgLogInfo implements Serializable {
/**
*
*/
private static final long serialVersionUID = -6058402409885962868L;
@JsonInclude(value = Include.NON_NULL)
@ApiModelProperty(value = "业务码")
private String serviceCode;// 业务码
@JsonInclude(value = Include.NON_NULL)
@ApiModelProperty(value = "业务中文名称")
private String serviceNameZh;// 业务中文名称
@JsonInclude(value = Include.NON_NULL)
@ApiModelProperty(value = "业务英文名称")
private String serviceNameEn;// 业务英文名称
@JsonInclude(value = Include.NON_NULL)
@ApiModelProperty(value = "业务俄文名称")
private String serviceNameRu;// 业务俄文名称
@JsonInclude(value = Include.NON_NULL)
@ApiModelProperty(value = "日志量")
private long sum;// 日志量
@JsonInclude(value = Include.NON_NULL)
@ApiModelProperty(value = "统计时间")
private Date reportTime;// 五分钟统计时间
public String getServiceCode() {
return serviceCode;
}
public void setServiceCode(String serviceCode) {
this.serviceCode = serviceCode;
}
public String getServiceNameZh() {
return serviceNameZh;
}
public void setServiceNameZh(String serviceNameZh) {
this.serviceNameZh = serviceNameZh;
}
public String getServiceNameEn() {
return serviceNameEn;
}
public void setServiceNameEn(String serviceNameEn) {
this.serviceNameEn = serviceNameEn;
}
public String getServiceNameRu() {
return serviceNameRu;
}
public void setServiceNameRu(String serviceNameRu) {
this.serviceNameRu = serviceNameRu;
}
public long getSum() {
return sum;
}
public void setSum(long sum) {
this.sum = sum;
}
@JsonSerialize(using = JsonDateSerializer.class)
public Date getReportTime() {
return reportTime;
}
public void setReportTime(Date reportTime) {
this.reportTime = reportTime;
}
@Override
public String toString() {
return "CfgLogInfo [serviceCode=" + serviceCode + ", serviceNameZh=" + serviceNameZh + ", serviceNameEn="
+ serviceNameEn + ", serviceNameRu=" + serviceNameRu + ", sum=" + sum + ", reportTime=" + reportTime
+ "]";
}
}

View File

@@ -0,0 +1,69 @@
package com.nis.domain.restful;
import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.nis.util.JsonDateSerializer;
import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;
/**
* @description 丢弃量统计API
* @author dell
* @date 2018年12月5日11:22:21
*/
@ApiModel(value = "丢弃量对象", description = "用来封装丢弃量")
public class DropInfo implements Serializable {
/**
*
*/
private static final long serialVersionUID = -6058402409885962868L;
@JsonInclude(value = Include.NON_NULL)
@ApiModelProperty(value = "动作")
private String label;// 动作
@JsonInclude(value = Include.NON_NULL)
@ApiModelProperty(value = "接收字节数")
private long sum;// 接收字节数
@JsonInclude()
@ApiModelProperty(value = "统计时间")
private Date reportTime;// 五分钟统计时间
public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public long getSum() {
return sum;
}
public void setSum(long sum) {
this.sum = sum;
}
@JsonSerialize(using = JsonDateSerializer.class)
public Date getReportTime() {
return reportTime;
}
public void setReportTime(Date reportTime) {
this.reportTime = reportTime;
}
@Override
public String toString() {
return "DropInfo [label=" + label + ", sum=" + sum + ", reportTime=" + reportTime + "]";
}
}

View File

@@ -0,0 +1,84 @@
package com.nis.domain.restful;
import java.io.Serializable;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.DateTimeFormat.ISO;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.nis.util.JsonDateSerializer;
import com.wordnik.swagger.annotations.ApiModel;
import com.wordnik.swagger.annotations.ApiModelProperty;
/**
* @description 地域流量API
* @author dell
* @date 2018年12月5日11:01:13
*
*/
@ApiModel(value = "地域流量对象", description = "用来封装地域流量")
public class NtcAreaHomeReport implements Serializable {
/**
*
*/
private static final long serialVersionUID = -3597060253861898787L;
@JsonInclude(value = Include.NON_NULL)
@ApiModelProperty(value = "局点(出入口)")
private int entranceId;// 局点(出入口)
@JsonInclude(value = Include.NON_NULL)
@ApiModelProperty(value = "地域")
private String area;// 地域
@JsonInclude(value = Include.NON_NULL)
@ApiModelProperty(value = "接收字节数")
private long sum;// 接收字节数
@JsonInclude(value = Include.NON_NULL)
@ApiModelProperty(value = "统计时间")
private Date reportTime;// 统计时间
public int getEntranceId() {
return entranceId;
}
public void setEntranceId(int entranceId) {
this.entranceId = entranceId;
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
public long getSum() {
return sum;
}
public void setSum(long sum) {
this.sum = sum;
}
@JsonSerialize(using = JsonDateSerializer.class)
public Date getReportTime() {
return reportTime;
}
public void setReportTime(Date reportTime) {
this.reportTime = reportTime;
}
@Override
public String toString() {
return "NtcAreaHomeReport [entranceId=" + entranceId + ", area=" + area + ", sum=" + sum + ", reportTime="
+ reportTime + "]";
}
}