|
|
|
@ -35,12 +35,12 @@ import org.springframework.context.ApplicationEventPublisher; |
|
|
|
import org.springframework.core.ParameterizedTypeReference; |
|
|
|
import org.springframework.http.*; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
import org.springframework.web.util.UriComponents; |
|
|
|
import org.springframework.web.util.UriComponentsBuilder; |
|
|
|
import org.thingsboard.server.common.data.Device; |
|
|
|
import org.thingsboard.server.common.data.id.DeviceId; |
|
|
|
import org.thingsboard.server.common.data.kv.*; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
@ -223,6 +223,18 @@ public class DataReissueServiceImpl extends BaseServiceImpl<DataReissueMapper, D |
|
|
|
return sysTenantDao.queryList(params).parallelStream().sorted(Comparator.comparingLong(SysTenantDTO::getTenantCode)).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void testConnect(String username, String password,String url) { |
|
|
|
try { |
|
|
|
String token = login(url, username, password); |
|
|
|
if (StringUtils.isBlank(token)) { |
|
|
|
throw new SysException("连接失败"); |
|
|
|
} |
|
|
|
}catch (Exception e){ |
|
|
|
throw new SysException("连接失败"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private String login(String url, String username, String password) { |
|
|
|
Map<String, String> loginRequest = new HashMap(); |
|
|
|
|