From e82a902acdc89f8c7a03cf28b396dbbe65f3b217 Mon Sep 17 00:00:00 2001 From: HuangXin Date: Fri, 25 Sep 2020 15:22:57 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E6=B8=85=E6=B4=97=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=94=AF=E6=8C=81=E5=B8=A6=E5=AE=BD=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E6=94=B9=E4=B8=BALong=EF=BC=8C=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E5=8D=95=E4=BD=8D=E4=B8=BAMByte?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pojo/dto/protocol/device/info/AreaInfoDetail.java | 2 +- .../pojo/dto/protocol/device/manager/AddCapacityInfo.java | 2 +- src/main/java/com/dispose/pojo/entity/DisposeCapacity.java | 2 +- .../java/com/dispose/service/AreaCodeManagerService.java | 2 +- .../dispose/service/impl/AreaCodeManagerServiceImpl.java | 6 +++--- src/test/java/com/dispose/test/testcase/qa/v200/P2Info.java | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) 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() );