|
|
@ -18,13 +18,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<result property="networkQuality" column="network_quality"/> |
|
|
|
<result property="rttAvg" column="rtt_avg"/> |
|
|
|
<result property="monitorTime" column="monitor_time"/> |
|
|
|
<result property="onlineRate" column="online_rate"/> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<insert id="addBatch"> |
|
|
|
insert into dc_online_log |
|
|
|
( |
|
|
|
device_id,device_name,device_ip,stake_mark,device_status,send_count, |
|
|
|
receive_count,loss_count,loss_rate,network_quality,rtt_avg,monitor_time |
|
|
|
receive_count,loss_count,loss_rate,network_quality,rtt_avg,monitor_time,online_rate |
|
|
|
) |
|
|
|
values |
|
|
|
<foreach collection="list" item="item" index="index" separator=","> |
|
|
@ -40,19 +41,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
#{item.lossRate}, |
|
|
|
#{item.networkQuality}, |
|
|
|
#{item.rttAvg}, |
|
|
|
#{item.monitorTime} |
|
|
|
#{item.monitorTime}, |
|
|
|
#{item.onlineRate} |
|
|
|
) |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<select id="queryByDate" resultMap="OnlineLog"> |
|
|
|
select id,device_id,device_name,device_ip,stake_mark,device_status,send_count, |
|
|
|
receive_count,loss_count,loss_rate,network_quality,rtt_avg,monitor_time |
|
|
|
receive_count,loss_count,loss_rate,network_quality,rtt_avg,monitor_time,online_rate |
|
|
|
from dc_online_log where monitor_time between #{startTime} and #{endTime} |
|
|
|
</select> |
|
|
|
<select id="queryByDateAndDevice" resultMap="OnlineLog"> |
|
|
|
select id,device_id,device_name,device_ip,stake_mark,device_status,send_count, |
|
|
|
receive_count,loss_count,loss_rate,network_quality,rtt_avg,monitor_time |
|
|
|
receive_count,loss_count,loss_rate,network_quality,rtt_avg,monitor_time,online_rate |
|
|
|
from dc_online_log where device_id = #{deviceId} and monitor_time between #{startTime} and #{endTime} |
|
|
|
order by monitor_time desc |
|
|
|
</select> |
|
|
|