parent
ef440833a8
commit
e82a902acd
|
@ -26,7 +26,7 @@ public class AreaInfoDetail {
|
|||
/**
|
||||
* The Total netflow.
|
||||
*/
|
||||
private Integer totalNetflow;
|
||||
private Long totalNetflow;
|
||||
/**
|
||||
* The Capacity type.
|
||||
*/
|
||||
|
|
|
@ -57,5 +57,5 @@ public class AddCapacityInfo {
|
|||
/**
|
||||
* The Reserve netflow.
|
||||
*/
|
||||
private Integer reserveNetflow;
|
||||
private Long reserveNetflow;
|
||||
}
|
||||
|
|
|
@ -70,5 +70,5 @@ public class DisposeCapacity implements Serializable {
|
|||
/**
|
||||
* The Reserve netflow.
|
||||
*/
|
||||
private Integer reserveNetflow;
|
||||
private Long reserveNetflow;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ public interface AreaCodeManagerService {
|
|||
* @param areaCode the area code
|
||||
* @return the area code group reserve netflow
|
||||
*/
|
||||
int getAreaCodeGroupReserveNetflow(Integer areaCode);
|
||||
long getAreaCodeGroupReserveNetflow(Integer areaCode);
|
||||
|
||||
/**
|
||||
* Gets area code online device num.
|
||||
|
|
|
@ -57,13 +57,13 @@ public class AreaCodeManagerServiceImpl implements AreaCodeManagerService {
|
|||
* @return the area code group reserve netflow
|
||||
*/
|
||||
@Override
|
||||
public int getAreaCodeGroupReserveNetflow(Integer areaCode) {
|
||||
public long getAreaCodeGroupReserveNetflow(Integer areaCode) {
|
||||
List<DisposeDevice> disposeDevices = disposeDeviceManagerService.getAllDisposeDevice();
|
||||
return disposeDevices.stream()
|
||||
.filter(v -> v.getAreaCode().equals(areaCode) && v.getStatus() == ObjectStatus.NORMAL)
|
||||
.mapToInt(v -> v.getDevCapacity().stream()
|
||||
.mapToLong(v -> v.getDevCapacity().stream()
|
||||
.filter(k -> k.getCapacityType() == DisposeCapacityType.CLEANUP)
|
||||
.mapToInt(m -> Optional.ofNullable(m.getReserveNetflow()).orElse(0))
|
||||
.mapToLong(m -> Optional.ofNullable(m.getReserveNetflow()).orElse(0L))
|
||||
.sum())
|
||||
.sum();
|
||||
}
|
||||
|
|
|
@ -351,7 +351,7 @@ public class P2Info {
|
|||
.objectType(DisposeObjectType.IP)
|
||||
.ipType(IpAddrType.IPV4_IPV6)
|
||||
.protectIp("0.0.0.0")
|
||||
.reserveNetflow(30)
|
||||
.reserveNetflow(30L)
|
||||
.build()
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue