|
@@ -1623,7 +1623,11 @@
|
|
|
</sql>
|
|
|
|
|
|
<select id="getTimeOnlineData" resultType="com.qmth.themis.business.bean.result.TimeOnlineDataResult">
|
|
|
- select t.* from
|
|
|
+ select
|
|
|
+ t.hour,
|
|
|
+ sum(t.onlineCount) as onlineCount,
|
|
|
+ sum(t.offlineCount) as offlineCount
|
|
|
+ from
|
|
|
(
|
|
|
select
|
|
|
DATE_FORMAT(FROM_UNIXTIME(teesol.create_time / 1000), '%H:%i') as hour,
|
|
@@ -1655,6 +1659,8 @@
|
|
|
</if>
|
|
|
and (teesol.create_time <![CDATA[ >= ]]> unix_timestamp(date_sub(#{currentDate}, interval #{scaleSize} minute)) * 1000
|
|
|
and teesol.create_time <![CDATA[ <= ]]> unix_timestamp(#{currentDate}) * 1000)
|
|
|
- and teesol.`type` = 'OFF_LINE' group by teesol.create_time) t order by t.hour;
|
|
|
+ and teesol.`type` = 'OFF_LINE' group by teesol.create_time) t
|
|
|
+ group by t.hour
|
|
|
+ order by t.hour
|
|
|
</select>
|
|
|
</mapper>
|