用户行为日志查询默认时间改为最新1小时;用户和IP列表只查询top10

This commit is contained in:
zhangdongxu
2018-12-15 17:58:45 +08:00
parent 36229034a8
commit 01ddc362c4

View File

@@ -618,12 +618,12 @@
<![CDATA[AND REPORT_TIME >= STR_TO_DATE(#{searchReportStartTime},'%Y-%m-%d %H:%i:%s') AND REPORT_TIME < STR_TO_DATE(#{searchReportEndTime},'%Y-%m-%d %H:%i:%s')]]> <![CDATA[AND REPORT_TIME >= STR_TO_DATE(#{searchReportStartTime},'%Y-%m-%d %H:%i:%s') AND REPORT_TIME < STR_TO_DATE(#{searchReportEndTime},'%Y-%m-%d %H:%i:%s')]]>
</when> </when>
<otherwise> <otherwise>
and REPORT_TIME>=DATE_SUB(now(), INTERVAL 1 DAY) and REPORT_TIME>=DATE_SUB(now(), INTERVAL 1 HOUR)
</otherwise> </otherwise>
</choose> </choose>
</where> </where>
group by NAS_IP order by num desc; group by NAS_IP order by num desc limit 10;
</select> </select>
<select id="findAccounList" parameterType="com.nis.domain.restful.NtcRadiusReport" <select id="findAccounList" parameterType="com.nis.domain.restful.NtcRadiusReport"
resultMap="NtcRadiusReportMap"> resultMap="NtcRadiusReportMap">
@@ -634,12 +634,12 @@
<![CDATA[AND REPORT_TIME >= STR_TO_DATE(#{searchReportStartTime},'%Y-%m-%d %H:%i:%s') AND REPORT_TIME < STR_TO_DATE(#{searchReportEndTime},'%Y-%m-%d %H:%i:%s')]]> <![CDATA[AND REPORT_TIME >= STR_TO_DATE(#{searchReportStartTime},'%Y-%m-%d %H:%i:%s') AND REPORT_TIME < STR_TO_DATE(#{searchReportEndTime},'%Y-%m-%d %H:%i:%s')]]>
</when> </when>
<otherwise> <otherwise>
and REPORT_TIME>DATE_SUB(now(), INTERVAL 1 DAY) and REPORT_TIME>DATE_SUB(now(), INTERVAL 1 HOUR)
</otherwise> </otherwise>
</choose> </choose>
</where> </where>
group by account order by num desc; group by account order by num desc limit 10;
</select> </select>
<select id="findNtcRadiusReport" parameterType="com.nis.domain.restful.NtcRadiusReport" <select id="findNtcRadiusReport" parameterType="com.nis.domain.restful.NtcRadiusReport"
@@ -659,7 +659,7 @@
<![CDATA[AND REPORT_TIME >= STR_TO_DATE(#{searchReportStartTime},'%Y-%m-%d %H:%i:%s') AND REPORT_TIME < STR_TO_DATE(#{searchReportEndTime},'%Y-%m-%d %H:%i:%s')]]> <![CDATA[AND REPORT_TIME >= STR_TO_DATE(#{searchReportStartTime},'%Y-%m-%d %H:%i:%s') AND REPORT_TIME < STR_TO_DATE(#{searchReportEndTime},'%Y-%m-%d %H:%i:%s')]]>
</when> </when>
<otherwise> <otherwise>
<![CDATA[AND REPORT_TIME>DATE_SUB(now(), INTERVAL 1 DAY) ]]> <![CDATA[AND REPORT_TIME>DATE_SUB(now(), INTERVAL 1 HOUR) ]]>
</otherwise> </otherwise>
</choose> </choose>
</where> </where>