mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-02 11:37:49 +00:00
Revert "change getOrNull() to getByInventoryIdOrNull() to get equipment"
This reverts commit 2aa51afe9d.
This commit is contained in:
@@ -156,15 +156,19 @@ 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);
|
||||
Equipment ce = equipmentServiceInterface.getByInventoryIdOrNull(apId);
|
||||
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);
|
||||
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