Commit d3733d75 authored by SN150021's avatar SN150021

bugfix

parent 372c6199
...@@ -738,12 +738,12 @@ public class IpResourceServiceImpl implements IpResourceService { ...@@ -738,12 +738,12 @@ public class IpResourceServiceImpl implements IpResourceService {
// 1.2 ip资源在未来七天内到期,且 ip 资源的状态不是 3(正在分配)、5(已失效)、6(未分配),则将 ip 资源设置为 2(即将过期) // 1.2 ip资源在未来七天内到期,且 ip 资源的状态不是 3(正在分配)、5(已失效)、6(未分配),则将 ip 资源设置为 2(即将过期)
} else if (x.getValidTime() <= Instant.now().plusSeconds(60 * 60 * 24 * 7).toEpochMilli() && x.getValidTime() > Instant.now().toEpochMilli()) { } else if (x.getValidTime() <= Instant.now().plusSeconds(60 * 60 * 24 * 7).toEpochMilli() && x.getValidTime() > Instant.now().toEpochMilli()) {
if (x.getStatus() != 5 && x.getStatus() != 3 && x.getStatus() != 6) { if (x.getStatus() != 5 && x.getStatus() != 3 && x.getStatus() != 6 && x.getStatus() != 9 ) {
ipResourceRepository.updateStatus(x.getId(), 2); ipResourceRepository.updateStatus(x.getId(), 2);
} }
// 1.3 ip资源在七天前到期,且 ip 资源的状态不是 3(正在分配)、6(未分配),则删除 ip 资源 // 1.3 ip资源在七天前到期,且 ip 资源的状态不是 3(正在分配)、6(未分配),则删除 ip 资源
} else if (x.getValidTime() <= Instant.now().minusSeconds(60 * 60 * 24 * 7).toEpochMilli() && x.getStatus() != 3 && x.getStatus() != 6) { } else if (x.getValidTime() <= Instant.now().minusSeconds(60 * 60 * 24 * 7).toEpochMilli() && x.getStatus() != 3 && x.getStatus() != 6 && x.getStatus() != 9) {
if (x.getIpType() == IpType.VENDOR) { if (x.getIpType() == IpType.VENDOR) {
IpResourceRequestDto ipResourceRequestDto = new IpResourceRequestDto(); IpResourceRequestDto ipResourceRequestDto = new IpResourceRequestDto();
ipResourceRequestDto.setAddr(Arrays.asList(x.getAddr())); ipResourceRequestDto.setAddr(Arrays.asList(x.getAddr()));
...@@ -756,7 +756,7 @@ public class IpResourceServiceImpl implements IpResourceService { ...@@ -756,7 +756,7 @@ public class IpResourceServiceImpl implements IpResourceService {
return; return;
// 1.4 ip资源到期,且 ip 资源的状态不是 3(正在分配)、6(未分配),则设置 ip 资源的状态为 1(已过期) // 1.4 ip资源到期,且 ip 资源的状态不是 3(正在分配)、6(未分配),则设置 ip 资源的状态为 1(已过期)
} else if (x.getValidTime() <= Instant.now().toEpochMilli() && x.getStatus() != 3 && x.getStatus() != 6) { } else if (x.getValidTime() <= Instant.now().toEpochMilli() && x.getStatus() != 3 && x.getStatus() != 6 && x.getStatus() != 9) {
// 这个地方可变参数随便传啥都行 // 这个地方可变参数随便传啥都行
ipResourceRepository.updateStatus(x.getId(), 1); ipResourceRepository.updateStatus(x.getId(), 1);
......
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