Commit c4c3f082 authored by renjie's avatar renjie

删除未释放ip

parent 270a8267
......@@ -810,9 +810,9 @@ public class IpResourceServiceImpl implements IpResourceService {
Map<String, String> params = new HashMap<String, String>();
HttpEntity<Map<String, String>> httpEntity = new HttpEntity<>(params, headers);
List<IpResource> ipResources = ipResourceRepository.findByIsDeleted(true);
for (IpResource ipResource : ipResources) {
ResponseEntity<String> result = restTemplate.exchange(URL + "/intelligroup/ipresources?accountId=browser&ip={ip}", HttpMethod.DELETE, httpEntity, String.class, ipResource.getAddr());
ipResources.forEach(x -> {
ResponseEntity<String> result = restTemplate.exchange(URL + "/intelligroup/ipresources?accountId=browser&ip={ip}", HttpMethod.DELETE, httpEntity, String.class, x.getAddr());
DeleteIpResultDto deleteIpResultDto = JSON.parseObject(result.getBody(), DeleteIpResultDto.class);
}
});
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment