This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
galaxy-k18-galaxy-service/src/main/java/com/nis/web/dao/dashboard/TrafficAppStatisticDao.xml

24 lines
1.5 KiB
XML
Raw Normal View History

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" />
<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
FROM galaxy.traffic_app_statistic
WHERE app_type !=0 and stat_time = (SELECT MAX(stat_time) FROM galaxy.traffic_app_statistic WHERE app_type != 0)
GROUP BY app_type order by count desc limit 0,10
2018-07-13 19:39:04 +08:00
</select>
</mapper>