(1)asn no放入eCache中

(2)导入验证采用多线程验证,优化验证速度
(3)asn ip导入方式调整(未采用多线程,因为redis承受不了)
(4)asn ip列表展示速度优化
(5)导入方式重写:采用csv模式,限制采用xlsx格式,加载80万数据不会内存溢出.
This commit is contained in:
wangxin
2018-11-11 19:36:53 +08:00
parent 40bcfea683
commit 80dde7d6a0
53 changed files with 4831 additions and 2996 deletions

View File

@@ -41,7 +41,7 @@ import com.nis.web.dao.basics.AsnIpCfgDao;
import com.nis.web.dao.configuration.AreaIpCfgDao;
import com.nis.web.dao.configuration.IpCfgDao;
import com.nis.web.dao.configuration.StringCfgDao;
import com.nis.web.dao.specific.SpecificServiceCfgDao;
import com.nis.web.dao.specific.ConfigGroupInfoDao;
import com.nis.web.security.UserUtils;
import com.nis.web.service.CrudService;
@@ -59,7 +59,8 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
@Autowired
protected AreaIpCfgDao areaIpCfgDao;
@Autowired
protected SpecificServiceCfgDao specificServiceCfgDao;
//protected SpecificServiceCfgDao specificServiceCfgDao;
protected ConfigGroupInfoDao configGroupInfoDao;
@Autowired
protected AsnIpCfgDao asnIpCfgDao;
/**
@@ -731,7 +732,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
List<DigestCfg> digestRegionList = new ArrayList<>();
List<IpCfg> areaIpRegionList = new ArrayList<>();
if(isAudit==Constants.AUDIT_YES) {
ConfigGroupInfo group=specificServiceCfgDao.getConfigGroupInfoByGroupId(Integer.parseInt(entity.getUserRegion4()));
ConfigGroupInfo group=configGroupInfoDao.getConfigGroupInfoByGroupId(Integer.parseInt(entity.getUserRegion4()));
if(group.getIsIssued()==1) {//复用,只下编译跟分组
maatCfg.initDefaultValue();
BeanUtils.copyProperties(entity, maatCfg);
@@ -810,9 +811,10 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
logger.info("ipaddr asn配置下发响应信息"+result.getMsg());
ConfigGroupInfo info=new ConfigGroupInfo();
BeanUtils.copyProperties(group, info);
info.setIsIssued(1);
info.setGroupId(Integer.parseInt(entity.getUserRegion4()));
specificServiceCfgDao.updateConfigGroupInfobyGroupId(info);
//info.setGroupId(Integer.parseInt(entity.getUserRegion4()));
configGroupInfoDao.updateConfigGroupInfobyGroupId(info);
AsnIpCfg cfg=new AsnIpCfg();
cfg.setIsValid(Constants.VALID_YES);
cfg.setAsnIpGroup(Integer.parseInt(entity.getUserRegion4()));
@@ -907,7 +909,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
entity.setIpPortList(ipPortList);
entity.setNtcSubscribeIdCfgList(subscribeIdList);
if(StringUtils.isNotBlank(entity.getUserRegion4())) {
ConfigGroupInfo info=specificServiceCfgDao.getConfigGroupInfoByGroupId(Integer.parseInt(entity.getUserRegion4().trim()));
ConfigGroupInfo info=configGroupInfoDao.getConfigGroupInfoByGroupId(Integer.parseInt(entity.getUserRegion4().trim()));
entity.setAsnIpGroupName(info.getGroupName());
}
return entity;
@@ -916,7 +918,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
List<IpPortCfg> ipPortList = ipCfgDao.getIpPortList(entity);
entity.setIpPortList(ipPortList);
if(StringUtils.isNotBlank(entity.getUserRegion4())) {
ConfigGroupInfo info=specificServiceCfgDao.getConfigGroupInfoByGroupId(Integer.parseInt(entity.getUserRegion4().trim()));
ConfigGroupInfo info=configGroupInfoDao.getConfigGroupInfoByGroupId(Integer.parseInt(entity.getUserRegion4().trim()));
entity.setAsnIpGroupName(info.getGroupName());
}
return entity;