diff options
| author | shangguanyanfei <[email protected]> | 2019-01-22 17:22:46 +0800 |
|---|---|---|
| committer | shangguanyanfei <[email protected]> | 2019-01-22 17:22:46 +0800 |
| commit | cffbc5edd7c857eb2c2adbf1a9a31bebd480a57b (patch) | |
| tree | 04bad984c489de6fbfd258dd296ac5b1913fabb2 /src | |
| parent | 70d5ce99efaa3861194c7d3b49bf8d0d6a533a2e (diff) | |
Traffic Statistic页面接口增加direction为null的判断
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml b/src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml index cd75f4b..c02ef94 100644 --- a/src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml +++ b/src/main/java/com/nis/web/dao/dashboard/NtcTotalReportDao.xml @@ -73,13 +73,17 @@ WHERE
<![CDATA[ stat_time >= #{beginDate} and stat_time < #{endDate} ]]>
and addr_type in (4,6)
- and direction =#{searchDirection}
+ <if test="searchDirection !=null">
+ and direction = #{searchDirection}
+ </if>
group by addr_type,stat_time ,entrance_id order by stat_time
</select>
<select id="getBandwidthTransProtocol" resultMap="BandwidthResultMap">
select addr_type,trans_type,entrance_id,IFNULL((SUM(c2s_byte_len+s2c_byte_len)*8)/300/1024/1024/1024,0) gbps,IFNULL(SUM(c2s_pkt_num+s2c_pkt_num)/300,0) pps,IFNULL(SUM(link_num),0) linkNum, stat_time from traffic_trans_statistic
WHERE <![CDATA[stat_time >= #{beginDate} and stat_time < #{endDate} ]]>
- and direction =#{searchDirection}
+ <if test="searchDirection !=null">
+ and direction = #{searchDirection}
+ </if>
and trans_type in (6,17) group by trans_type,stat_time ,entrance_id order by stat_time
</select>
|
