|
@@ -51,6 +51,8 @@ public class IotWarnconfigServiceImpl implements IIotWarnconfigService {
|
|
|
private IotDeviceconfigMapper iotDeviceconfigMapper;
|
|
private IotDeviceconfigMapper iotDeviceconfigMapper;
|
|
|
@Resource
|
|
@Resource
|
|
|
private RedisCacheManager redisCacheManager;
|
|
private RedisCacheManager redisCacheManager;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private IotWarncountMapper iotWarncountMapper;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 查询告警配置
|
|
* 查询告警配置
|
|
@@ -210,6 +212,7 @@ public class IotWarnconfigServiceImpl implements IIotWarnconfigService {
|
|
|
Collection<IotWarnobject> deleteData = CollectionUtils.intersection(oldWarnObjectList,differ);
|
|
Collection<IotWarnobject> deleteData = CollectionUtils.intersection(oldWarnObjectList,differ);
|
|
|
for(IotWarnobject iotWarnobject :deleteData){
|
|
for(IotWarnobject iotWarnobject :deleteData){
|
|
|
iotWarnobjectMapper.deleteIotWarnobjectByWoBid(iotWarnobject.getWoBid(), SecurityUtils.getTid());
|
|
iotWarnobjectMapper.deleteIotWarnobjectByWoBid(iotWarnobject.getWoBid(), SecurityUtils.getTid());
|
|
|
|
|
+ iotWarncountMapper.deleteIotWarncountByDevBidAndWcBid(iotWarnobject.getDevBid(),iotWarnobject.getWcBid(),SecurityUtils.getTid());
|
|
|
// 清除告警对象的缓存
|
|
// 清除告警对象的缓存
|
|
|
redisCacheManager.deleteObject(RedisCacheKey.IOT_WARN_RE_COUNTS, iotWarnconfigEditReqVo.getWcBid() + ":" + iotWarnobject.getDevBid());
|
|
redisCacheManager.deleteObject(RedisCacheKey.IOT_WARN_RE_COUNTS, iotWarnconfigEditReqVo.getWcBid() + ":" + iotWarnobject.getDevBid());
|
|
|
}
|
|
}
|