[alter,webapp]fix 告警定义关联监控问题

This commit is contained in:
tomsun28
2022-01-30 12:34:20 +08:00
parent 9cf56d7c01
commit 9b08d8d19b
9 changed files with 31 additions and 22 deletions

View File

@@ -28,7 +28,7 @@ public interface AlertDefineDao extends JpaRepository<AlertDefine, Long>, JpaSpe
* @param metrics 指标组
* @return 告警定义列表
*/
@Query("select define from AlertDefine define join AlertDefineBind bind on bind.alertDefineId = define.id " +
@Query("select define from AlertDefine define join AlertDefineMonitorBind bind on bind.alertDefineId = define.id " +
"where bind.monitorId = :monitorId and define.metric = :metrics and define.enable = true")
List<AlertDefine> queryAlertDefinesByMonitor(@Param(value = "monitorId") Long monitorId,
@Param(value = "metrics") String metrics);