(1)调整删除配置方法
(2)多域IP修改时取消勾选,后台直接删除
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user