Browse Source

getAlarmTmplIdsByDeviceId 的sql增加flag筛选

master
review512jwy@163.com 1 month ago
parent
commit
6bd01e7b16
  1. 5
      data-center-business-dao/src/main/resources/mappers/ex/DeviceAlertTemplateBindMapperExt.xml

5
data-center-business-dao/src/main/resources/mappers/ex/DeviceAlertTemplateBindMapperExt.xml

@ -28,11 +28,12 @@
<select id="getAlarmTmplIdsByDeviceId" resultType="java.lang.String"> <select id="getAlarmTmplIdsByDeviceId" resultType="java.lang.String">
select select
GROUP_CONCAT(device_alert_template_id) GROUP_CONCAT(tmpl.device_alert_template_id)
from from
device_alert_template_bind tmpl device_alert_template_bind tmpl
inner join device_info dinfo on dinfo.id = tmpl.device_info_id inner join device_info dinfo on dinfo.id = tmpl.device_info_id
where dinfo.device_id = #{deviceId} inner join device_alert_template dtmpl on dtmpl.id = tmpl.device_alert_template_id
where dinfo.device_id = #{deviceId} and dinfo.flag != 1 and dtmpl.flag != 1
</select> </select>

Loading…
Cancel
Save