(1)index 跟子配置保存放到service同一个事务中
(2)修复是否下发选项隐藏导致的空指针异常
This commit is contained in:
@@ -112,23 +112,6 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveCfgIndexOf(List<CfgIndexInfo> cfgIndexInfos){
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
SqlSession batchSqlSession = null;
|
||||
try{
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
for(int index = 0; index < cfgIndexInfos.size();index++){
|
||||
CfgIndexInfo cfgIndexInfo = cfgIndexInfos.get(index);
|
||||
((IpCfgDao) batchSqlSession.getMapper(IpCfgDao.class)).saveCfgIndexForBatch(cfgIndexInfo);
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveIpCfg(CfgIndexInfo entity){
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
|
||||
Reference in New Issue
Block a user