From a40a7d7f7c65a72dc86fd2503adb1336dfb3ff6e Mon Sep 17 00:00:00 2001 From: HuangXin Date: Mon, 25 Jan 2021 14:34:42 +0800 Subject: [PATCH] =?UTF-8?q?OCT=20REM:=201.=20=E6=9B=B4=E6=AD=A3=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E9=98=B2=E6=8A=A4=E5=AF=B9=E8=B1=A1=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=90=8D=E7=A7=B0=E4=B8=8D=E6=AD=A3=E7=A1=AE?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=B7=BB=E5=8A=A0=E9=98=B2=E6=8A=A4=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=E8=A2=AB=E5=88=A0=E9=99=A4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ability/impl/DpTechBypassAbilityImpl.java | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/dispose/ability/impl/DpTechBypassAbilityImpl.java b/src/main/java/com/dispose/ability/impl/DpTechBypassAbilityImpl.java index b729cba8..4c7bc47c 100644 --- a/src/main/java/com/dispose/ability/impl/DpTechBypassAbilityImpl.java +++ b/src/main/java/com/dispose/ability/impl/DpTechBypassAbilityImpl.java @@ -241,10 +241,10 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl { } /** - * Gets traction strategy format. + * Gets ip segment format. * - * @param ipSegment the dispose object - * @return the traction strategy format + * @param ipSegment the ip segment + * @return the ip segment format */ private String getIpSegmentFormat(String ipSegment) { for (String v : ConstValue.IP_SEGMENT_SPILT) { @@ -570,10 +570,7 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl { } for (String protectName : protectNames) { - String serviceId = protectName - .replace(objectPrefix + "_", "") - .replace("_" + IpAddrType.IPV4.getDescription(), "") - .replace("_" + IpAddrType.IPV6.getDescription(), ""); + String serviceId = getUserServiceId(protectName); // UMC上面存在对象已经失效 if (disposeServiceGroup.values().stream().noneMatch(k -> serviceId.equals(k.getServiceId()))) { @@ -605,6 +602,16 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl { } } + /** + * Gets user service id. + * + * @param projectObjName the project obj name + * @return the user service id + */ + private String getUserServiceId(String projectObjName) { + return projectObjName.substring(objectPrefix.length() + 2); + } + /** * Gets traction strategy name. *