mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Add todo for device count issue
This commit is contained in:
parent
cd2ffa7cc5
commit
4fae9cf2e3
@ -3488,6 +3488,7 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
|
||||
}
|
||||
}
|
||||
|
||||
// todo: fix the join query
|
||||
@Override
|
||||
public int getDeviceCountByDeviceIds(PaginationRequest paginationRequest, List<Integer> deviceIds, int tenantId)
|
||||
throws DeviceManagementDAOException {
|
||||
@ -3500,8 +3501,8 @@ public abstract class AbstractDeviceDAOImpl implements DeviceDAO {
|
||||
boolean isDeviceNameProvided = false;
|
||||
try {
|
||||
Connection connection = getConnection();
|
||||
String sql = "SELECT COUNT(DISTINCT e.DEVICE_ID) AS COUNT FROM DM_DEVICE d INNER JOIN DM_ENROLMENT e " +
|
||||
"WHERE d.ID = e.DEVICE_ID AND d.TENANT_ID = ? AND e.DEVICE_ID IN (" + deviceIdStringList+ ") " +
|
||||
String sql = "SELECT COUNT(DISTINCT e.DEVICE_ID) FROM DM_ENROLMENT e " +
|
||||
"WHERE e.TENANT_ID = ? AND e.DEVICE_ID IN (" + deviceIdStringList+ ") " +
|
||||
"AND e.STATUS NOT IN ('DELETED', 'REMOVED')";
|
||||
|
||||
if (paginationRequest.getOwner() != null) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user