测试提交
This commit is contained in:
@@ -29,7 +29,7 @@ public class ConfigCompile implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 546753235262247839L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ApiModelProperty(value = "配置ID", required = true)
|
||||
private Long compileId;
|
||||
@ApiModelProperty(value = "业务ID", required = true)
|
||||
@@ -87,7 +87,9 @@ public class ConfigCompile implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "生效范围IP域分组列表", required = true)
|
||||
private List<IpRegion> ipClientRangeList;
|
||||
|
||||
@ApiModelProperty(value = "取消配置时需要保留哪些组", required = false)
|
||||
private List<ConfigGroupRelation> keepGroupList;
|
||||
|
||||
public Long getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
@@ -399,4 +401,13 @@ public class ConfigCompile implements Serializable {
|
||||
this.ipClientRangeList = ipClientRangeList;
|
||||
}
|
||||
|
||||
public List<ConfigGroupRelation> getKeepGroupList() {
|
||||
return keepGroupList;
|
||||
}
|
||||
|
||||
public void setKeepGroupList(List<ConfigGroupRelation> keepGroupList) {
|
||||
this.keepGroupList = keepGroupList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public class ConfigGroupRelation implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -9021829042309605139L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ApiModelProperty(value = "分组ID", required = true)
|
||||
private Long groupId;
|
||||
@ApiModelProperty(value = "编译ID", required = true)
|
||||
@@ -36,7 +36,8 @@ public class ConfigGroupRelation implements Serializable {
|
||||
@ApiModelProperty(value = "操作时间", required = true)
|
||||
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date opTime;
|
||||
|
||||
@ApiModelProperty(value = "标志当前组是否是公共组", required = false)
|
||||
private Integer isCommonGroup;//1是公共组,0不是公共组
|
||||
|
||||
/**
|
||||
* @return groupId
|
||||
@@ -98,4 +99,15 @@ public class ConfigGroupRelation implements Serializable {
|
||||
this.opTime = opTime;
|
||||
}
|
||||
|
||||
public Integer getIsCommonGroup() {
|
||||
return isCommonGroup;
|
||||
}
|
||||
|
||||
public void setIsCommonGroup(Integer isCommonGroup) {
|
||||
this.isCommonGroup = isCommonGroup;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -164,6 +164,11 @@ public enum RestBusinessCode {
|
||||
*/
|
||||
AffairIdIsNull(4001024, "Maat配置的affairId不能为空"),
|
||||
|
||||
/**
|
||||
* Maat配置的keepGroupIdList应该为空
|
||||
*/
|
||||
GroupidShouldNull(4001025, "Maat配置的keepGroupIdList应该为空"),
|
||||
|
||||
//分组配置数据完整性业务码10100~
|
||||
|
||||
/**
|
||||
|
||||
@@ -237,8 +237,8 @@ public final class Constants {
|
||||
public static final int TAPREDISDB = Configurations.getIntProperty("tapRedisDb", 5);
|
||||
//webfocus库db
|
||||
public static final int WEBFOCUSREDISDB = Configurations.getIntProperty("webFocusDb", 7);
|
||||
//记录公共组向哪些redis-db写入
|
||||
public static final String[] COMMONGROUPDB =org.apache.commons.lang.StringUtils.split(Configurations.getStringProperty("commonGroupDb", "2,3,4,5,7"), ",");
|
||||
//记录公共组向哪些redis-db写入
|
||||
public static final String[] COMMONGROUPDBARR =org.apache.commons.lang.StringUtils.split(Configurations.getStringProperty("commonGroupDb", "2,3,4,5,7"), ",");
|
||||
//流量统计趋势图粒度
|
||||
public static final int TREND_TIME_INTERVAL = Configurations.getIntProperty("traffic.trend.timeInterval", 5);
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ public class MaatTestController {
|
||||
// }
|
||||
// }
|
||||
try {
|
||||
if (!configRedisService.delMaatConfig(compileMap,false)) {
|
||||
if (!configRedisService.delMaatConfig(compileMap,false,null)) {
|
||||
FileUtils.addStrToFile(
|
||||
sdf.format(new Date()) + "\t" + "error:删除业务类型" + serviceType + "下的maat配置" + configId + "失败\n",
|
||||
Configurations.getStringProperty("maatTestLogPath", ""), true);
|
||||
|
||||
@@ -258,7 +258,7 @@ public class ConfigSourcesService extends BaseService {
|
||||
}
|
||||
}
|
||||
logger.info("---------------调用Redis maat配置新增接口---------------------");
|
||||
configRedisService.saveMaatConfig(configMap);
|
||||
configRedisService.saveMaatConfig(configMap,new ArrayList<>(commonGroupIdSet));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -364,7 +364,7 @@ public class ConfigSourcesService extends BaseService {
|
||||
compileMap.put(config.getService(), idList);
|
||||
}
|
||||
if (isValid == 0) {
|
||||
List<ConfigGroupRelation> keepGroupIdList = config.getKeepGroupIdList();
|
||||
List<ConfigGroupRelation> keepGroupIdList = config.getKeepGroupList();
|
||||
if (keepGroupIdList != null && keepGroupIdList.size() > 0) {
|
||||
for (ConfigGroupRelation group : keepGroupIdList) {
|
||||
if (compileGroupMap.containsKey(config.getCompileId())) {
|
||||
@@ -435,7 +435,7 @@ public class ConfigSourcesService extends BaseService {
|
||||
throw new RestServiceException("编译配置id为" + config.getCompileId() + "的IsValid字段不能为空",
|
||||
RestBusinessCode.IsValidIsNull.getValue());
|
||||
}
|
||||
if (isValid == 1 && (config.getKeepGroupIdList() != null && config.getKeepGroupIdList().size() > 0)) {
|
||||
if (isValid == 1 && (config.getKeepGroupList() != null && config.getKeepGroupList().size() > 0)) {
|
||||
throw new RestServiceException("编译配置id为" + config.getCompileId() + "的配置在将状态改为生效时keepGroupIdList必须为空",
|
||||
RestBusinessCode.GroupidShouldNull.getValue());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user