@@ -319,7 +319,7 @@
) as tab
</select>
<select id="findAlarmCountTotalCount" resultType="com.huaxu.dto.ParmTypeCountDto">
- select count(1) as "totalCount" ,sum(tab.nbnormalCount) as "nbnormalCount" from(
+ select count(1) as "totalCount" ,ifnull(sum(tab.nbnormalCount),0) as "nbnormalCount" from(
select a.PARENT_SCENE_ID,case when count(c.id)>0 then 1 else 0 end as "nbnormalCount"
from sms_device_scene a
INNER JOIN sms_device_parm b on a.DEVICE_ID=b.DEVICE_ID and b.PARM_TYPE in (15,8,9,11,18,19)