Commit 5fcd815a authored by renjie's avatar renjie

Merge branch 'dev-zrj' into 'staging'

删除未释放ip

See merge request !116
parents ebfc8950 c4c3f082
...@@ -810,9 +810,9 @@ public class IpResourceServiceImpl implements IpResourceService { ...@@ -810,9 +810,9 @@ public class IpResourceServiceImpl implements IpResourceService {
Map<String, String> params = new HashMap<String, String>(); Map<String, String> params = new HashMap<String, String>();
HttpEntity<Map<String, String>> httpEntity = new HttpEntity<>(params, headers); HttpEntity<Map<String, String>> httpEntity = new HttpEntity<>(params, headers);
List<IpResource> ipResources = ipResourceRepository.findByIsDeleted(true); List<IpResource> ipResources = ipResourceRepository.findByIsDeleted(true);
for (IpResource ipResource : ipResources) { ipResources.forEach(x -> {
ResponseEntity<String> result = restTemplate.exchange(URL + "/intelligroup/ipresources?accountId=browser&ip={ip}", HttpMethod.DELETE, httpEntity, String.class, ipResource.getAddr()); 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); 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