1.导入配置数据入库优化 2.修复VoIP配置 无IP域配置数据不显示BUG

This commit is contained in:
zhangwq
2018-11-17 23:59:50 +08:00
parent 2e4817e39b
commit 85123852b0
13 changed files with 346 additions and 101 deletions

View File

@@ -2127,4 +2127,52 @@ public class AppCfgService extends BaseService {
appCfgDao.saveDomainDict(websiteDomainTopic);
}
/**
* 导入配置时数据批量入库
* @param listPage
*/
public void saveAppDomainCfgBatch(List<BaseStringCfg<?>> data) {
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
SqlSession batchSqlSession = null;
try{
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
for(int index = 0; index < data.size();index++){
BaseStringCfg<?> entity = data.get(index);
AppDomainCfg cfg=new AppDomainCfg();
BeanUtils.copyProperties(entity, cfg);
((AppCfgDao) batchSqlSession.getMapper(AppCfgDao.class)).insertAppDomainCfgBatch(cfg);
}
batchSqlSession.commit();
}finally {
if(batchSqlSession != null){
batchSqlSession.close();
}
}
}
/**
* 导入配置时数据批量入库
* @param listPage
*/
public void saveAppHttpCfgBatch(List<ComplexkeywordCfg> data) {
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
SqlSession batchSqlSession = null;
try{
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
for(int index = 0; index < data.size();index++){
ComplexkeywordCfg entity = data.get(index);
AppHttpCfg cfg=new AppHttpCfg();
BeanUtils.copyProperties(entity, cfg);
((AppCfgDao) batchSqlSession.getMapper(AppCfgDao.class)).insertAppHttpCfgBatch(cfg);
}
batchSqlSession.commit();
}finally {
if(batchSqlSession != null){
batchSqlSession.close();
}
}
}
}