mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-11-03 12:08:07 +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) {
|
public void processMqttMessage(String topic, Report report) {
|
||||||
LOG.info("Received report on topic {} for ap {}", topic, report.getNodeID());
|
LOG.info("Received report on topic {} for ap {}", topic, report.getNodeID());
|
||||||
int customerId = extractCustomerIdFromTopic(topic);
|
|
||||||
String apId = extractApIdFromTopic(topic);
|
String apId = extractApIdFromTopic(topic);
|
||||||
long equipmentId = extractEquipmentIdFromTopic(topic);
|
Equipment ce = equipmentServiceInterface.getByInventoryIdOrNull(apId);
|
||||||
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) {
|
if (ce == null) {
|
||||||
LOG.warn("Cannot read equipment {}", apId);
|
LOG.warn("Cannot read equipment {}", apId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int customerId = ce.getCustomerId();
|
||||||
|
long equipmentId = ce.getId();
|
||||||
long locationId = ce.getLocationId();
|
long locationId = ce.getLocationId();
|
||||||
long profileId = ce.getProfileId();
|
long profileId = ce.getProfileId();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user