Browse Source

fix rest-client getTenantDeviceInfos by active search

pull/11863/head
dong.zhou 2 years ago
parent
commit
3b491c978f
  1. 5
      rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java

5
rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java

@ -1356,13 +1356,14 @@ public class RestClient implements Closeable {
}, params).getBody();
}
public PageData<DeviceInfo> getTenantDeviceInfos(String type, DeviceProfileId deviceProfileId, PageLink pageLink) {
public PageData<DeviceInfo> getTenantDeviceInfos(String type, Boolean active, DeviceProfileId deviceProfileId, PageLink pageLink) {
Map<String, String> 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<PageData<DeviceInfo>>() {
}, params).getBody();

Loading…
Cancel
Save