增加导出功能

This commit is contained in:
leijun
2018-10-24 18:36:31 +08:00
parent 2f2812a7e8
commit ae98d37d01
42 changed files with 1301 additions and 305 deletions

View File

@@ -2,6 +2,7 @@ package com.nis.web.service.configuration;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -70,22 +71,19 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
return page;
}
/**
* 保存dns配置
* 保存ip拦截
* @param entity
*/
public CfgIndexInfo exportIpInfo(CfgIndexInfo entity){
public Map<String, List> exportIpInfo(CfgIndexInfo entity){
Map<String, List> dataMap=new HashMap<String, List>();
List<IpPortCfg> ipPortList = websiteCfgDao.getIpPortList(entity);
if(ipPortList!=null){
entity.setIpPortList(ipPortList);
}
if(entity.getFunctionId()!=null) {
List<InterceptPktBin> info=interceptCfgDao.getInterceptPktBin(entity);
if(info!=null){
entity.setInterceptPktBinList(info);
}
}
return entity;
List<InterceptPktBin> info = interceptCfgDao.getInterceptPktBin(entity);
List<HttpUrlCfg> httpUrlList = websiteCfgDao.getHttpUrlList(entity);
dataMap.put("PXY_INTERCEPT_IP", ipPortList);
dataMap.put("NTC_HTTP_URL", httpUrlList);
dataMap.put("PXY_INTERCEPT_PKT_BIN", info);
return dataMap;
}
public void saveInterceptCfg(List<BaseStringCfg<?>> interceptPktBins){
@@ -157,7 +155,6 @@ public class InterceptCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
}else{
entity.setEditTime(new Date());
entity.setEditorId(entity.getCurrentUser().getId());