|
@@ -92,12 +92,12 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="selectAttributes" resultMap="alarmSettingMap">
|
|
|
- select t3.id attribute_id,t3.name attribute_name
|
|
|
+ select t2.id attribute_id,t2.name attribute_name
|
|
|
from sms_device t1
|
|
|
- inner join sms_device_type t2 on t1.device_type_id=t2.id and t2.status =1
|
|
|
- inner join sms_device_attribute t3 on t2.id=t3.device_type_id and t3.status =1
|
|
|
- where t1.id=#{deviceId} and t1.status=1
|
|
|
- order by t3.name
|
|
|
+ inner join sms_device_attribute t2 on t1.device_type_id=t2.device_type_id and t2.status =1
|
|
|
+ inner join sms_device_parm t3 on t3.device_id=t1.id and t3.attribute_id=t2.id and t3.status=1
|
|
|
+ where t1.id=#{deviceId} and t1.status=1 and t3.is_alarm=1
|
|
|
+ order by t2.name
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|