实现阈值通知消息

This commit is contained in:
GoEdgeLab
2021-05-05 19:50:55 +08:00
parent 56665ba206
commit b433e74c9b
6 changed files with 293 additions and 71 deletions

View File

@@ -26,6 +26,12 @@ func (this *NodeValueService) CreateNodeValue(ctx context.Context, req *pb.Creat
return nil, err
}
// 触发阈值
err = models.SharedNodeThresholdDAO.FireNodeThreshold(tx, role, nodeId, req.Item)
if err != nil {
return nil, err
}
return this.Success()
}