inlineip增加区域管控

This commit is contained in:
zhanghongqing
2018-11-26 18:20:22 +08:00
parent 4caa6a486b
commit ec574ad5d4
2 changed files with 27 additions and 2 deletions

View File

@@ -11,6 +11,10 @@ package com.nis.domain.callback;
import java.util.Date; import java.util.Date;
import com.google.gson.annotations.Expose; import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import com.nis.util.StringUtils;
import com.nis.web.service.SpringContextHolder;
import com.nis.web.service.basics.SysDictInfoService;
/** /**
* @ClassName: InlineIp.java * @ClassName: InlineIp.java
@@ -58,7 +62,9 @@ public class InlineIp {
private Integer policyGroup; private Integer policyGroup;
@Expose @Expose
private String userRegion;//用于存储协议跟流量阀值 private String userRegion;//用于存储协议跟流量阀值
@Expose
@SerializedName("effectiveRange")
private String areaEffectiveIds ;
public String getUserRegion() { public String getUserRegion() {
return userRegion; return userRegion;
@@ -302,5 +308,23 @@ public class InlineIp {
public void setPolicyGroup(Integer policyGroup) { public void setPolicyGroup(Integer policyGroup) {
this.policyGroup = policyGroup; this.policyGroup = policyGroup;
} }
public String getAreaEffectiveIds() {
return areaEffectiveIds;
}
/**
* areaEffectiveIds
* areaEffectiveIds=7242:5,7212:4,7122:3
* 接口要求格式为72425,72124,71223
* @param areaEffectiveIds
*/
public void setAreaEffectiveIds(String areaEffectiveIds) {
if(StringUtils.isEmpty(areaEffectiveIds)){
areaEffectiveIds="0";
}else {
// 组织区域、运营商配置下发格式
SysDictInfoService service = SpringContextHolder.getBean(SysDictInfoService.class);
areaEffectiveIds = service.setEffectiveRange(areaEffectiveIds);
}
this.areaEffectiveIds = areaEffectiveIds;
}
} }

View File

@@ -1265,6 +1265,7 @@ public abstract class BaseService {
ip.setIsValid(cfg.getIsValid()); ip.setIsValid(cfg.getIsValid());
ip.setOpTime(cfg.getAuditTime()); ip.setOpTime(cfg.getAuditTime());
ip.setPolicyGroup(policyGroup); ip.setPolicyGroup(policyGroup);
ip.setAreaEffectiveIds(cfg.getAreaEffectiveIds());//添加区域管控
return ip; return ip;
} }