|
|
@ -848,16 +848,16 @@ public class SubscriptionManagerImpl implements SubscriptionManager {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
subscriptionDAO.addDeviceSubscription(username, subInsertingDeviceIds, subType,
|
|
|
|
|
|
|
|
Operation.Status.PENDING.toString(), applicationReleaseId, tenantId);
|
|
|
|
|
|
|
|
if (!subUpdatingDeviceIds.isEmpty()) {
|
|
|
|
if (!subUpdatingDeviceIds.isEmpty()) {
|
|
|
|
subscriptionDAO.updateDeviceSubscription(username, subUpdatingDeviceIds, action, subType,
|
|
|
|
subscriptionDAO.updateDeviceSubscription(username, subUpdatingDeviceIds, action, subType,
|
|
|
|
Operation.Status.PENDING.toString(), applicationReleaseId, tenantId);
|
|
|
|
Operation.Status.PENDING.toString(), applicationReleaseId, tenantId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
subUpdatingDeviceIds.addAll(subInsertingDeviceIds);
|
|
|
|
|
|
|
|
if (!subUpdatingDeviceIds.isEmpty()) {
|
|
|
|
if (!subInsertingDeviceIds.isEmpty()) {
|
|
|
|
|
|
|
|
subscriptionDAO.addDeviceSubscription(username, subInsertingDeviceIds, subType,
|
|
|
|
|
|
|
|
Operation.Status.PENDING.toString(), applicationReleaseId, tenantId);
|
|
|
|
List<Integer> deviceSubIds = new ArrayList<>(
|
|
|
|
List<Integer> deviceSubIds = new ArrayList<>(
|
|
|
|
subscriptionDAO.getDeviceSubIds(subUpdatingDeviceIds, applicationReleaseId, tenantId));
|
|
|
|
subscriptionDAO.getDeviceSubIds(subInsertingDeviceIds, applicationReleaseId, tenantId));
|
|
|
|
subscriptionDAO.addOperationMapping(operationId, deviceSubIds, tenantId);
|
|
|
|
subscriptionDAO.addOperationMapping(operationId, deviceSubIds, tenantId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|