1:解决maat测试程序组装数据的问题
2:解决取消域配置,某些域配置无法取消的问题
This commit is contained in:
@@ -258,11 +258,11 @@ public class MaatTestController {
|
|||||||
List<NumRegion> numList = new ArrayList<NumRegion>();
|
List<NumRegion> numList = new ArrayList<NumRegion>();
|
||||||
List<StrRegion> strList = new ArrayList<StrRegion>();
|
List<StrRegion> strList = new ArrayList<StrRegion>();
|
||||||
List<DigestRegion> digestList = new ArrayList<DigestRegion>();
|
List<DigestRegion> digestList = new ArrayList<DigestRegion>();
|
||||||
configCompile.setIpRegionList(ipList);
|
// configCompile.setIpRegionList(ipList);
|
||||||
configCompile.setNumRegionList(numList);
|
// configCompile.setNumRegionList(numList);
|
||||||
configCompile.setStrRegionList(strList);
|
// configCompile.setStrRegionList(strList);
|
||||||
configCompile.setDigestRegionList(digestList);
|
// configCompile.setDigestRegionList(digestList);
|
||||||
configCompile.setIpClientRangeList(ipList);
|
// configCompile.setIpClientRangeList(ipList);
|
||||||
if (tableType == 12 || tableType == 18) {
|
if (tableType == 12 || tableType == 18) {
|
||||||
ipList = new ArrayList<IpRegion>();
|
ipList = new ArrayList<IpRegion>();
|
||||||
if (tableNameArr.length == 1) {
|
if (tableNameArr.length == 1) {
|
||||||
@@ -379,7 +379,11 @@ public class MaatTestController {
|
|||||||
strRegion.setGroupId(groupId);
|
strRegion.setGroupId(groupId);
|
||||||
strRegion.setRegionId(configRedisService.getIncrId("SEQ_REGIONID"));
|
strRegion.setRegionId(configRedisService.getIncrId("SEQ_REGIONID"));
|
||||||
strRegion.setTableName(ServiceAndRDBIndexReal.getMaatTableName(service, type, tableName));
|
strRegion.setTableName(ServiceAndRDBIndexReal.getMaatTableName(service, type, tableName));
|
||||||
|
if(type==15) {
|
||||||
|
strRegion.setDistrict("增强字符串测试groupid"+groupId);
|
||||||
|
}else {
|
||||||
strRegion.setDistrict("");
|
strRegion.setDistrict("");
|
||||||
|
}
|
||||||
strRegion.setKeywords("keywords,UUID:" + UUID.randomUUID());
|
strRegion.setKeywords("keywords,UUID:" + UUID.randomUUID());
|
||||||
strRegion.setExprType(1);
|
strRegion.setExprType(1);
|
||||||
strRegion.setMatchMethod(1);
|
strRegion.setMatchMethod(1);
|
||||||
|
|||||||
@@ -687,7 +687,7 @@ public class ConfigJedisServiceimpl implements ConfigRedisService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (isReuse && (type == 12 || type == 13 || type == 14)) {// 将数据往临时库复制一份,无论临时库里有没有都可以直接写,有则覆盖,不影响
|
} else if (isReuse && (type == 12 || type == 13 || type == 14|| type == 15|| type == 18)) {// 将数据往临时库复制一份,无论临时库里有没有都可以直接写,有则覆盖,不影响
|
||||||
int tmpStorageReuseRegionDB = Configurations.getIntProperty("tmpStorageReuseRegionDB", 15);
|
int tmpStorageReuseRegionDB = Configurations.getIntProperty("tmpStorageReuseRegionDB", 15);
|
||||||
transaction.select(tmpStorageReuseRegionDB);
|
transaction.select(tmpStorageReuseRegionDB);
|
||||||
transaction.set(maatKey.toUpperCase(), valBF.toString());
|
transaction.set(maatKey.toUpperCase(), valBF.toString());
|
||||||
@@ -1048,8 +1048,11 @@ public class ConfigJedisServiceimpl implements ConfigRedisService {
|
|||||||
// 如果只有一个编译id且与上面的编译id相同则说明未被分组复用,可以将其下的所有域置失效,否则不处理域配置,只把编译,分组关系置为无效
|
// 如果只有一个编译id且与上面的编译id相同则说明未被分组复用,可以将其下的所有域置失效,否则不处理域配置,只把编译,分组关系置为无效
|
||||||
if (compileId.equals(compileStr)) {//
|
if (compileId.equals(compileStr)) {//
|
||||||
String groupRegionKey = groupId.replace("GROUPCOMPILE", "GROUPREGION");// groupregion里面value是region的信息,key是group的信息,所以可以直接将GROUPCOMPILE替换为GROUPREGION
|
String groupRegionKey = groupId.replace("GROUPCOMPILE", "GROUPREGION");// groupregion里面value是region的信息,key是group的信息,所以可以直接将GROUPCOMPILE替换为GROUPREGION
|
||||||
String regionStr = getRegionInfo(
|
String regionStrs = JedisUtils.get(groupRegionKey, idRelaRedisDBIndex);
|
||||||
JedisUtils.get(groupRegionKey, idRelaRedisDBIndex));
|
if (regionStrs != null && !regionStrs.trim().equals("")) {
|
||||||
|
String[] regionStrArr = regionStrs.split(";");
|
||||||
|
for (String str : regionStrArr) {
|
||||||
|
String regionStr = getRegionInfo(str);
|
||||||
if (regionStr != null && !regionStr.trim().equals("")) {
|
if (regionStr != null && !regionStr.trim().equals("")) {
|
||||||
String[] regionKeyArr = regionStr.split(";");
|
String[] regionKeyArr = regionStr.split(";");
|
||||||
if (regionKeyArr != null && regionKeyArr.length > 0) {
|
if (regionKeyArr != null && regionKeyArr.length > 0) {
|
||||||
@@ -1058,13 +1061,14 @@ public class ConfigJedisServiceimpl implements ConfigRedisService {
|
|||||||
service, transaction, redisDBIndex);
|
service, transaction, redisDBIndex);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new ServiceRuntimeException(
|
throw new ServiceRuntimeException("从" + idRelaRedisDBIndex
|
||||||
"从" + idRelaRedisDBIndex + "号redis库中无法获取MAAT配置分组与域的关联关系,key为"
|
+ "号redis库中无法获取MAAT配置分组与域的关联关系,key为" + groupRegionKey,
|
||||||
+ groupRegionKey,
|
|
||||||
RestBusinessCode.KeyNotExistsInRedis.getValue());
|
RestBusinessCode.KeyNotExistsInRedis.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// 根据分组与编译关联关系找到对应分组配置然后删除(重命名)
|
// 根据分组与编译关联关系找到对应分组配置然后删除(重命名)
|
||||||
removeCompileAndGroupConfig(maatXmlConfig, groupId.replace("GROUPCOMPILE:", ""), 11,
|
removeCompileAndGroupConfig(maatXmlConfig, groupId.replace("GROUPCOMPILE:", ""), 11,
|
||||||
maatVersion, service, transaction, redisDBIndex, id + "");// 11代表是分组配置
|
maatVersion, service, transaction, redisDBIndex, id + "");// 11代表是分组配置
|
||||||
|
|||||||
Reference in New Issue
Block a user