[alerter] 告警信息批量接口

This commit is contained in:
tomsun28
2021-12-13 14:50:23 +08:00
parent 23def5cc37
commit 83449a8556
7 changed files with 41 additions and 3 deletions

View File

@@ -4,6 +4,8 @@ import com.usthe.alert.pojo.entity.Alert;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import java.util.Set;
/**
* Alert 数据库操作
* @author tom
@@ -11,4 +13,10 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
*/
public interface AlertDao extends JpaRepository<Alert, Long>, JpaSpecificationExecutor<Alert> {
/**
* 根据ID列表删除告警
* @param alertIds 告警ID列表
*/
void deleteAlertsByIdIn(Set<Long> alertIds);
}

View File

@@ -20,7 +20,7 @@ public interface AlertDefineDao extends JpaRepository<AlertDefine, Long>, JpaSpe
* 根据ID列表删除告警定义
* @param alertDefineIds 告警定义ID列表
*/
void deleteAllByIdIn(Set<Long> alertDefineIds);
void deleteAlertDefinesByIdIn(Set<Long> alertDefineIds);
/**
* 根据监控ID查询与之关联的告警定义列表