(1)调整删除配置方法

(2)多域IP修改时取消勾选,后台直接删除
This commit is contained in:
wangxin
2018-04-09 12:49:19 +08:00
parent 116087c068
commit 33382d4712
10 changed files with 35 additions and 134 deletions

View File

@@ -721,6 +721,7 @@ public class MultipleCfgController extends BaseController{
model.addAttribute("action",cfg.getAction());
try{
List<ServiceConfigInfo> serviceConfigInfos=serviceConfigInfoService.findList(cfg.getServiceId());
List<BaseCfg> deleteCfg=new ArrayList<>();
Integer compileId=0;
if(operator.equals("save")){
compileId=new ConvertTool().getCompileId();
@@ -746,6 +747,15 @@ public class MultipleCfgController extends BaseController{
}
}
}
}else{//表单没有提交IP配置但是根据编译ID却查到了IP配置说明用户选择删除IP配置
BaseIpCfg entity=new BaseIpCfg();
entity.setTableName(info.getTableName());
entity.setCompileId(compileId);
BaseIpCfg resultIp=ipCfgService.get(entity);
if(resultIp!=null){
resultIp.setTableName(info.getTableName());
deleteCfg.add(resultIp);
}
}
}else if(Constants.TABLE_TYPE_STRING==info.getTableType()){
if(cfg.getStringCfg()!=null){
@@ -810,7 +820,7 @@ public class MultipleCfgController extends BaseController{
if("save".equals(operator)){
multipleCfgService.addCfg(cfg);
}else if("update".equals(operator)){
multipleCfgService.updateCfg(cfg);
multipleCfgService.updateCfg(cfg,deleteCfg);
}
addMessage(model,"save_success");
}catch (Exception e) {