修改流量统计sql更改字段类型与数据库统一
This commit is contained in:
@@ -9,13 +9,13 @@ public class TrafficAppStatistic {
|
|||||||
|
|
||||||
private Integer entranceId;
|
private Integer entranceId;
|
||||||
|
|
||||||
private Integer c2sPktNum;
|
private Long c2sPktNum;
|
||||||
|
|
||||||
private Integer s2cPktNum;
|
private Long s2cPktNum;
|
||||||
|
|
||||||
private Integer c2sByteLen;
|
private Long c2sByteLen;
|
||||||
|
|
||||||
private Integer s2cByteLen;
|
private Long s2cByteLen;
|
||||||
|
|
||||||
private Date statTime;
|
private Date statTime;
|
||||||
|
|
||||||
@@ -43,39 +43,39 @@ public class TrafficAppStatistic {
|
|||||||
this.entranceId = entranceId;
|
this.entranceId = entranceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getC2sPktNum() {
|
public Long getC2sPktNum() {
|
||||||
return c2sPktNum;
|
return c2sPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setC2sPktNum(Integer c2sPktNum) {
|
public void setC2sPktNum(Long c2sPktNum) {
|
||||||
this.c2sPktNum = c2sPktNum;
|
this.c2sPktNum = c2sPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getS2cPktNum() {
|
public Long getS2cPktNum() {
|
||||||
return s2cPktNum;
|
return s2cPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setS2cPktNum(Integer s2cPktNum) {
|
public void setS2cPktNum(Long s2cPktNum) {
|
||||||
this.s2cPktNum = s2cPktNum;
|
this.s2cPktNum = s2cPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getC2sByteLen() {
|
public Long getC2sByteLen() {
|
||||||
return c2sByteLen;
|
return c2sByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setC2sByteLen(Integer c2sByteLen) {
|
public void setC2sByteLen(Long c2sByteLen) {
|
||||||
this.c2sByteLen = c2sByteLen;
|
this.c2sByteLen = c2sByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getS2cByteLen() {
|
public Long getS2cByteLen() {
|
||||||
return s2cByteLen;
|
return s2cByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setS2cByteLen(Integer s2cByteLen) {
|
public void setS2cByteLen(Long s2cByteLen) {
|
||||||
this.s2cByteLen = s2cByteLen;
|
this.s2cByteLen = s2cByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getStatTime() {
|
public Date getStatTime() {
|
||||||
return statTime;
|
return statTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,20 +9,20 @@ public class TrafficHttpStatistic {
|
|||||||
|
|
||||||
private Integer webId;
|
private Integer webId;
|
||||||
|
|
||||||
private Integer c2sPktNum;
|
private Long c2sPktNum;
|
||||||
|
|
||||||
private Integer s2cPktNum;
|
private Long s2cPktNum;
|
||||||
|
|
||||||
private Integer c2sByteLen;
|
private Long c2sByteLen;
|
||||||
|
|
||||||
private Integer s2cByteLen;
|
private Long s2cByteLen;
|
||||||
|
|
||||||
private Date statTime;
|
private Date statTime;
|
||||||
|
|
||||||
// 自定义字段
|
// 自定义字段
|
||||||
private Integer count;
|
private Long count;
|
||||||
private Integer pktNum;
|
private Long pktNum;
|
||||||
private Integer byteLen;
|
private Long byteLen;
|
||||||
private Integer websiteServiceId;//网站id
|
private Integer websiteServiceId;//网站id
|
||||||
|
|
||||||
|
|
||||||
@@ -34,29 +34,6 @@ public class TrafficHttpStatistic {
|
|||||||
this.websiteServiceId = websiteServiceId;
|
this.websiteServiceId = websiteServiceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getCount() {
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCount(Integer count) {
|
|
||||||
this.count = count;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPktNum() {
|
|
||||||
return pktNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPktNum(Integer pktNum) {
|
|
||||||
this.pktNum = pktNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getByteLen() {
|
|
||||||
return byteLen;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setByteLen(Integer byteLen) {
|
|
||||||
this.byteLen = byteLen;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getStatId() {
|
public Integer getStatId() {
|
||||||
return statId;
|
return statId;
|
||||||
@@ -82,39 +59,67 @@ public class TrafficHttpStatistic {
|
|||||||
this.webId = webId;
|
this.webId = webId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getC2sPktNum() {
|
public Long getC2sPktNum() {
|
||||||
return c2sPktNum;
|
return c2sPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setC2sPktNum(Integer c2sPktNum) {
|
public void setC2sPktNum(Long c2sPktNum) {
|
||||||
this.c2sPktNum = c2sPktNum;
|
this.c2sPktNum = c2sPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getS2cPktNum() {
|
public Long getS2cPktNum() {
|
||||||
return s2cPktNum;
|
return s2cPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setS2cPktNum(Integer s2cPktNum) {
|
public void setS2cPktNum(Long s2cPktNum) {
|
||||||
this.s2cPktNum = s2cPktNum;
|
this.s2cPktNum = s2cPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getC2sByteLen() {
|
public Long getC2sByteLen() {
|
||||||
return c2sByteLen;
|
return c2sByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setC2sByteLen(Integer c2sByteLen) {
|
public void setC2sByteLen(Long c2sByteLen) {
|
||||||
this.c2sByteLen = c2sByteLen;
|
this.c2sByteLen = c2sByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getS2cByteLen() {
|
public Long getS2cByteLen() {
|
||||||
return s2cByteLen;
|
return s2cByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setS2cByteLen(Integer s2cByteLen) {
|
public void setS2cByteLen(Long s2cByteLen) {
|
||||||
this.s2cByteLen = s2cByteLen;
|
this.s2cByteLen = s2cByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getStatTime() {
|
public Long getCount() {
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCount(Long count) {
|
||||||
|
this.count = count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getPktNum() {
|
||||||
|
return pktNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPktNum(Long pktNum) {
|
||||||
|
this.pktNum = pktNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getByteLen() {
|
||||||
|
return byteLen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setByteLen(Long byteLen) {
|
||||||
|
this.byteLen = byteLen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getWebsiteServiceId() {
|
||||||
|
return websiteServiceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getStatTime() {
|
||||||
return statTime;
|
return statTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,15 +16,15 @@ public class TrafficIpActiveStatistic extends BaseEntity<TrafficIpActiveStatisti
|
|||||||
|
|
||||||
private Integer areaId;
|
private Integer areaId;
|
||||||
|
|
||||||
private Integer linkNum;
|
private Long linkNum;
|
||||||
|
|
||||||
private Integer c2sPktNum;
|
private Long c2sPktNum;
|
||||||
|
|
||||||
private Integer s2cPktNum;
|
private Long s2cPktNum;
|
||||||
|
|
||||||
private Integer c2sByteLen;
|
private Long c2sByteLen;
|
||||||
|
|
||||||
private Integer s2cByteLen;
|
private Long s2cByteLen;
|
||||||
|
|
||||||
private Date statTime;
|
private Date statTime;
|
||||||
|
|
||||||
@@ -52,47 +52,47 @@ public class TrafficIpActiveStatistic extends BaseEntity<TrafficIpActiveStatisti
|
|||||||
this.areaId = areaId;
|
this.areaId = areaId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getLinkNum() {
|
public Long getLinkNum() {
|
||||||
return linkNum;
|
return linkNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLinkNum(Integer linkNum) {
|
public void setLinkNum(Long linkNum) {
|
||||||
this.linkNum = linkNum;
|
this.linkNum = linkNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getC2sPktNum() {
|
public Long getC2sPktNum() {
|
||||||
return c2sPktNum;
|
return c2sPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setC2sPktNum(Integer c2sPktNum) {
|
public void setC2sPktNum(Long c2sPktNum) {
|
||||||
this.c2sPktNum = c2sPktNum;
|
this.c2sPktNum = c2sPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getS2cPktNum() {
|
public Long getS2cPktNum() {
|
||||||
return s2cPktNum;
|
return s2cPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setS2cPktNum(Integer s2cPktNum) {
|
public void setS2cPktNum(Long s2cPktNum) {
|
||||||
this.s2cPktNum = s2cPktNum;
|
this.s2cPktNum = s2cPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getC2sByteLen() {
|
public Long getC2sByteLen() {
|
||||||
return c2sByteLen;
|
return c2sByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setC2sByteLen(Integer c2sByteLen) {
|
public void setC2sByteLen(Long c2sByteLen) {
|
||||||
this.c2sByteLen = c2sByteLen;
|
this.c2sByteLen = c2sByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getS2cByteLen() {
|
public Long getS2cByteLen() {
|
||||||
return s2cByteLen;
|
return s2cByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setS2cByteLen(Integer s2cByteLen) {
|
public void setS2cByteLen(Long s2cByteLen) {
|
||||||
this.s2cByteLen = s2cByteLen;
|
this.s2cByteLen = s2cByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getStatTime() {
|
public Date getStatTime() {
|
||||||
return statTime;
|
return statTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ public class TrafficPortActiveStatistic {
|
|||||||
//流量统计之活跃端口统计
|
//流量统计之活跃端口统计
|
||||||
private Integer statId;
|
private Integer statId;
|
||||||
private Integer port;
|
private Integer port;
|
||||||
private Integer sum;
|
private Long sum;
|
||||||
private Date statTime;
|
private Date statTime;
|
||||||
|
|
||||||
public Integer getStatId() {
|
public Integer getStatId() {
|
||||||
@@ -21,10 +21,10 @@ public class TrafficPortActiveStatistic {
|
|||||||
public void setPort(Integer port) {
|
public void setPort(Integer port) {
|
||||||
this.port = port;
|
this.port = port;
|
||||||
}
|
}
|
||||||
public Integer getSum() {
|
public Long getSum() {
|
||||||
return sum;
|
return sum;
|
||||||
}
|
}
|
||||||
public void setSum(Integer sum) {
|
public void setSum(Long sum) {
|
||||||
this.sum = sum;
|
this.sum = sum;
|
||||||
}
|
}
|
||||||
public Date getStatTime() {
|
public Date getStatTime() {
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ public class TrafficProtocolStatistic {
|
|||||||
|
|
||||||
private Integer entranceId;
|
private Integer entranceId;
|
||||||
|
|
||||||
private Integer c2sPktNum;
|
private Long c2sPktNum;
|
||||||
|
|
||||||
private Integer s2cPktNum;
|
private Long s2cPktNum;
|
||||||
|
|
||||||
private Integer c2sByteLen;
|
private Long c2sByteLen;
|
||||||
|
|
||||||
private Integer s2cByteLen;
|
private Long s2cByteLen;
|
||||||
|
|
||||||
private Date statTime;
|
private Date statTime;
|
||||||
|
|
||||||
@@ -43,35 +43,35 @@ public class TrafficProtocolStatistic {
|
|||||||
this.entranceId = entranceId;
|
this.entranceId = entranceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getC2sPktNum() {
|
public Long getC2sPktNum() {
|
||||||
return c2sPktNum;
|
return c2sPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setC2sPktNum(Integer c2sPktNum) {
|
public void setC2sPktNum(Long c2sPktNum) {
|
||||||
this.c2sPktNum = c2sPktNum;
|
this.c2sPktNum = c2sPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getS2cPktNum() {
|
public Long getS2cPktNum() {
|
||||||
return s2cPktNum;
|
return s2cPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setS2cPktNum(Integer s2cPktNum) {
|
public void setS2cPktNum(Long s2cPktNum) {
|
||||||
this.s2cPktNum = s2cPktNum;
|
this.s2cPktNum = s2cPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getC2sByteLen() {
|
public Long getC2sByteLen() {
|
||||||
return c2sByteLen;
|
return c2sByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setC2sByteLen(Integer c2sByteLen) {
|
public void setC2sByteLen(Long c2sByteLen) {
|
||||||
this.c2sByteLen = c2sByteLen;
|
this.c2sByteLen = c2sByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getS2cByteLen() {
|
public Long getS2cByteLen() {
|
||||||
return s2cByteLen;
|
return s2cByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setS2cByteLen(Integer s2cByteLen) {
|
public void setS2cByteLen(Long s2cByteLen) {
|
||||||
this.s2cByteLen = s2cByteLen;
|
this.s2cByteLen = s2cByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,44 +10,21 @@ public class TrafficUaStatistic {
|
|||||||
|
|
||||||
private Integer entranceId;
|
private Integer entranceId;
|
||||||
|
|
||||||
private Integer c2sPktNum;
|
private Long c2sPktNum;
|
||||||
|
|
||||||
private Integer s2cPktNum;
|
private Long s2cPktNum;
|
||||||
|
|
||||||
private Integer c2sByteLen;
|
private Long c2sByteLen;
|
||||||
|
|
||||||
private Integer s2cByteLen;
|
private Long s2cByteLen;
|
||||||
|
|
||||||
private Date statTime;
|
private Date statTime;
|
||||||
|
|
||||||
// 自定义字段
|
// 自定义字段
|
||||||
private Integer count;
|
private Long count;
|
||||||
private Integer pktNum;
|
private Long pktNum;
|
||||||
private Integer byteLen;
|
private Long byteLen;
|
||||||
|
|
||||||
public Integer getCount() {
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setCount(Integer count) {
|
|
||||||
this.count = count;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getPktNum() {
|
|
||||||
return pktNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPktNum(Integer pktNum) {
|
|
||||||
this.pktNum = pktNum;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getByteLen() {
|
|
||||||
return byteLen;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setByteLen(Integer byteLen) {
|
|
||||||
this.byteLen = byteLen;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Integer getOsType() {
|
public Integer getOsType() {
|
||||||
return osType;
|
return osType;
|
||||||
@@ -81,39 +58,63 @@ public class TrafficUaStatistic {
|
|||||||
this.entranceId = entranceId;
|
this.entranceId = entranceId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getC2sPktNum() {
|
public Long getC2sPktNum() {
|
||||||
return c2sPktNum;
|
return c2sPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setC2sPktNum(Integer c2sPktNum) {
|
public void setC2sPktNum(Long c2sPktNum) {
|
||||||
this.c2sPktNum = c2sPktNum;
|
this.c2sPktNum = c2sPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getS2cPktNum() {
|
public Long getS2cPktNum() {
|
||||||
return s2cPktNum;
|
return s2cPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setS2cPktNum(Integer s2cPktNum) {
|
public void setS2cPktNum(Long s2cPktNum) {
|
||||||
this.s2cPktNum = s2cPktNum;
|
this.s2cPktNum = s2cPktNum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getC2sByteLen() {
|
public Long getC2sByteLen() {
|
||||||
return c2sByteLen;
|
return c2sByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setC2sByteLen(Integer c2sByteLen) {
|
public void setC2sByteLen(Long c2sByteLen) {
|
||||||
this.c2sByteLen = c2sByteLen;
|
this.c2sByteLen = c2sByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getS2cByteLen() {
|
public Long getS2cByteLen() {
|
||||||
return s2cByteLen;
|
return s2cByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setS2cByteLen(Integer s2cByteLen) {
|
public void setS2cByteLen(Long s2cByteLen) {
|
||||||
this.s2cByteLen = s2cByteLen;
|
this.s2cByteLen = s2cByteLen;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getStatTime() {
|
public Long getCount() {
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCount(Long count) {
|
||||||
|
this.count = count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getPktNum() {
|
||||||
|
return pktNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPktNum(Long pktNum) {
|
||||||
|
this.pktNum = pktNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getByteLen() {
|
||||||
|
return byteLen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setByteLen(Long byteLen) {
|
||||||
|
this.byteLen = byteLen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getStatTime() {
|
||||||
return statTime;
|
return statTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
<id column="stat_id" jdbcType="INTEGER" property="statId" />
|
<id column="stat_id" jdbcType="INTEGER" property="statId" />
|
||||||
<result column="app_type" jdbcType="INTEGER" property="appType" />
|
<result column="app_type" jdbcType="INTEGER" property="appType" />
|
||||||
<result column="entrance_id" jdbcType="INTEGER" property="entranceId" />
|
<result column="entrance_id" jdbcType="INTEGER" property="entranceId" />
|
||||||
<result column="c2s_pkt_num" jdbcType="INTEGER" property="c2sPktNum" />
|
<result column="c2s_pkt_num" jdbcType="BIGINT" property="c2sPktNum" />
|
||||||
<result column="s2c_pkt_num" jdbcType="INTEGER" property="s2cPktNum" />
|
<result column="s2c_pkt_num" jdbcType="BIGINT" property="s2cPktNum" />
|
||||||
<result column="c2s_byte_len" jdbcType="INTEGER" property="c2sByteLen" />
|
<result column="c2s_byte_len" jdbcType="BIGINT" property="c2sByteLen" />
|
||||||
<result column="s2c_byte_len" jdbcType="INTEGER" property="s2cByteLen" />
|
<result column="s2c_byte_len" jdbcType="BIGINT" property="s2cByteLen" />
|
||||||
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<select id="appChart" resultType="java.util.HashMap">
|
<select id="appChart" resultType="java.util.HashMap">
|
||||||
SELECT app_type appType, (SUM(c2s_pkt_num)+SUM(s2c_pkt_num)+SUM(c2s_byte_len)+SUM(s2c_byte_len)) count ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
|
SELECT app_type appType, (SUM(c2s_pkt_num)+SUM(s2c_pkt_num)+SUM(c2s_byte_len)+SUM(s2c_byte_len)) count ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
|
||||||
FROM galaxy.traffic_app_statistic
|
FROM galaxy.traffic_app_statistic
|
||||||
WHERE app_type !=0 and stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_app_statistic),INTERVAL 5 MINUTE)
|
WHERE app_type !=0 and stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_app_statistic WHERE app_type != 0),INTERVAL 5 MINUTE)
|
||||||
GROUP BY app_type order by count desc limit 0,10
|
GROUP BY app_type order by count desc limit 0,10
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -5,10 +5,10 @@
|
|||||||
<id column="stat_id" jdbcType="INTEGER" property="statId" />
|
<id column="stat_id" jdbcType="INTEGER" property="statId" />
|
||||||
<result column="link_num" jdbcType="INTEGER" property="linkNum" />
|
<result column="link_num" jdbcType="INTEGER" property="linkNum" />
|
||||||
<result column="web_id" jdbcType="INTEGER" property="webId" />
|
<result column="web_id" jdbcType="INTEGER" property="webId" />
|
||||||
<result column="c2s_pkt_num" jdbcType="INTEGER" property="c2sPktNum" />
|
<result column="c2s_pkt_num" jdbcType="BIGINT" property="c2sPktNum" />
|
||||||
<result column="s2c_pkt_num" jdbcType="INTEGER" property="s2cPktNum" />
|
<result column="s2c_pkt_num" jdbcType="BIGINT" property="s2cPktNum" />
|
||||||
<result column="c2s_byte_len" jdbcType="INTEGER" property="c2sByteLen" />
|
<result column="c2s_byte_len" jdbcType="BIGINT" property="c2sByteLen" />
|
||||||
<result column="s2c_byte_len" jdbcType="INTEGER" property="s2cByteLen" />
|
<result column="s2c_byte_len" jdbcType="BIGINT" property="s2cByteLen" />
|
||||||
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
SELECT SUM(link_num) count, IFNULL( website_service_id, 268435455 ) websiteServiceId ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
|
SELECT SUM(link_num) count, IFNULL( website_service_id, 268435455 ) websiteServiceId ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
|
||||||
FROM galaxy.TRAFFIC_HTTP_STATISTIC t
|
FROM galaxy.TRAFFIC_HTTP_STATISTIC t
|
||||||
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id = u.id
|
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id = u.id
|
||||||
and t.web_id!=0
|
and t.web_id!=0
|
||||||
and t.stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic WHERE web_id != 0),INTERVAL 5 MINUTE)
|
and t.stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic WHERE web_id != 0),INTERVAL 5 MINUTE)
|
||||||
GROUP BY u.website_service_id ORDER BY count limit 0,10
|
GROUP BY u.website_service_id ORDER BY count limit 0,10
|
||||||
</select>
|
</select>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<select id="getDomainByTopicList" resultType="java.util.HashMap">
|
<select id="getDomainByTopicList" resultType="java.util.HashMap">
|
||||||
SELECT SUM(link_num) count, IFNULL( topic_id, 268435455 ) topicId ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
|
SELECT SUM(link_num) count, IFNULL( topic_id, 268435455 ) topicId ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
|
||||||
FROM galaxy.TRAFFIC_HTTP_STATISTIC t
|
FROM galaxy.TRAFFIC_HTTP_STATISTIC t
|
||||||
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id = u.id
|
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id = u.id
|
||||||
and t.web_id!=0
|
and t.web_id!=0
|
||||||
and t.stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic WHERE web_id != 0),INTERVAL 5 MINUTE)
|
and t.stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic WHERE web_id != 0),INTERVAL 5 MINUTE)
|
||||||
GROUP BY u.topic_id ORDER BY count limit 0,10
|
GROUP BY u.topic_id ORDER BY count limit 0,10
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
<!--获取上个时间段该网站站域名流量的数据量 -->
|
<!--获取上个时间段该网站站域名流量的数据量 -->
|
||||||
<select id="preWebsiteListCount" resultType="java.lang.Integer">
|
<select id="preWebsiteListCount" resultType="java.lang.Integer">
|
||||||
SELECT SUM(link_num) count FROM galaxy.traffic_http_statistic t
|
SELECT SUM(link_num) count FROM galaxy.traffic_http_statistic t
|
||||||
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id = u.id
|
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id = u.id
|
||||||
WHERE u.website_service_id=#{websiteServiceId}
|
WHERE u.website_service_id=#{websiteServiceId}
|
||||||
and stat_time between DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic WHERE web_id != 0),INTERVAL 10 MINUTE) and DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic),INTERVAL 5 MINUTE)
|
and stat_time between DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic WHERE web_id != 0),INTERVAL 10 MINUTE) and DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic),INTERVAL 5 MINUTE)
|
||||||
</select>
|
</select>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
<select id="getDomainByWebsiteServiceId" parameterType="java.lang.Integer" resultType="java.util.HashMap">
|
<select id="getDomainByWebsiteServiceId" parameterType="java.lang.Integer" resultType="java.util.HashMap">
|
||||||
SELECT web_id webId,SUM(link_num) count,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
|
SELECT web_id webId,SUM(link_num) count,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
|
||||||
FROM galaxy.traffic_http_statistic t
|
FROM galaxy.traffic_http_statistic t
|
||||||
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id=u.id
|
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id=u.id
|
||||||
where u.website_service_id=#{websiteServiceId}
|
where u.website_service_id=#{websiteServiceId}
|
||||||
and t.stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic WHERE web_id != 0),INTERVAL 5 MINUTE)
|
and t.stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic WHERE web_id != 0),INTERVAL 5 MINUTE)
|
||||||
GROUP BY t.web_id ORDER BY count limit 0,10
|
GROUP BY t.web_id ORDER BY count limit 0,10
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
<select id="getDomainByTopicId" resultType="java.util.HashMap">
|
<select id="getDomainByTopicId" resultType="java.util.HashMap">
|
||||||
SELECT web_id webId,SUM(link_num) count,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
|
SELECT web_id webId,SUM(link_num) count,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
|
||||||
FROM galaxy.traffic_http_statistic t
|
FROM galaxy.traffic_http_statistic t
|
||||||
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id=u.id
|
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id=u.id
|
||||||
where u.topic_id=#{topicId}
|
where u.topic_id=#{topicId}
|
||||||
and t.stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic WHERE web_id != 0),INTERVAL 5 MINUTE)
|
and t.stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic WHERE web_id != 0),INTERVAL 5 MINUTE)
|
||||||
GROUP BY t.web_id ORDER BY count limit 0,10
|
GROUP BY t.web_id ORDER BY count limit 0,10
|
||||||
@@ -77,6 +77,6 @@
|
|||||||
and t.web_id not in
|
and t.web_id not in
|
||||||
<foreach collection="webIdList" item="singleType" index="index" open="(" close=")" separator=",">
|
<foreach collection="webIdList" item="singleType" index="index" open="(" close=")" separator=",">
|
||||||
#{singleType}
|
#{singleType}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
and stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic WHERE web_id != 0),INTERVAL 5 MINUTE)
|
and stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic WHERE web_id != 0),INTERVAL 5 MINUTE)
|
||||||
@@ -5,11 +5,11 @@
|
|||||||
<id column="stat_id" jdbcType="INTEGER" property="statId" />
|
<id column="stat_id" jdbcType="INTEGER" property="statId" />
|
||||||
<result column="ip_addr" jdbcType="VARCHAR" property="ipAddr" />
|
<result column="ip_addr" jdbcType="VARCHAR" property="ipAddr" />
|
||||||
<result column="area_id" jdbcType="INTEGER" property="areaId" />
|
<result column="area_id" jdbcType="INTEGER" property="areaId" />
|
||||||
<result column="link_num" jdbcType="INTEGER" property="linkNum" />
|
<result column="link_num" jdbcType="BIGINT" property="linkNum" />
|
||||||
<result column="c2s_pkt_num" jdbcType="INTEGER" property="c2sPktNum" />
|
<result column="c2s_pkt_num" jdbcType="BIGINT" property="c2sPktNum" />
|
||||||
<result column="s2c_pkt_num" jdbcType="INTEGER" property="s2cPktNum" />
|
<result column="s2c_pkt_num" jdbcType="BIGINT" property="s2cPktNum" />
|
||||||
<result column="c2s_byte_len" jdbcType="INTEGER" property="c2sByteLen" />
|
<result column="c2s_byte_len" jdbcType="BIGINT" property="c2sByteLen" />
|
||||||
<result column="s2c_byte_len" jdbcType="INTEGER" property="s2cByteLen" />
|
<result column="s2c_byte_len" jdbcType="BIGINT" property="s2cByteLen" />
|
||||||
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
|
|||||||
@@ -4,13 +4,12 @@
|
|||||||
<resultMap id="BaseResultMap" type="com.nis.domain.restful.dashboard.TrafficPortActiveStatistic">
|
<resultMap id="BaseResultMap" type="com.nis.domain.restful.dashboard.TrafficPortActiveStatistic">
|
||||||
<id column="stat_id" jdbcType="INTEGER" property="statId" />
|
<id column="stat_id" jdbcType="INTEGER" property="statId" />
|
||||||
<result column="port" jdbcType="INTEGER" property="port" />
|
<result column="port" jdbcType="INTEGER" property="port" />
|
||||||
<result column="sum" jdbcType="INTEGER" property="sum" />
|
<result column="sum" jdbcType="BIGINT" property="sum" />
|
||||||
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="getPortActiveList" resultMap="BaseResultMap">
|
<select id="getPortActiveList" resultMap="BaseResultMap">
|
||||||
SELECT port ,SUM(sum) sum from galaxy.traffic_port_active_statistic
|
SELECT port ,SUM(sum) sum from galaxy.traffic_port_active_statistic
|
||||||
|
|
||||||
WHERE stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_port_active_statistic),INTERVAL 5 MINUTE)
|
WHERE stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_port_active_statistic),INTERVAL 5 MINUTE)
|
||||||
GROUP BY port order by sum limit 0,10
|
GROUP BY port order by sum limit 0,10
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -5,10 +5,10 @@
|
|||||||
<id column="stat_id" jdbcType="INTEGER" property="statId" />
|
<id column="stat_id" jdbcType="INTEGER" property="statId" />
|
||||||
<result column="proto_type" jdbcType="INTEGER" property="protoType" />
|
<result column="proto_type" jdbcType="INTEGER" property="protoType" />
|
||||||
<result column="entrance_id" jdbcType="INTEGER" property="entranceId" />
|
<result column="entrance_id" jdbcType="INTEGER" property="entranceId" />
|
||||||
<result column="c2s_pkt_num" jdbcType="INTEGER" property="c2sPktNum" />
|
<result column="c2s_pkt_num" jdbcType="BIGINT" property="c2sPktNum" />
|
||||||
<result column="s2c_pkt_num" jdbcType="INTEGER" property="s2cPktNum" />
|
<result column="s2c_pkt_num" jdbcType="BIGINT" property="s2cPktNum" />
|
||||||
<result column="c2s_byte_len" jdbcType="INTEGER" property="c2sByteLen" />
|
<result column="c2s_byte_len" jdbcType="BIGINT" property="c2sByteLen" />
|
||||||
<result column="s2c_byte_len" jdbcType="INTEGER" property="s2cByteLen" />
|
<result column="s2c_byte_len" jdbcType="BIGINT" property="s2cByteLen" />
|
||||||
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
@@ -17,6 +17,6 @@
|
|||||||
</sql>
|
</sql>
|
||||||
<select id="protocolChart" resultType="java.util.HashMap">
|
<select id="protocolChart" resultType="java.util.HashMap">
|
||||||
SELECT proto_type protoType, SUM(link_num) count, ( SUM(c2s_pkt_num) + SUM(s2c_pkt_num)) pktNum, ( SUM(c2s_byte_len) + SUM(s2c_byte_len)) byteLen FROM galaxy.traffic_protocol_statistic WHERE proto_type != 0
|
SELECT proto_type protoType, SUM(link_num) count, ( SUM(c2s_pkt_num) + SUM(s2c_pkt_num)) pktNum, ( SUM(c2s_byte_len) + SUM(s2c_byte_len)) byteLen FROM galaxy.traffic_protocol_statistic WHERE proto_type != 0
|
||||||
AND stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_protocol_statistic), INTERVAL 5 MINUTE) GROUP BY proto_type ORDER BY count DESC LIMIT 0, 10
|
AND stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_protocol_statistic WHERE proto_type != 0), INTERVAL 5 MINUTE) GROUP BY proto_type ORDER BY count DESC LIMIT 0, 10
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -6,10 +6,10 @@
|
|||||||
<result column="bs_type" jdbcType="INTEGER" property="bsType" />
|
<result column="bs_type" jdbcType="INTEGER" property="bsType" />
|
||||||
<result column="os_type" jdbcType="INTEGER" property="osType" />
|
<result column="os_type" jdbcType="INTEGER" property="osType" />
|
||||||
<result column="entrance_id" jdbcType="INTEGER" property="entranceId" />
|
<result column="entrance_id" jdbcType="INTEGER" property="entranceId" />
|
||||||
<result column="c2s_pkt_num" jdbcType="INTEGER" property="c2sPktNum" />
|
<result column="c2s_pkt_num" jdbcType="BIGINT" property="c2sPktNum" />
|
||||||
<result column="s2c_pkt_num" jdbcType="INTEGER" property="s2cPktNum" />
|
<result column="s2c_pkt_num" jdbcType="BIGINT" property="s2cPktNum" />
|
||||||
<result column="c2s_byte_len" jdbcType="INTEGER" property="c2sByteLen" />
|
<result column="c2s_byte_len" jdbcType="BIGINT" property="c2sByteLen" />
|
||||||
<result column="s2c_byte_len" jdbcType="INTEGER" property="s2cByteLen" />
|
<result column="s2c_byte_len" jdbcType="BIGINT" property="s2cByteLen" />
|
||||||
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
@@ -19,19 +19,19 @@
|
|||||||
<!--获取操作系统列表TOP10 -->
|
<!--获取操作系统列表TOP10 -->
|
||||||
<select id="systemList" resultMap="BaseResultMap">
|
<select id="systemList" resultMap="BaseResultMap">
|
||||||
SELECT os_type osType, SUM(link_num) count ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen FROM galaxy.traffic_ua_statistic
|
SELECT os_type osType, SUM(link_num) count ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen FROM galaxy.traffic_ua_statistic
|
||||||
WHERE os_type !=0 and stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_ua_statistic),INTERVAL 5 MINUTE)
|
WHERE os_type !=0 and stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_ua_statistic WHERE os_type != 0),INTERVAL 5 MINUTE)
|
||||||
GROUP BY os_type ORDER BY count DESC limit 0,10
|
GROUP BY os_type ORDER BY count DESC limit 0,10
|
||||||
</select>
|
</select>
|
||||||
<!--获取上个时间段操作系统的数据量 -->
|
<!--获取上个时间段操作系统的数据量 -->
|
||||||
<select id="preSystemListCount" resultType="java.lang.Integer">
|
<select id="preSystemListCount" resultType="java.lang.Integer">
|
||||||
SELECT SUM(link_num) count FROM galaxy.traffic_ua_statistic
|
SELECT SUM(link_num) count FROM galaxy.traffic_ua_statistic
|
||||||
WHERE os_type !=0 and os_type=#{osType}
|
WHERE os_type !=0 and os_type=#{osType}
|
||||||
and stat_time between DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_ua_statistic),INTERVAL 10 MINUTE) and DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_ua_statistic),INTERVAL 5 MINUTE)
|
and stat_time between DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_ua_statistic WHERE os_type != 0),INTERVAL 10 MINUTE) and DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_ua_statistic),INTERVAL 5 MINUTE)
|
||||||
</select>
|
</select>
|
||||||
<!-- 根据操作系统获取浏览器分类 -->
|
<!-- 根据操作系统获取浏览器分类 -->
|
||||||
<select id="getBrowserBySystem" parameterType="java.lang.Integer" resultType="java.util.HashMap">
|
<select id="getBrowserBySystem" parameterType="java.lang.Integer" resultType="java.util.HashMap">
|
||||||
SELECT bs_type bsType, SUM(link_num) count ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen FROM galaxy.traffic_ua_statistic
|
SELECT bs_type bsType, SUM(link_num) count ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen FROM galaxy.traffic_ua_statistic
|
||||||
WHERE bs_type !=0 and os_type=#{osType} and stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_ua_statistic),INTERVAL 5 MINUTE)
|
WHERE bs_type !=0 and os_type=#{osType} and stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_ua_statistic WHERE bs_type != 0),INTERVAL 5 MINUTE)
|
||||||
GROUP BY bs_type ORDER BY count DESC limit 0,10
|
GROUP BY bs_type ORDER BY count DESC limit 0,10
|
||||||
</select>
|
</select>
|
||||||
<!--浏览器TOP10后所有为others -->
|
<!--浏览器TOP10后所有为others -->
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
#{singleType}
|
#{singleType}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
and stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_ua_statistic),INTERVAL 5 MINUTE)
|
and stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_ua_statistic WHERE bs_type != 0),INTERVAL 5 MINUTE)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!--获取浏览器列表TOP10 -->
|
<!--获取浏览器列表TOP10 -->
|
||||||
|
|||||||
Reference in New Issue
Block a user