From 3b491c978feb9a01d17b5de21cab56ef94676116 Mon Sep 17 00:00:00 2001 From: "dong.zhou" Date: Tue, 15 Oct 2024 16:36:01 +0800 Subject: [PATCH] fix rest-client getTenantDeviceInfos by active search --- .../main/java/org/thingsboard/rest/client/RestClient.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java b/rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java index 818d714a3b..0f1d1a802a 100644 --- a/rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java +++ b/rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java @@ -1356,13 +1356,14 @@ public class RestClient implements Closeable { }, params).getBody(); } - public PageData getTenantDeviceInfos(String type, DeviceProfileId deviceProfileId, PageLink pageLink) { + public PageData getTenantDeviceInfos(String type, Boolean active, DeviceProfileId deviceProfileId, PageLink pageLink) { Map params = new HashMap<>(); params.put("type", type); + params.put("active", active != null ? active.toString() : null); params.put("deviceProfileId", deviceProfileId != null ? deviceProfileId.toString() : null); addPageLinkToParam(params, pageLink); return restTemplate.exchange( - baseURL + "/api/tenant/deviceInfos?type={type}&deviceProfileId={deviceProfileId}&" + getUrlParams(pageLink), + baseURL + "/api/tenant/deviceInfos?type={type}&active={active}&deviceProfileId={deviceProfileId}&" + getUrlParams(pageLink), HttpMethod.GET, HttpEntity.EMPTY, new ParameterizedTypeReference>() { }, params).getBody();