REM:
1. 修改迪普防护对象名称字符串长度要求
This commit is contained in:
HuangXin 2021-01-25 10:50:57 +08:00
parent 1165e7e690
commit 20ba8158a2
2 changed files with 40 additions and 36 deletions

View File

@ -54,7 +54,7 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
/**
* The Object prefix.
*/
private final String objectPrefix = "CMHI";
private final String objectPrefix = "C";
/**
* The All cleanup devices.
*/
@ -63,7 +63,7 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
/**
* The Dp bypass manager.
*/
private DpBypassManager dpBypassManager = DpBypassManager.builder()
private final DpBypassManager dpBypassManager = DpBypassManager.builder()
.protectObject(new Hashtable<>())
.protectStrategy(new Hashtable<>())
.tractionStrategyName(new Hashtable<>())
@ -596,8 +596,10 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
* @return the protect object name
*/
private String getProtectObjectName(String serviceId, IpAddrType ipAddrType) {
if (IpAddrType.IPV4.equals(ipAddrType) || IpAddrType.IPV6.equals(ipAddrType)) {
return objectPrefix + "_" + serviceId + "_" + ipAddrType.getDescription();
if (IpAddrType.IPV4.equals(ipAddrType)) {
return objectPrefix + "4" + "_" + serviceId;
} else if (IpAddrType.IPV6.equals(ipAddrType)) {
return objectPrefix + "6" + "_" + serviceId;
} else {
return objectPrefix + "_" + serviceId;
}

View File

@ -11,6 +11,7 @@ import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
/**
* The type User svr info.
@ -26,6 +27,7 @@ public class UserSvrInfo {
* The Business id.
*/
@NotBlank(message = "businessId 客户业务ID能为空", groups = ValidGroups.AddUserInfoValid.class)
@Size(min = 1, max = 13, message = "businessId 字符串长度为 [1, 13]", groups = ValidGroups.AddUserInfoValid.class)
private String businessId;
/**
* The Business type.