Commit e2f25927d329b4fc63da696b248dcc2231b80515

Authored by 芯火源
1 parent 81e14010

fix: 告警中心告警记录混乱问题

... ... @@ -41,9 +41,13 @@
41 41 SELECT d.name AS device_name,d.alias AS device_alias,d.id device_id,m.*,d.organization_id,org.name organization_name
42 42 FROM alarm m
43 43 LEFT JOIN tk_device d ON m.originator_id = d.tb_device_id::uuid
  44 + LEFT JOIN device bd ON bd.id = d.tb_device_id::uuid
44 45 LEFT JOIN tk_organization org ON org.id = d.organization_id
45 46 <where>
46 47 m.tenant_id = #{tenantId}
  48 + <if test="customerId!=null">
  49 + AND bd.customer_id = #{customerId}
  50 + </if>
47 51 <if test="severity!=null">
48 52 AND severity = #{severity}
49 53 </if>
... ...