优化配置审核方法中重复查询配置信息

This commit is contained in:
leijun
2019-04-16 15:49:21 +08:00
parent 02bade2de0
commit 233a02b7dc
5 changed files with 13 additions and 13 deletions

View File

@@ -51,14 +51,14 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
public CfgIndexInfo getBgpCfg(Long cfgId,Integer compileId){
CfgIndexInfo entity = bgpCfgDao.getCfgIndexInfo(cfgId,compileId);
List<IpPortCfg> ipPortList = bgpCfgDao.getIpPortList(entity);
NtcSubscribeIdCfg subscribeId = new NtcSubscribeIdCfg();
/*NtcSubscribeIdCfg subscribeId = new NtcSubscribeIdCfg();
subscribeId.setCompileId(entity.getCompileId());
subscribeId.setIsValid(entity.getIsValid());
List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList = stringCfgDao.findSubscribeIdCfgList(subscribeId);
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.setNtcSubscribeIdCfgList(ntcSubscribeIdCfgList);
entity.setNtcBgpAsCfgList(ntcBgpAsCfgList);
//entity.setHttpReqBodyList(httpUrlList);
return entity;
@@ -327,7 +327,7 @@ public class BgpCfgService extends CrudService<BgpCfgDao,CfgIndexInfo> {
List<IpCfg> areaIpRegionList = new ArrayList();
//查询子配置并修改审核状态
entity = this.getBgpCfg(entity.getCfgId(),entity.getCompileId());
//entity = this.getBgpCfg(entity.getCfgId(),entity.getCompileId());
if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){
IpPortCfg cfg = new IpPortCfg();
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});