2018-07-13 19:39:04 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.nis.web.dao.dashboard.TrafficAppStatisticDao">
|
|
|
|
|
<resultMap id="BaseResultMap" type="com.nis.domain.restful.dashboard.TrafficAppStatistic">
|
|
|
|
|
<id column="stat_id" jdbcType="INTEGER" property="statId" />
|
|
|
|
|
<result column="app_type" jdbcType="INTEGER" property="appType" />
|
|
|
|
|
<result column="entrance_id" jdbcType="INTEGER" property="entranceId" />
|
2018-10-11 09:23:09 +08:00
|
|
|
<result column="c2s_pkt_num" jdbcType="BIGINT" property="c2sPktNum" />
|
|
|
|
|
<result column="s2c_pkt_num" jdbcType="BIGINT" property="s2cPktNum" />
|
|
|
|
|
<result column="c2s_byte_len" jdbcType="BIGINT" property="c2sByteLen" />
|
|
|
|
|
<result column="s2c_byte_len" jdbcType="BIGINT" property="s2cByteLen" />
|
2018-07-13 19:39:04 +08:00
|
|
|
<result column="stat_time" jdbcType="TIMESTAMP" property="statTime" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
|
stat_id, app_type, entrance_id, c2s_pkt_num, s2c_pkt_num, c2s_byte_len, s2c_byte_len,
|
|
|
|
|
stat_time
|
|
|
|
|
</sql>
|
|
|
|
|
<select id="appChart" resultType="java.util.HashMap">
|
2018-10-17 14:47:06 +08:00
|
|
|
SELECT app_type appType, SUM(link_num) count, (SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
|
2018-09-21 20:56:01 +08:00
|
|
|
FROM galaxy.traffic_app_statistic
|
2018-10-22 17:37:25 +08:00
|
|
|
WHERE app_type !=0 and stat_time = (SELECT MAX(stat_time) FROM galaxy.traffic_app_statistic WHERE app_type != 0)
|
2018-07-23 17:44:18 +08:00
|
|
|
GROUP BY app_type order by count desc limit 0,10
|
2018-07-13 19:39:04 +08:00
|
|
|
</select>
|
|
|
|
|
</mapper>
|