新增網站詳情統計域名統計

This commit is contained in:
zhanghongqing
2018-12-18 04:59:07 +08:00
parent 6155a7992d
commit da5db9c075
5 changed files with 218 additions and 7 deletions

View File

@@ -6,6 +6,7 @@ import java.util.Map;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.restful.dashboard.TrafficHttpFocusStatistic;
import com.nis.domain.restful.dashboard.TrafficHttpStatistic;
import com.nis.web.dao.MyBatisDao;
@@ -27,4 +28,8 @@ public interface TrafficHttpStatisticDao {
List<Map> getHttpStatisticNoLinkAndPkt(@Param("statTime") Date statTime, @Param("endTime") Date endTime);
List<Map> getTrafficHttpStatistic(@Param("statTime") Date statTime, @Param("endTime") Date endTime);
List getIdByWebSiteId(@Param("websiteId") Integer websiteId);
List<Map> getTrafficHttpDomain(@Param("beginDate")Date beginDate,@Param("endDate") Date endDate,@Param("domain")Integer domain,@Param("entranceId")Integer entranceId);
List<TrafficHttpFocusStatistic> getDomainTrans(@Param("entranceId")Integer entranceId,@Param("beginDate")String beginDate,@Param("endDate")String endDate,@Param("domain")Integer domain);
}

View File

@@ -121,4 +121,26 @@ FROM
</if>
</select>
<!--获取域名 -->
<select id="getTrafficHttpDomain" resultType="java.util.HashMap">
select web_id webId, unique_num uniqueNum,entrance_id entranceId,SUM(c2s_byte_len + s2c_byte_len) byteCount,
sum(c2s_pkt_num + s2c_pkt_num) pktCount from traffic_http_focus_statistic t where
<![CDATA[ stat_time>= #{beginDate} and stat_time< #{endDate}]]>
<if test="domain!=null">
and web_id=#{domain}
</if>
<if test="entranceId!=null">
and entrance_id=#{entranceId}
</if>
group by web_id order by uniqueNum
</select>
<select id="getDomainTrans" resultType="com.nis.domain.restful.dashboard.TrafficHttpFocusStatistic">
select stat_time time, unique_num count from traffic_http_focus_statistic t where
<![CDATA[ stat_time>= #{beginDate} and stat_time< #{endDate}]]>
and web_id=#{domain}
<if test="entranceId!=null">
and entrance_id=#{entranceId}
</if>
order by stat_time
</select>
</mapper>