mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-01 11:07:49 +00:00
change getOrNull() to getByInventoryIdOrNull() to get equipment
This commit is contained in:
committed by
Mike Hansen
parent
716e5d8129
commit
2aa51afe9d
@@ -156,19 +156,15 @@ public class MqttStatsPublisher {
|
||||
|
||||
public void processMqttMessage(String topic, Report report) {
|
||||
LOG.info("Received report on topic {} for ap {}", topic, report.getNodeID());
|
||||
int customerId = extractCustomerIdFromTopic(topic);
|
||||
String apId = extractApIdFromTopic(topic);
|
||||
long equipmentId = extractEquipmentIdFromTopic(topic);
|
||||
if ((equipmentId <= 0) || (customerId <= 0)) {
|
||||
LOG.warn("Cannot determine equipment ids from topic {} - customerId {} equipmentId {}", topic, customerId, equipmentId);
|
||||
return;
|
||||
}
|
||||
Equipment ce = equipmentServiceInterface.getOrNull(equipmentId);
|
||||
Equipment ce = equipmentServiceInterface.getByInventoryIdOrNull(apId);
|
||||
if (ce == null) {
|
||||
LOG.warn("Cannot read equipment {}", apId);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int customerId = ce.getCustomerId();
|
||||
long equipmentId = ce.getId();
|
||||
long locationId = ce.getLocationId();
|
||||
long profileId = ce.getProfileId();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user