1:修改asn-ip添加user-region字段,三个支持分组复用的配置都要添加user-region字段了,所以service字段就不需要了
2:修改nms上传接口时判断有问题的机器列表list是否为空
This commit is contained in:
@@ -25,8 +25,8 @@ public class GroupReuse implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
// ASN-IP阻断和监测不用传service和ipregion.userRegion字段,当是app协议ip业务时需要传入ipregion.userRegion字段
|
||||
@ApiModelProperty(value = "业务ID", required = true)
|
||||
private Integer service;
|
||||
// @ApiModelProperty(value = "业务ID", required = true)
|
||||
// private Integer service;
|
||||
|
||||
@ApiModelProperty(value = "字符串域分组列表", access = "", required = true)
|
||||
private List<StrRegion> strRegionList;
|
||||
@@ -83,11 +83,4 @@ public class GroupReuse implements Serializable {
|
||||
this.numRegionList = numRegionList;
|
||||
}
|
||||
|
||||
public Integer getService() {
|
||||
return service;
|
||||
}
|
||||
|
||||
public void setService(Integer service) {
|
||||
this.service = service;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,14 +98,14 @@ public class GroupReuseVal {
|
||||
for (IpRegion ipRegion : ipRegionList) {
|
||||
// if (groupReuse.getIsValid() != 0 &&
|
||||
// !regionGroupIdList.contains(ipRegion.getGroupId())) {
|
||||
if (!StringUtil.isEmpty(groupReuse.getService())) {
|
||||
if (groupReuse.getService().intValue()!=1028) {
|
||||
throw new RestServiceException("ipRegionList中的regionId为"
|
||||
+ ipRegion.getRegionId()
|
||||
+ "的域配置的service只能为空或1028",
|
||||
RestBusinessCode.ReUseServiceRange
|
||||
.getValue());
|
||||
}
|
||||
// if (!StringUtil.isEmpty(groupReuse.getService())) {
|
||||
// if (groupReuse.getService().intValue()!=1028) {
|
||||
// throw new RestServiceException("ipRegionList中的regionId为"
|
||||
// + ipRegion.getRegionId()
|
||||
// + "的域配置的service只能为空或1028",
|
||||
// RestBusinessCode.ReUseServiceRange
|
||||
// .getValue());
|
||||
// }
|
||||
if (StringUtil.isEmpty(ipRegion.getUserRegion())) {
|
||||
throw new RestServiceException("ipRegionList中的regionId为"
|
||||
+ ipRegion.getRegionId()
|
||||
@@ -113,7 +113,7 @@ public class GroupReuseVal {
|
||||
RestBusinessCode.ReUseUserRegionIsNull
|
||||
.getValue());
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
if (!StringUtil.isEmpty(ipRegion.getTableName())
|
||||
&& !groupReuseRegionMap.get("ipRegion").contains(ipRegion.getTableName())) {
|
||||
|
||||
@@ -1445,7 +1445,7 @@ public class ConfigJedisServiceimpl implements ConfigRedisService {
|
||||
}
|
||||
|
||||
private void addTmpReion(List<Map<String, String>> regionMapList, MaatXmlConfig maatXmlConfig,
|
||||
Transaction transaction, int type, int tmpStorageReuseRegionDB, int idRelaRedisDBIndex, Integer service) {
|
||||
Transaction transaction, int type, int tmpStorageReuseRegionDB, int idRelaRedisDBIndex, Integer service1) {
|
||||
if (regionMapList != null && regionMapList.size() > 0) {
|
||||
for (Map<String, String> map : regionMapList) {
|
||||
List<MaatXmlExpr> expressionList = maatXmlConfig.getExpressionList();
|
||||
@@ -1488,8 +1488,9 @@ public class ConfigJedisServiceimpl implements ConfigRedisService {
|
||||
for (String valStr : valSplit) {
|
||||
if (!StringUtils.isEmpty(valStr) && valStr.trim().startsWith("[")) {
|
||||
valStr = valStr.trim().replace("[", "").replace("]", "");
|
||||
if (service != null && service.intValue() == 1028
|
||||
&& valStr.toLowerCase().equals("op_time") && type == 12) {
|
||||
// if (service != null && service.intValue() == 1028
|
||||
// && valStr.toLowerCase().equals("op_time") && type == 12) {
|
||||
if (valStr.toLowerCase().equals("op_time") && type == 12) {
|
||||
String user_region = map.get("user_region");
|
||||
valBF.append(user_region + "\t");
|
||||
}
|
||||
|
||||
@@ -864,7 +864,7 @@ public class ConfigSourcesService extends BaseService {
|
||||
} else {
|
||||
maatConfig.getIpRegionMapList().addAll(dstMapList);
|
||||
}
|
||||
maatConfig.setService(groupReuse.getService());
|
||||
//maatConfig.setService(groupReuse.getService());
|
||||
list.add(maatConfig);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,11 @@ public class TrafficNmsServerStatisticService {
|
||||
public void saveNmsInfo(List<TrafficNmsServerStatistic> trafficNmsServerList) {
|
||||
for (TrafficNmsServerStatistic trafficNmsServerStatistic : trafficNmsServerList) {
|
||||
trafficNmsServerStatisticDao.insert(trafficNmsServerStatistic);
|
||||
trafficNmsServerStatisticDao.insertAbnormalMachine(trafficNmsServerStatistic.getId(),
|
||||
trafficNmsServerStatistic.getAbnormalMachineList());
|
||||
if (trafficNmsServerStatistic.getAbnormalMachineList() != null
|
||||
&& trafficNmsServerStatistic.getAbnormalMachineList().size() > 0) {
|
||||
trafficNmsServerStatisticDao.insertAbnormalMachine(trafficNmsServerStatistic.getId(),
|
||||
trafficNmsServerStatistic.getAbnormalMachineList());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user