1.导入配置数据入库优化 2.修复VoIP配置 无IP域配置数据不显示BUG
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user