diff --git a/src/main/java/com/dispose/pojo/dto/protocol/device/info/AreaInfoDetail.java b/src/main/java/com/dispose/pojo/dto/protocol/device/info/AreaInfoDetail.java index f4d2d4ef..57a34f14 100644 --- a/src/main/java/com/dispose/pojo/dto/protocol/device/info/AreaInfoDetail.java +++ b/src/main/java/com/dispose/pojo/dto/protocol/device/info/AreaInfoDetail.java @@ -26,7 +26,7 @@ public class AreaInfoDetail { /** * The Total netflow. */ - private Integer totalNetflow; + private Long totalNetflow; /** * The Capacity type. */ diff --git a/src/main/java/com/dispose/pojo/dto/protocol/device/manager/AddCapacityInfo.java b/src/main/java/com/dispose/pojo/dto/protocol/device/manager/AddCapacityInfo.java index a9a8fa6e..8dd991a8 100644 --- a/src/main/java/com/dispose/pojo/dto/protocol/device/manager/AddCapacityInfo.java +++ b/src/main/java/com/dispose/pojo/dto/protocol/device/manager/AddCapacityInfo.java @@ -57,5 +57,5 @@ public class AddCapacityInfo { /** * The Reserve netflow. */ - private Integer reserveNetflow; + private Long reserveNetflow; } diff --git a/src/main/java/com/dispose/pojo/entity/DisposeCapacity.java b/src/main/java/com/dispose/pojo/entity/DisposeCapacity.java index 5adee2d1..5c2b111a 100644 --- a/src/main/java/com/dispose/pojo/entity/DisposeCapacity.java +++ b/src/main/java/com/dispose/pojo/entity/DisposeCapacity.java @@ -70,5 +70,5 @@ public class DisposeCapacity implements Serializable { /** * The Reserve netflow. */ - private Integer reserveNetflow; + private Long reserveNetflow; } diff --git a/src/main/java/com/dispose/service/AreaCodeManagerService.java b/src/main/java/com/dispose/service/AreaCodeManagerService.java index 22badfc5..f2b6864d 100644 --- a/src/main/java/com/dispose/service/AreaCodeManagerService.java +++ b/src/main/java/com/dispose/service/AreaCodeManagerService.java @@ -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. diff --git a/src/main/java/com/dispose/service/impl/AreaCodeManagerServiceImpl.java b/src/main/java/com/dispose/service/impl/AreaCodeManagerServiceImpl.java index c72587d7..b6c12278 100644 --- a/src/main/java/com/dispose/service/impl/AreaCodeManagerServiceImpl.java +++ b/src/main/java/com/dispose/service/impl/AreaCodeManagerServiceImpl.java @@ -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 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(); } diff --git a/src/test/java/com/dispose/test/testcase/qa/v200/P2Info.java b/src/test/java/com/dispose/test/testcase/qa/v200/P2Info.java index 4d9c5ebd..8225a776 100644 --- a/src/test/java/com/dispose/test/testcase/qa/v200/P2Info.java +++ b/src/test/java/com/dispose/test/testcase/qa/v200/P2Info.java @@ -351,7 +351,7 @@ public class P2Info { .objectType(DisposeObjectType.IP) .ipType(IpAddrType.IPV4_IPV6) .protectIp("0.0.0.0") - .reserveNetflow(30) + .reserveNetflow(30L) .build() );