🔨 策略描述非必填.
This commit is contained in:
@@ -59,4 +59,13 @@ public interface AlarmPolicyRuleDAO extends IMapper<AlarmPolicyRuleDO> {
|
||||
return this.selectList(Conditions.eq(AlarmPolicyRuleDO::getPolicyId, policyId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过 policyId 删除
|
||||
*
|
||||
* @param policyId policyId
|
||||
*/
|
||||
default void deleteByPolicyId(Long policyId) {
|
||||
this.delete(Conditions.eq(AlarmPolicyRuleDO::getPolicyId, policyId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ public class AlarmPolicyServiceImpl implements AlarmPolicyService {
|
||||
// 删除策略通知
|
||||
alarmPolicyNotifyDAO.deleteByPolicyId(id);
|
||||
// 删除策略规则
|
||||
alarmPolicyRuleService.deleteByPolicyId(id);
|
||||
alarmPolicyRuleDAO.deleteByPolicyId(id);
|
||||
// 删除缓存
|
||||
alarmEngineContext.reloadPolicy(id);
|
||||
log.info("AlarmPolicyService-deleteAlarmPolicyById effect: {}", effect);
|
||||
|
||||
Reference in New Issue
Block a user