(1)config_group_info新增一列compile_id,用于存放app_ip_cfg的compile_id,防止app_ip_cfg的数据被误清的情况下获取不到正确的编译ID

(2)IP_TYPE去掉46,64,10三种类型
This commit is contained in:
wangxin
2018-09-26 17:43:50 +08:00
parent 7d0add8079
commit 135b66c6f5
5 changed files with 31 additions and 9 deletions

View File

@@ -335,11 +335,11 @@ public class AppCfgService extends BaseService {
compileId=beforeCfg.get(0).getCompileId();
}
}else if(configGroupInfo.getIsIssued().intValue()==1){//下发过了
List<AppIpCfg> beforeCfg=appCfgDao.getAppIpCfgBySpecServiceId(entity.getSpecServiceId());
if(beforeCfg==null||beforeCfg.size()==0) {
throw new RuntimeException("Can't get compileId, there is not app ip in an issued group");
}
compileId=beforeCfg.get(0).getCompileId();
// List<AppIpCfg> beforeCfg=appCfgDao.getAppIpCfgBySpecServiceId(entity.getSpecServiceId());
// if(beforeCfg==null||beforeCfg.size()==0) {
// throw new RuntimeException("Can't get compileId, there is not app ip in an issued group");
// }
compileId=configGroupInfo.getCompileId();
}else {
throw new RuntimeException("Unknown configGroupInfo isIssued value");
}
@@ -350,6 +350,11 @@ public class AppCfgService extends BaseService {
entity.setIsValid(0);
entity.setIsAudit(0);
appCfgDao.insertAppIpCfg(entity);
//app ip的编译ID存于configGroupInfo中
if((configGroupInfo.getCompileId()==null)||(compileId.intValue()!=configGroupInfo.getCompileId().intValue())) {
configGroupInfo.setCompileId(entity.getCompileId());
specificServiceCfgDao.updateConfigGroupInfobyGroupId(configGroupInfo);
}
// 保存区域IP信息
if (entity.getAreaCfg() != null) {
for (AreaIpCfg cfg : entity.getAreaCfg()) {
@@ -1102,6 +1107,7 @@ public class AppCfgService extends BaseService {
configGroupInfo.setGroupId(specificServiceCfg.getGroupId());
configGroupInfo.setGroupName(specificServiceCfg.getSpecServiceName());
configGroupInfo.setIsIssued(0);
configGroupInfo.setCompileId(entitys.get(0).getCompileId());
configGroupInfo.setGroupType(1);
specificServiceCfgDao.insertConfigGroupInfo(configGroupInfo);
//更新group_id