去掉拉姆达表达式的使用

This commit is contained in:
wangxin
2019-01-04 21:38:13 +08:00
parent 6e1938a9c9
commit 4bf5df788d
2 changed files with 11 additions and 2 deletions

View File

@@ -444,7 +444,8 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
final SqlSession batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
try{
data.entrySet().stream().forEach( enrty->{
for(Entry<Long,List<AsnIpCfg>> enrty:data.entrySet()) {
//data.entrySet().stream().forEach( enrty->{
Long asn=enrty.getKey();//ans group 的group id
List<AsnIpCfg> asnIpCfgs=enrty.getValue();
for(int index = 0; index < asnIpCfgs.size();index++){
@@ -548,7 +549,8 @@ public class AsnIpCfgService extends CrudService<CrudDao<AsnIpCfg>, AsnIpCfg> {
}else {
throw new RuntimeException("isValid value is "+isValid);
}
});
//});
}
}finally {
if(batchSqlSession != null){
batchSqlSession.close();