|
|
@ -25,6 +25,7 @@ import io.entgra.device.mgt.core.device.mgt.common.Count;
|
|
|
|
import io.entgra.device.mgt.core.device.mgt.common.Device;
|
|
|
|
import io.entgra.device.mgt.core.device.mgt.common.Device;
|
|
|
|
import io.entgra.device.mgt.core.device.mgt.common.DeviceBilling;
|
|
|
|
import io.entgra.device.mgt.core.device.mgt.common.DeviceBilling;
|
|
|
|
import io.entgra.device.mgt.core.device.mgt.common.PaginationRequest;
|
|
|
|
import io.entgra.device.mgt.core.device.mgt.common.PaginationRequest;
|
|
|
|
|
|
|
|
import io.entgra.device.mgt.core.device.mgt.common.EnrolmentInfo;
|
|
|
|
import io.entgra.device.mgt.core.device.mgt.common.device.details.DeviceInfo;
|
|
|
|
import io.entgra.device.mgt.core.device.mgt.common.device.details.DeviceInfo;
|
|
|
|
import io.entgra.device.mgt.core.device.mgt.core.dao.DeviceManagementDAOException;
|
|
|
|
import io.entgra.device.mgt.core.device.mgt.core.dao.DeviceManagementDAOException;
|
|
|
|
import io.entgra.device.mgt.core.device.mgt.core.dao.DeviceManagementDAOFactory;
|
|
|
|
import io.entgra.device.mgt.core.device.mgt.core.dao.DeviceManagementDAOFactory;
|
|
|
@ -1057,7 +1058,7 @@ public class PostgreSQLDeviceDAOImpl extends AbstractDeviceDAOImpl {
|
|
|
|
+ "INNER JOIN (SELECT ID, NAME FROM DM_DEVICE_TYPE) AS device_types ON "
|
|
|
|
+ "INNER JOIN (SELECT ID, NAME FROM DM_DEVICE_TYPE) AS device_types ON "
|
|
|
|
+ "device_types.ID = DM_DEVICE.DEVICE_TYPE_ID "
|
|
|
|
+ "device_types.ID = DM_DEVICE.DEVICE_TYPE_ID "
|
|
|
|
+ "WHERE DM_DEVICE.ID IN (",
|
|
|
|
+ "WHERE DM_DEVICE.ID IN (",
|
|
|
|
") AND DM_DEVICE.TENANT_ID = ?");
|
|
|
|
") AND DM_DEVICE.TENANT_ID = ? AND e.STATUS NOT IN (?, ?)");
|
|
|
|
|
|
|
|
|
|
|
|
deviceIds.stream().map(ignored -> "?").forEach(joiner::add);
|
|
|
|
deviceIds.stream().map(ignored -> "?").forEach(joiner::add);
|
|
|
|
String query = joiner.toString();
|
|
|
|
String query = joiner.toString();
|
|
|
@ -1099,6 +1100,8 @@ public class PostgreSQLDeviceDAOImpl extends AbstractDeviceDAOImpl {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ps.setInt(index++, tenantId);
|
|
|
|
ps.setInt(index++, tenantId);
|
|
|
|
|
|
|
|
ps.setString(index++, EnrolmentInfo.Status.REMOVED.toString());
|
|
|
|
|
|
|
|
ps.setString(index++, EnrolmentInfo.Status.DELETED.toString());
|
|
|
|
if (isDeviceNameProvided) {
|
|
|
|
if (isDeviceNameProvided) {
|
|
|
|
ps.setString(index++, name + "%");
|
|
|
|
ps.setString(index++, name + "%");
|
|
|
|
}
|
|
|
|
}
|
|
|
|