1、增加NTC_BGP_AS配置域
2、增加Subcribe ID配置域 3、增加do_log
This commit is contained in:
@@ -13,6 +13,8 @@ import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcBgpAsCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
||||
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
||||
@@ -27,6 +29,7 @@ import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
||||
import com.nis.web.dao.configuration.BgpCfgDao;
|
||||
import com.nis.web.dao.configuration.StringCfgDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
@@ -40,13 +43,22 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
||||
@Autowired
|
||||
protected BgpCfgDao bgpCfgDao;
|
||||
@Autowired
|
||||
protected StringCfgDao stringCfgDao;
|
||||
@Autowired
|
||||
protected AreaIpCfgDao areaIpCfgDao;
|
||||
|
||||
public CfgIndexInfo getBgpCfg(Long cfgId){
|
||||
CfgIndexInfo entity = bgpCfgDao.getCfgIndexInfo(cfgId);
|
||||
List<IpPortCfg> ipPortList = bgpCfgDao.getIpPortList(entity);
|
||||
NtcSubscribeIdCfg subscribeId = new NtcSubscribeIdCfg();
|
||||
subscribeId.setCompileId(entity.getCompileId());
|
||||
subscribeId.setIsValid(entity.getIsValid());
|
||||
List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList = stringCfgDao.findSubscribeIdCfgList(subscribeId);
|
||||
List<NtcBgpAsCfg> ntcBgpAsCfgList = bgpCfgDao.getNtcBgpAsList(entity);
|
||||
//List<HttpUrlCfg> httpUrlList = bgpCfgDao.getHttpUrlList(entity);
|
||||
entity.setIpPortList(ipPortList);
|
||||
entity.setNtcSubscribeIdCfgList(ntcSubscribeIdCfgList);
|
||||
entity.setNtcBgpAsCfgList(ntcBgpAsCfgList);
|
||||
//entity.setHttpReqBodyList(httpUrlList);
|
||||
return entity;
|
||||
}
|
||||
@@ -55,6 +67,7 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
entity.setPage(page);
|
||||
List<CfgIndexInfo> list = bgpCfgDao.getBgpList(entity);
|
||||
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
@@ -84,6 +97,24 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
||||
bgpCfgDao.saveIpPortCfg(cfg);
|
||||
}
|
||||
}
|
||||
//保存认证配置信息
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(cfg.getCfgKeywords()!=null && !"".equals(cfg.getCfgKeywords())){
|
||||
stringCfgDao.saveSubscribeIdCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(entity.getNtcBgpAsCfgList()!=null){
|
||||
for(NtcBgpAsCfg cfg:entity.getNtcBgpAsCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(cfg.getCfgKeywords()!=null && !"".equals(cfg.getCfgKeywords())){
|
||||
bgpCfgDao.saveNtcBgpAsCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
/**TODO
|
||||
* if(entity.getDomainList()!=null){
|
||||
for(ComplexkeywordCfg cfg:entity.getDomainList()){
|
||||
@@ -114,6 +145,10 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
||||
bgpCfgDao.updateCfgIndex(entity);
|
||||
//无效子配置后,再新增子配置
|
||||
bgpCfgDao.deleteIpCfg(entity);
|
||||
bgpCfgDao.deleteBgpAsCfg(entity);
|
||||
if(entity.getNtcSubscribeIdCfg()!=null){
|
||||
stringCfgDao.deleteSubscribeIdCfg(entity.getNtcSubscribeIdCfg());
|
||||
}
|
||||
//TODO
|
||||
//bgpCfgDao.deleteDnsDomainCfg(entity);
|
||||
AreaIpCfg area = new AreaIpCfg();
|
||||
@@ -128,6 +163,25 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
||||
bgpCfgDao.saveIpPortCfg(cfg);
|
||||
}
|
||||
}
|
||||
//保存认证配置信息
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(cfg.getCfgKeywords()!=null && !"".equals(cfg.getCfgKeywords())){
|
||||
stringCfgDao.saveSubscribeIdCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(entity.getNtcBgpAsCfgList()!=null){
|
||||
for(NtcBgpAsCfg cfg:entity.getNtcBgpAsCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(cfg.getCfgKeywords()!=null && !"".equals(cfg.getCfgKeywords())){
|
||||
bgpCfgDao.saveNtcBgpAsCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**TODO
|
||||
* if(entity.getDomainList()!=null){
|
||||
for(ComplexkeywordCfg cfg:entity.getDomainList()){
|
||||
@@ -175,6 +229,19 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
||||
cfg.setTableName(IpPortCfg.getTablename());
|
||||
bgpCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||
bgpCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
if(entity.getNtcBgpAsCfgList()!=null && entity.getNtcBgpAsCfgList().size()>0){
|
||||
NtcBgpAsCfg cfg = new NtcBgpAsCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(NtcBgpAsCfg.getTablename());
|
||||
bgpCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
|
||||
/*TODO
|
||||
* if(entity.getDomainList()!=null && entity.getDomainList().size()>0)
|
||||
{
|
||||
@@ -204,7 +271,8 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
||||
//修改数据库审核状态信息
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
bgpCfgDao.auditCfg(entity);
|
||||
|
||||
bgpCfgDao.updateBgpAsCfg(entity);
|
||||
bgpCfgDao.updateSubscribeIdCfg(entity);
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
@@ -231,6 +299,30 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||
bgpCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
|
||||
if(entity.getNtcBgpAsCfgList()!=null && entity.getNtcBgpAsCfgList().size()>0){
|
||||
NtcBgpAsCfg cfg = new NtcBgpAsCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(NtcBgpAsCfg.getTablename());
|
||||
bgpCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(strRegionList,entity.getNtcBgpAsCfgList(),2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
/*TODO
|
||||
* if(entity.getDomainList()!=null && entity.getDomainList().size()>0){
|
||||
DnsDomainCfg cfg = new DnsDomainCfg();
|
||||
|
||||
Reference in New Issue
Block a user