|
@@ -19,6 +19,7 @@ public interface DevInfoMapper extends BaseMapper<DevInfo> {
|
|
|
"SET " +
|
|
|
"user_id = null , " +
|
|
|
"tenant_id = null , " +
|
|
|
+ "dev_name = null , " +
|
|
|
"online = 9 , " +
|
|
|
"onoff_time = null , " +
|
|
|
"wifi_name = null , " +
|
|
@@ -41,7 +42,9 @@ public interface DevInfoMapper extends BaseMapper<DevInfo> {
|
|
|
"active_time = null , " +
|
|
|
"falling_confirm = null , " +
|
|
|
"exist_flag = null , " +
|
|
|
- "presence_change_time = null " +
|
|
|
+ "presence_change_time = null , " +
|
|
|
+ "age = null , " +
|
|
|
+ "guardianship_type = null " +
|
|
|
|
|
|
"WHERE dev_id = #{devId}")
|
|
|
void reset(Long devId);
|
|
@@ -57,7 +60,7 @@ public interface DevInfoMapper extends BaseMapper<DevInfo> {
|
|
|
" SUM(CASE WHEN age >= 100 THEN 1 ELSE 0 END) AS 'ge100', ",
|
|
|
" sum(1) as 'deviceCount', ",
|
|
|
" sum(case when online = 1 then 1 else 0 end) as 'onlineCount', ",
|
|
|
- " sum(case when onoff_time >= #{today} then 1 else 0 end) as 'detectedCount', ",
|
|
|
+ " sum(case when presence_change_time >= #{today} then 1 else 0 end) as 'detectedCount', ",
|
|
|
" sum(case when install_position = 'Toilet' then 1 else 0 end) as 'toiletCount', ",
|
|
|
" sum(case when install_position = 'Bedroom' then 1 else 0 end) as 'bedroomCount', ",
|
|
|
" sum(case when install_position = 'LivingRoom' then 1 else 0 end) as 'livingRoomCount', ",
|