Merge branch 'develop' of https://git.mesalab.cn/K18_NTCS_WEB/NTC.git into develop
This commit is contained in:
@@ -43,6 +43,19 @@ public class AppComplexFeatureCfg extends BaseCfg<AppComplexFeatureCfg> {
|
||||
private String appName;
|
||||
private List<AppIpCfg> ipPortList = new ArrayList();
|
||||
private String cfgRegionCode1;
|
||||
//以下参数为APP PAYLOAD L3_HEADER的特殊属性(使用偏移表达式处理)
|
||||
private String ver;
|
||||
private String ihl;
|
||||
private String tos;
|
||||
private String totalLength;
|
||||
private String flags;
|
||||
private String fragmentOffset;
|
||||
private String protocol;
|
||||
private String icmpType;
|
||||
private String icmpCode;
|
||||
private String icmpIdentifier;
|
||||
private String headerType;
|
||||
|
||||
public String getCfgRegionCode1() {
|
||||
return cfgRegionCode1;
|
||||
}
|
||||
@@ -197,5 +210,94 @@ public class AppComplexFeatureCfg extends BaseCfg<AppComplexFeatureCfg> {
|
||||
public void setIpPortList(List<AppIpCfg> ipPortList) {
|
||||
this.ipPortList = ipPortList;
|
||||
}
|
||||
|
||||
public String getVer() {
|
||||
return ver;
|
||||
}
|
||||
|
||||
public void setVer(String ver) {
|
||||
this.ver = ver;
|
||||
}
|
||||
|
||||
public String getIhl() {
|
||||
return ihl;
|
||||
}
|
||||
|
||||
public void setIhl(String ihl) {
|
||||
this.ihl = ihl;
|
||||
}
|
||||
|
||||
public String getTos() {
|
||||
return tos;
|
||||
}
|
||||
|
||||
public void setTos(String tos) {
|
||||
this.tos = tos;
|
||||
}
|
||||
|
||||
public String getTotalLength() {
|
||||
return totalLength;
|
||||
}
|
||||
|
||||
public void setTotalLength(String totalLength) {
|
||||
this.totalLength = totalLength;
|
||||
}
|
||||
|
||||
public String getFlags() {
|
||||
return flags;
|
||||
}
|
||||
|
||||
public void setFlags(String flags) {
|
||||
this.flags = flags;
|
||||
}
|
||||
|
||||
public String getFragmentOffset() {
|
||||
return fragmentOffset;
|
||||
}
|
||||
|
||||
public void setFragmentOffset(String fragmentOffset) {
|
||||
this.fragmentOffset = fragmentOffset;
|
||||
}
|
||||
|
||||
public String getProtocol() {
|
||||
return protocol;
|
||||
}
|
||||
|
||||
public void setProtocol(String protocol) {
|
||||
this.protocol = protocol;
|
||||
}
|
||||
|
||||
public String getIcmpType() {
|
||||
return icmpType;
|
||||
}
|
||||
|
||||
public void setIcmpType(String icmpType) {
|
||||
this.icmpType = icmpType;
|
||||
}
|
||||
|
||||
public String getIcmpCode() {
|
||||
return icmpCode;
|
||||
}
|
||||
|
||||
public void setIcmpCode(String icmpCode) {
|
||||
this.icmpCode = icmpCode;
|
||||
}
|
||||
|
||||
public String getIcmpIdentifier() {
|
||||
return icmpIdentifier;
|
||||
}
|
||||
|
||||
public void setIcmpIdentifier(String icmpIdentifier) {
|
||||
this.icmpIdentifier = icmpIdentifier;
|
||||
}
|
||||
|
||||
public String getHeaderType() {
|
||||
return headerType;
|
||||
}
|
||||
|
||||
public void setHeaderType(String headerType) {
|
||||
this.headerType = headerType;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -12,11 +12,11 @@ public class AvFileSampleCfg extends BaseCfg<AvFileSampleCfg> {
|
||||
private String indexTable="av_file_sample_cfg";
|
||||
@Expose
|
||||
@SerializedName("srcFile")
|
||||
@ExcelField(title="src_file",sort=2)
|
||||
@ExcelField(title="src_file",sort=3)
|
||||
private String srcUrl;
|
||||
@Expose
|
||||
@SerializedName("dstFile")
|
||||
@ExcelField(title="sample_file",sort=3)
|
||||
@ExcelField(title="sample_file",sort=4)
|
||||
private String sampleUrl;
|
||||
@Expose
|
||||
@SerializedName("srcFileMd5")
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
/**
|
||||
*@Title: HttpDomainConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午5:33:05
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* @ClassName: HttpDomainConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午5:33:05
|
||||
* @version V1.0
|
||||
*/
|
||||
public class CachePolicyUserRegion extends BaseCfg<CachePolicyUserRegion> {
|
||||
|
||||
private static final long serialVersionUID = -1741829305216502322L;
|
||||
|
||||
@ExcelField(title="cache_cookied_cont",dictType="CACHE_COOKIED_CONT",sort=7)
|
||||
private String cache_cookied_cont;
|
||||
@ExcelField(title="cache_dyn_url",dictType="CACHE_DYN_URL",sort=6)
|
||||
private String cache_dyn_url;
|
||||
@ExcelField(title="force_caching",dictType="FORCE_CACHING",sort=10)
|
||||
private String force_caching;
|
||||
@ExcelField(title="ignore_req_nocache",dictType="IGNORE_REQ_NOCACHE",sort=8)
|
||||
private String ignore_req_nocache;
|
||||
@ExcelField(title="ignore_res_nocache",dictType="IGNORE_RES_NOCACHE",sort=9)
|
||||
private String ignore_res_nocache;
|
||||
@ExcelField(title="inactive_time",sort=14)
|
||||
private String inactive_time;
|
||||
@ExcelField(title="max_cache_obj_size",sort=15)
|
||||
private String max_cache_obj_size;
|
||||
@ExcelField(title="max_cache_size",sort=13)
|
||||
private String max_cache_size;
|
||||
@ExcelField(title="min_use",sort=11)
|
||||
private String min_use;
|
||||
@ExcelField(title="no_revalidate",dictType="CACHE_NO_REVALIDATE",sort=5)
|
||||
private String no_revalidate;
|
||||
@ExcelField(title="pinning_time",dictType="",sort=12)
|
||||
private String pinning_time;
|
||||
@ExcelField(title="ignore_query_string",sort=3)
|
||||
private String ignore_qs;
|
||||
@ExcelField(title="include_cookie",sort=4)
|
||||
private String cookie;
|
||||
|
||||
private Map<String,String> cache_key;
|
||||
|
||||
private BaseStringCfg strCfg;
|
||||
|
||||
@ExcelField(title="action",sort=2)
|
||||
protected String actionCode;
|
||||
|
||||
|
||||
public String getActionCode() {
|
||||
return actionCode;
|
||||
}
|
||||
public void setActionCode(String actionCode) {
|
||||
this.actionCode = actionCode;
|
||||
}
|
||||
public BaseStringCfg getStrCfg() {
|
||||
return strCfg;
|
||||
}
|
||||
public void setStrCfg(BaseStringCfg strCfg) {
|
||||
this.strCfg = strCfg;
|
||||
}
|
||||
public Map<String, String> getCache_key() {
|
||||
return cache_key;
|
||||
}
|
||||
public void setCache_key(Map<String, String> cache_key) {
|
||||
this.cache_key = cache_key;
|
||||
}
|
||||
public String getIgnore_res_nocache() {
|
||||
return ignore_res_nocache;
|
||||
}
|
||||
public void setIgnore_res_nocache(String ignore_res_nocache) {
|
||||
this.ignore_res_nocache = ignore_res_nocache;
|
||||
}
|
||||
public String getCache_cookied_cont() {
|
||||
return cache_cookied_cont;
|
||||
}
|
||||
public void setCache_cookied_cont(String cache_cookied_cont) {
|
||||
this.cache_cookied_cont = cache_cookied_cont;
|
||||
}
|
||||
public String getCache_dyn_url() {
|
||||
return cache_dyn_url;
|
||||
}
|
||||
public void setCache_dyn_url(String cache_dyn_url) {
|
||||
this.cache_dyn_url = cache_dyn_url;
|
||||
}
|
||||
public String getForce_caching() {
|
||||
return force_caching;
|
||||
}
|
||||
public void setForce_caching(String force_caching) {
|
||||
this.force_caching = force_caching;
|
||||
}
|
||||
public String getIgnore_req_nocache() {
|
||||
return ignore_req_nocache;
|
||||
}
|
||||
public void setIgnore_req_nocache(String ignore_req_nocache) {
|
||||
this.ignore_req_nocache = ignore_req_nocache;
|
||||
}
|
||||
public String getInactive_time() {
|
||||
return inactive_time;
|
||||
}
|
||||
public void setInactive_time(String inactive_time) {
|
||||
this.inactive_time = inactive_time;
|
||||
}
|
||||
public String getMax_cache_obj_size() {
|
||||
return max_cache_obj_size;
|
||||
}
|
||||
public void setMax_cache_obj_size(String max_cache_obj_size) {
|
||||
this.max_cache_obj_size = max_cache_obj_size;
|
||||
}
|
||||
public String getMax_cache_size() {
|
||||
return max_cache_size;
|
||||
}
|
||||
public void setMax_cache_size(String max_cache_size) {
|
||||
this.max_cache_size = max_cache_size;
|
||||
}
|
||||
public String getMin_use() {
|
||||
return min_use;
|
||||
}
|
||||
public void setMin_use(String min_use) {
|
||||
this.min_use = min_use;
|
||||
}
|
||||
public String getNo_revalidate() {
|
||||
return no_revalidate;
|
||||
}
|
||||
public void setNo_revalidate(String no_revalidate) {
|
||||
this.no_revalidate = no_revalidate;
|
||||
}
|
||||
public String getPinning_time() {
|
||||
return pinning_time;
|
||||
}
|
||||
public void setPinning_time(String pinning_time) {
|
||||
this.pinning_time = pinning_time;
|
||||
}
|
||||
public String getIgnore_qs() {
|
||||
return ignore_qs;
|
||||
}
|
||||
public void setIgnore_qs(String ignore_qs) {
|
||||
this.ignore_qs = ignore_qs;
|
||||
}
|
||||
public String getCookie() {
|
||||
return cookie;
|
||||
}
|
||||
public void setCookie(String cookie) {
|
||||
this.cookie = cookie;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -29,13 +29,13 @@ public class FileDigestCfg extends BaseCfg<FileDigestCfg> {
|
||||
private static final long serialVersionUID = 2796500715438264119L;
|
||||
private static final String tableName="file_digest_cfg";
|
||||
private String indexTable="file_digest_cfg";
|
||||
@ExcelField(title="raw_len",sort=3)
|
||||
@ExcelField(title="raw_len",sort=4)
|
||||
private Long rawLen;
|
||||
@ExcelField(title="digest",sort=2)
|
||||
@ExcelField(title="digest",sort=3)
|
||||
private String digest;
|
||||
@ExcelField(title="cfds_level",sort=4)
|
||||
@ExcelField(title="harm_level",sort=5)
|
||||
private Integer cfdsLevel;
|
||||
@ExcelField(title="file_url",sort=5)
|
||||
@ExcelField(title="file_url",sort=6)
|
||||
private String fileUrl;
|
||||
|
||||
private NtcSubscribeIdCfg ntcSubscribeIdCfg;
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.nis.domain.configuration;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* IP复用地址池实体
|
||||
@@ -13,15 +14,16 @@ public class IpAddrPoolCfg extends BaseCfg<IpAddrPoolCfg>{
|
||||
|
||||
private static final long serialVersionUID = 1392197458744667669L;
|
||||
private String indexTable="ip_reuse_addr_pool";
|
||||
|
||||
@ExcelField(title="address_pool",sort=2)
|
||||
private String addrPoolName; // 地址池名称
|
||||
@ExcelField(title="ip_total",sort=3)
|
||||
private Integer ipTotal; // IP总数
|
||||
private Integer availableIpTotal; // 可用IP总数
|
||||
private String description; // 描述信息
|
||||
|
||||
private List<BaseIpCfg> ipCfgs; // 地址池IP信息
|
||||
|
||||
@SerializedName("cfgId")
|
||||
@ExcelField(title="address_pool_id",sort=0)
|
||||
private Integer compileId;
|
||||
|
||||
public String getIndexTable() {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.nis.domain.configuration;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* IP复用DNAT策略实体
|
||||
@@ -16,6 +17,7 @@ public class IpReuseDnatPolicyCfg extends IpPortCfg{
|
||||
|
||||
@Expose
|
||||
@SerializedName("configId")
|
||||
@ExcelField(title="cfg_id",sort=0)
|
||||
private Integer compileId;
|
||||
|
||||
@Expose
|
||||
@@ -24,22 +26,26 @@ public class IpReuseDnatPolicyCfg extends IpPortCfg{
|
||||
|
||||
@Expose
|
||||
@SerializedName("originalDestIp")
|
||||
@ExcelField(title="original_dest_ip",sort=4)
|
||||
private String srcIpAddress;
|
||||
|
||||
@Expose
|
||||
@SerializedName("originalDestPort")
|
||||
@ExcelField(title="original_dest_port",sort=5)
|
||||
private String srcPort;
|
||||
|
||||
@Expose
|
||||
@SerializedName("originalProtocol")
|
||||
@ExcelField(title="protocol",dictType="PROTOCOL",sort=8)
|
||||
private Integer protocol;
|
||||
|
||||
@Expose
|
||||
@SerializedName("translatedDestIp")
|
||||
@ExcelField(title="translated_dest_ip",sort=6)
|
||||
private String destIpAddress;
|
||||
|
||||
@Expose
|
||||
@SerializedName("translatedDestPort")
|
||||
@ExcelField(title="translated_dest_port",sort=7)
|
||||
private String destPort;
|
||||
|
||||
@Expose
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.nis.domain.configuration;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* IP复用策略
|
||||
@@ -20,6 +21,7 @@ public class IpReusePolicyCfg extends BaseCfg<IpReusePolicyCfg>{
|
||||
|
||||
private Integer userId; // 用户标识
|
||||
@Expose
|
||||
@ExcelField(title="user_type",dictType="USER_TYPE",sort=4)
|
||||
protected String userType; // 用户类型
|
||||
@Expose
|
||||
protected Integer addrPoolId; // 地址池ID
|
||||
@@ -27,11 +29,14 @@ public class IpReusePolicyCfg extends BaseCfg<IpReusePolicyCfg>{
|
||||
protected String translateParam; // 地址翻译参数
|
||||
@Expose
|
||||
@SerializedName("userId")
|
||||
@ExcelField(title="user",sort=5)
|
||||
private String userName;
|
||||
@ExcelField(title="address_pool",sort=3)
|
||||
private String addrPoolName; // 仅用于列表条件检索
|
||||
|
||||
private Integer ipType;
|
||||
private Integer ipPattern;
|
||||
@ExcelField(title="ip",sort=6)
|
||||
private String srcIpAddress;
|
||||
private String destIpAddress;
|
||||
@Expose
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
@@ -23,10 +21,13 @@ public class PxyObjSpoofingIpPool extends BaseIpCfg{
|
||||
private String port;
|
||||
@Expose
|
||||
@SerializedName("addrType")
|
||||
@ExcelField(title="ip_type",dictType="IP_TYPE",sort=4)
|
||||
private Integer ipType;
|
||||
@Expose
|
||||
@SerializedName("ip")
|
||||
@ExcelField(title="IP",sort=5)
|
||||
private String ipAddress;
|
||||
@ExcelField(title="group",sort=3)
|
||||
private String groupName;//欺骗IP池(IP组)名称
|
||||
@Expose
|
||||
@SerializedName("policyGroup")
|
||||
@@ -36,6 +37,7 @@ public class PxyObjSpoofingIpPool extends BaseIpCfg{
|
||||
private Integer location;//位置,无意义,固定为0
|
||||
@Expose
|
||||
@SerializedName("cfgId")
|
||||
@ExcelField(title="cfg_id",sort=0)
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
@SerializedName("userRegion")
|
||||
|
||||
@@ -3,25 +3,33 @@ package com.nis.domain.configuration;
|
||||
import java.util.Date;
|
||||
|
||||
import com.nis.domain.BaseEntity;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
public class UserManage extends BaseEntity<UserManage>{
|
||||
|
||||
private static final long serialVersionUID = -2749633756272829982L;
|
||||
|
||||
private static final String tableName="user_manage";
|
||||
@ExcelField(title="user_name",sort=1)
|
||||
private String userName;
|
||||
private String userPwd;
|
||||
@ExcelField(title="vpn_ip",sort=2)
|
||||
private String serverIp;
|
||||
private String authMethod;
|
||||
private Integer numLogins;
|
||||
private String lastLogin;
|
||||
private String transferBytes;
|
||||
private String transferPackets;
|
||||
|
||||
private Long creatorId;
|
||||
@ExcelField(title="config_time",sort=5)
|
||||
private Date createTime;
|
||||
|
||||
private Long editorId;
|
||||
@ExcelField(title="edit_time",sort=7)
|
||||
private Date editTime;
|
||||
private Integer isValid;
|
||||
@ExcelField(title="desc",sort=3)
|
||||
private String remarks;
|
||||
private String userType;
|
||||
|
||||
@@ -39,8 +47,9 @@ public class UserManage extends BaseEntity<UserManage>{
|
||||
private String incomingBroadcastPackets;
|
||||
private String incomingBroadcastTotalSize;
|
||||
private Integer numberOfLogins;*/
|
||||
|
||||
@ExcelField(title="creator",sort=4)
|
||||
private String creatorName;
|
||||
@ExcelField(title="editor",sort=6)
|
||||
private String editorName;
|
||||
private Date search_create_time_start;
|
||||
private Date search_create_time_end;
|
||||
|
||||
@@ -714,6 +714,7 @@ public final class Constants {
|
||||
public static final String TRAFFIC_WEBSITELIST_NOTIME=Configurations.getStringProperty("trafficWebsiteListNoTime","trafficWebsiteListNoTime");
|
||||
public static final String TRAFFIC_TOPICLIST=Configurations.getStringProperty("trafficTopicList","trafficTopicList");
|
||||
public static final String TRAFFIC_DOMAIN_TRANS=Configurations.getStringProperty("trafficDomainTrans","trafficDomainTrans");
|
||||
public static final String TRAFFIC_PORTACTIVE_FIVEMINUTE=Configurations.getStringProperty("trafficPortActiveFiveMinute","trafficPortActiveFiveMinute");
|
||||
/**
|
||||
* httpclient 工具超时时间设置
|
||||
*/
|
||||
|
||||
@@ -130,6 +130,9 @@ public class ExcelCsv {
|
||||
Map<String, List<String>> commentMap=new HashMap<String, List<String>>();
|
||||
for (String title : titleList) {
|
||||
String noExportField=noExportMap.get(title);
|
||||
if(noExportField.contains("do_log")){
|
||||
noExportField=",do_blacklist,"+noExportField;
|
||||
}
|
||||
List<Object[]> annotationList = Lists.newArrayList();
|
||||
List<Field> list=new ArrayList<Field>();
|
||||
// Get annotation field
|
||||
|
||||
@@ -33,6 +33,7 @@ import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.ss.util.RegionUtil;
|
||||
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
|
||||
import org.apache.poi.xssf.usermodel.XSSFClientAnchor;
|
||||
import org.apache.poi.xssf.usermodel.XSSFRichTextString;
|
||||
@@ -2132,6 +2133,9 @@ public class ExportExcel {
|
||||
Map<String, List<String>> commentMap=new HashMap<String, List<String>>();
|
||||
for (String title : titleList) {
|
||||
String noExportField=noExportMap.get(title);
|
||||
if(noExportField.contains("do_log")){
|
||||
noExportField=",do_blacklist,"+noExportField;
|
||||
}
|
||||
List<Object[]> annotationList = Lists.newArrayList();
|
||||
List<Field> list=new ArrayList<Field>();
|
||||
// Get annotation field
|
||||
@@ -2293,11 +2297,10 @@ public class ExportExcel {
|
||||
Row timeRow = sheet.createRow(0);
|
||||
timeRow.setHeightInPoints(16);
|
||||
Cell cellt = timeRow.createCell(0);
|
||||
cellt.setCellStyle(style);
|
||||
cellt.setCellValue(titleTime);
|
||||
sheet.addMergedRegion(callRangeAddress);
|
||||
sheet.autoSizeColumn(0);
|
||||
//--------------------
|
||||
setBorderStyle(CellStyle.BORDER_THIN,callRangeAddress,sheet,wb);
|
||||
}
|
||||
Integer rownum=rownums.get(title);
|
||||
Row headerRow = sheet.createRow(rownum++);
|
||||
@@ -2326,6 +2329,21 @@ public class ExportExcel {
|
||||
log.debug("Initialize success.");
|
||||
}
|
||||
|
||||
|
||||
public void setBorderStyle(int border, CellRangeAddress region, Sheet sheet, SXSSFWorkbook wb){
|
||||
RegionUtil.setBorderBottom(border, region, sheet, wb);//下边框
|
||||
RegionUtil.setBorderLeft(border, region, sheet, wb); //左边框
|
||||
RegionUtil.setBorderRight(border, region, sheet, wb); //右边框
|
||||
RegionUtil.setBorderTop(border, region, sheet, wb); //上边框
|
||||
RegionUtil.setBottomBorderColor(IndexedColors.GREY_50_PERCENT.getIndex(), region, sheet, wb);
|
||||
RegionUtil.setLeftBorderColor(IndexedColors.GREY_50_PERCENT.getIndex(), region, sheet, wb);
|
||||
RegionUtil.setRightBorderColor(IndexedColors.GREY_50_PERCENT.getIndex(), region, sheet, wb);
|
||||
RegionUtil.setTopBorderColor(IndexedColors.GREY_50_PERCENT.getIndex(), region, sheet, wb);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 输出数据流
|
||||
* @param os 输出数据流
|
||||
|
||||
@@ -2071,30 +2071,25 @@ public class BaseController {
|
||||
titleTime+=" "+msgProp.getProperty("config_time")+":"+DateUtils.formatDateTime(cfg.getSearch_create_time_start());
|
||||
if(cfg.getSearch_create_time_end()!=null){
|
||||
titleTime+="—"+DateUtils.formatDateTime(cfg.getSearch_create_time_end());
|
||||
}
|
||||
}else{
|
||||
if(cfg.getSearch_create_time_end()!=null){
|
||||
titleTime+=" "+msgProp.getProperty("config_time")+":—"+DateUtils.formatDateTime(cfg.getSearch_create_time_end());
|
||||
}else{
|
||||
titleTime+="—"+DateUtils.getDateTime();
|
||||
|
||||
}
|
||||
}
|
||||
if(cfg.getSearch_edit_time_start()!=null){
|
||||
titleTime+=" "+msgProp.getProperty("edit_time")+":"+DateUtils.formatDateTime(cfg.getSearch_edit_time_start());
|
||||
if(cfg.getSearch_edit_time_end()!=null){
|
||||
titleTime+="—"+DateUtils.formatDateTime(cfg.getSearch_edit_time_end());
|
||||
}
|
||||
}else{
|
||||
if(cfg.getSearch_edit_time_end()!=null){
|
||||
titleTime+=" "+msgProp.getProperty("edit_time")+":—"+DateUtils.formatDateTime(cfg.getSearch_edit_time_end());
|
||||
}else{
|
||||
titleTime+="—"+DateUtils.getDateTime();
|
||||
}
|
||||
}
|
||||
if(cfg.getSearch_audit_time_start()!=null){
|
||||
titleTime+=" "+msgProp.getProperty("audit_time")+":"+DateUtils.formatDateTime(cfg.getSearch_audit_time_start());
|
||||
if(cfg.getSearch_audit_time_end()!=null){
|
||||
titleTime+="—"+DateUtils.formatDateTime(cfg.getSearch_audit_time_end());
|
||||
}
|
||||
}else{
|
||||
if(cfg.getSearch_audit_time_end()!=null){
|
||||
titleTime+=" "+msgProp.getProperty("audit_time")+": —"+DateUtils.formatDateTime(cfg.getSearch_audit_time_end());
|
||||
}else{
|
||||
titleTime+="—"+DateUtils.getDateTime();
|
||||
}
|
||||
}
|
||||
return titleTime;
|
||||
|
||||
@@ -50,9 +50,9 @@ public class AsnIpController extends BaseController{
|
||||
|
||||
// List<PolicyGroupInfo> policyGroups=policyGroupInfoService.findPolicyGroupInfosByType(4);
|
||||
// model.addAttribute("policyGroups", policyGroups);
|
||||
AsnCacheUtils.init(false);
|
||||
List<ConfigGroupInfo> policyGroups=AsnCacheUtils.getAllAsnGroup();
|
||||
model.addAttribute("policyGroups", policyGroups);
|
||||
// AsnCacheUtils.init(false);
|
||||
// List<ConfigGroupInfo> policyGroups=AsnCacheUtils.getAllAsnGroup();
|
||||
// model.addAttribute("policyGroups", policyGroups);
|
||||
return "/basics/asnIpCfgList";
|
||||
}
|
||||
@RequestMapping(value = {"/addForm"})
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.nis.web.controller.configuration.maintenance;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -21,7 +20,6 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.IpReuseIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.IpAddrPoolCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
@@ -224,5 +222,67 @@ public class IpAddrPoolController extends BaseController{
|
||||
List<IpReuseIpCfg> ipList = ipReuseIpCfgService.getPolicyIpInfo(addrPoolId);
|
||||
return ipList;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "exportIpPool")
|
||||
public void exportIpPool(Model model, HttpServletRequest request, HttpServletResponse response,
|
||||
@ModelAttribute("cfg") IpAddrPoolCfg entity, String ids, RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
// export data info
|
||||
List<String> titleList = new ArrayList<String>();
|
||||
Map<String, Class<?>> classMap = new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap = new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
|
||||
List<IpAddrPoolCfg> ipLists = new ArrayList<IpAddrPoolCfg>();
|
||||
// 导出选中记录
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
ipLists = ipAddrPoolCfgService.findByPage(ids);
|
||||
} else {
|
||||
Page<IpAddrPoolCfg> pageInfo = new Page<IpAddrPoolCfg>(request, response, "r");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<IpAddrPoolCfg> page = ipAddrPoolCfgService.findPage(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
for (IpAddrPoolCfg ipAddrPoolCfg : ipLists) {
|
||||
Integer compId=ipAddrPoolCfg.getCfgId().intValue();
|
||||
ipAddrPoolCfg.setCompileId(compId);
|
||||
}
|
||||
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), IpAddrPoolCfg.class);
|
||||
String cfgIndexInfoNoExport = ",cfg_id,config_describe,block_type,policy_name,do_log,,whether_area_block,do_blacklist,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (!StringUtil.isEmpty(entity.gethColumns())) {
|
||||
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
|
||||
String timeRange = initTimeMap(entity);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
if ("csv".equals(entity.getExType())) {
|
||||
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
} else {
|
||||
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("ip white export failed", e);
|
||||
addMessage(redirectAttributes, "error", "export_failed");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,9 +23,14 @@ import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.IpReuseIpCfg;
|
||||
import com.nis.domain.basics.ServiceDictInfo;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.UserManage;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.controller.BaseController;
|
||||
@@ -352,4 +357,83 @@ public class UserManageController extends BaseController{
|
||||
model.addAttribute("user", user);
|
||||
return "/cfg/maintenance/userManage/userView";
|
||||
}*/
|
||||
// 配置导出
|
||||
@RequestMapping(value = "exportUser")
|
||||
public void exportbgp(Model model, HttpServletRequest request, HttpServletResponse response,String hColumns,String exType,
|
||||
@ModelAttribute("cfg") UserManage entity, String ids, RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
// export data info
|
||||
List<String> titleList = new ArrayList<String>();
|
||||
Map<String, Class<?>> classMap = new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap = new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
List<UserManage> ipLists = new ArrayList<UserManage>();
|
||||
// 导出选中记录
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
ipLists = userManageService.findByPage(ids);
|
||||
} else {
|
||||
Page<UserManage> pageInfo = new Page<UserManage>(request, response, "a");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<UserManage> page = userManageService.findPage(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
titleList.add("user_manage");
|
||||
classMap.put("user_manage", UserManage.class);
|
||||
String cfgIndexInfoNoExport = ",";
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
|
||||
if (!StringUtil.isEmpty(hColumns)) {
|
||||
cfgIndexInfoNoExport = "," + hColumns + "," + cfgIndexInfoNoExport;
|
||||
}
|
||||
for (UserManage userManage : ipLists) {
|
||||
if(!StringUtils.isEmpty( userManage.getServerIp())){
|
||||
userManage.setServerIp(userManage.getServerIp().substring(0,userManage.getServerIp().length()-1).replaceAll(",", ","));
|
||||
}
|
||||
}
|
||||
noExportMap.put("user_manage", cfgIndexInfoNoExport);
|
||||
dataMap.put("user_manage", ipLists);
|
||||
String timeRange = initUserMap(entity);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
if ("csv".equals(exType)) {
|
||||
this._exportCsv(model, request, response, redirectAttributes, "user_manage", titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
} else {
|
||||
this._export(model, request, response, redirectAttributes, "user_manage", titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("user export failed", e);
|
||||
addMessage(redirectAttributes, "error", "export_failed");
|
||||
}
|
||||
// return "redirect:" + adminPath
|
||||
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
public String initUserMap(UserManage cfg){
|
||||
Properties msgProp = getMsgProp();
|
||||
String titleTime=msgProp.getProperty("user_manage","user_manage");
|
||||
if(cfg.getSearch_create_time_start()!=null){
|
||||
titleTime+=" "+msgProp.getProperty("config_time")+":"+DateUtils.formatDateTime(cfg.getSearch_create_time_start());
|
||||
if(cfg.getSearch_create_time_end()!=null){
|
||||
titleTime+="—"+DateUtils.formatDateTime(cfg.getSearch_create_time_end());
|
||||
}else {
|
||||
titleTime+="—"+DateUtils.getDateTime();
|
||||
}
|
||||
}
|
||||
if(cfg.getSearch_edit_time_start()!=null){
|
||||
titleTime+=" "+msgProp.getProperty("edit_time")+":"+DateUtils.formatDateTime(cfg.getSearch_edit_time_start());
|
||||
if(cfg.getSearch_edit_time_end()!=null){
|
||||
titleTime+="—"+DateUtils.formatDateTime(cfg.getSearch_edit_time_end());
|
||||
}else{
|
||||
titleTime+="—"+DateUtils.getDateTime();
|
||||
}
|
||||
}
|
||||
return titleTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import com.nis.domain.Page;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.basics.PolicyGroupInfo;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.IpAddrPoolCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.IpReuseDnatPolicyCfg;
|
||||
@@ -430,7 +431,7 @@ public class IpMultiplexController extends CommonController {
|
||||
// snat配置导出
|
||||
@RequestMapping(value = "exportSnat")
|
||||
public void exportSnat(Model model, HttpServletRequest request, HttpServletResponse response,
|
||||
@ModelAttribute("cfg") BaseIpCfg entity, String ids, RedirectAttributes redirectAttributes) {
|
||||
@ModelAttribute("cfg") IpReusePolicyCfg entity, String ids, RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
// export data info
|
||||
List<String> titleList = new ArrayList<String>();
|
||||
@@ -438,27 +439,38 @@ public class IpMultiplexController extends CommonController {
|
||||
Map<String, List> dataMap = new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
Properties msgProp = getMsgProp();
|
||||
|
||||
/*
|
||||
* //导出选中记录 if(!StringUtil.isEmpty(ids)){ for(String
|
||||
* id:ids.split(",")){ Long.parseLong(id); } //List<CfgIndexInfo>
|
||||
* list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename()
|
||||
* , entity.getFunctionId(), ids); }else{
|
||||
*/
|
||||
// 条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<BaseIpCfg> pageInfo = new Page<BaseIpCfg>(request, response, "r");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<BaseIpCfg> page = ipCfgService.findPage(pageInfo, entity);//
|
||||
for (BaseIpCfg baseIp : page.getList()) {
|
||||
if (StringUtil.isEmpty(baseIp.getGroupName())) {
|
||||
baseIp.setGroupName(msgProp.getProperty("default_group"));
|
||||
// 导出选中记录
|
||||
List<IpReusePolicyCfg> ipLists = new ArrayList<IpReusePolicyCfg>();
|
||||
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
ipLists = ipMultiplexService.findByPage(ids);
|
||||
} else {
|
||||
Page<IpReusePolicyCfg> pageInfo = new Page<IpReusePolicyCfg>(request, response, "r");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<IpReusePolicyCfg> page = ipMultiplexService.findPage(pageInfo,entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
List<IpAddrPoolCfg> addrPools = ipAddrPoolCfgService.getEffectiveAddrPool();
|
||||
for (IpReusePolicyCfg ipReusePolicyCfg : ipLists) {
|
||||
if(ipReusePolicyCfg.getAddrPoolId()!=null){
|
||||
for (IpAddrPoolCfg addr : addrPools) {
|
||||
if(ipReusePolicyCfg.getAddrPoolId()==addr.getCfgId().intValue()){
|
||||
ipReusePolicyCfg.setAddrPoolName(addr.getAddrPoolName());
|
||||
}
|
||||
}
|
||||
}
|
||||
if(ipReusePolicyCfg.getUserType().equals("VPN")){
|
||||
ipReusePolicyCfg.setUserType(msgProp.getProperty("policy_vpn_user","VPN"));
|
||||
}else if(ipReusePolicyCfg.getUserType().equals("SIPv4")){
|
||||
ipReusePolicyCfg.setUserType(msgProp.getProperty("policy_sipv4_user","SIPv4"));
|
||||
}else if(ipReusePolicyCfg.getUserType().equals("SIPv6")){
|
||||
ipReusePolicyCfg.setUserType(msgProp.getProperty("policy_sipv6_user","SIPv6"));
|
||||
}
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), BaseIpCfg.class);
|
||||
String snatNoExport = ",client_ip,group_name,server_ip,ip_type,ip_pattern,port_pattern,client_port,server_port,ir_type,direction,protocol,do_log,whether_area_block,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
classMap.put(entity.getMenuNameCode(), IpReusePolicyCfg.class);
|
||||
String snatNoExport = ",block_type,client_ip,group_name,server_ip,ip_type,ip_pattern,port_pattern,client_port,server_port,ir_type,direction,protocol,do_log,whether_area_block,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
@@ -475,7 +487,7 @@ public class IpMultiplexController extends CommonController {
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(), snatNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
|
||||
String timeRange = initTimeMap(entity);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
@@ -497,7 +509,7 @@ public class IpMultiplexController extends CommonController {
|
||||
// dnat配置导出
|
||||
@RequestMapping(value = "exportDnat")
|
||||
public void exportDnat(Model model, HttpServletRequest request, HttpServletResponse response,
|
||||
@ModelAttribute("cfg") BaseIpCfg entity, String ids, RedirectAttributes redirectAttributes) {
|
||||
@ModelAttribute("cfg") IpReuseDnatPolicyCfg entity, String ids, RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
// export data info
|
||||
List<String> titleList = new ArrayList<String>();
|
||||
@@ -505,27 +517,21 @@ public class IpMultiplexController extends CommonController {
|
||||
Map<String, List> dataMap = new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
Properties msgProp = getMsgProp();
|
||||
|
||||
/*
|
||||
* //导出选中记录 if(!StringUtil.isEmpty(ids)){ for(String
|
||||
* id:ids.split(",")){ Long.parseLong(id); } //List<CfgIndexInfo>
|
||||
* list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename()
|
||||
* , entity.getFunctionId(), ids); }else{
|
||||
*/
|
||||
// 条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<BaseIpCfg> pageInfo = new Page<BaseIpCfg>(request, response, "r");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<BaseIpCfg> page = ipCfgService.findPage(pageInfo, entity);//
|
||||
for (BaseIpCfg baseIp : page.getList()) {
|
||||
if (StringUtil.isEmpty(baseIp.getGroupName())) {
|
||||
baseIp.setGroupName(msgProp.getProperty("default_group"));
|
||||
}
|
||||
// 导出选中记录
|
||||
List<BaseIpCfg> ipLists = new ArrayList<BaseIpCfg>();
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
ipLists = ipMultiplexService.findPageByDnat(ids);
|
||||
} else {
|
||||
Page<BaseIpCfg> pageInfo = new Page<BaseIpCfg>(request, response, "r");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<BaseIpCfg> page = ipMultiplexService.findPageDnat(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), BaseIpCfg.class);
|
||||
String snatNoExport = ",direction,client_ip,ip_type,ip_pattern,port_pattern,client_port,ir_type,do_log,whether_area_block,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
classMap.put(entity.getMenuNameCode(), IpReuseDnatPolicyCfg.class);
|
||||
String snatNoExport = ",group_name,block_type,direction,client_ip,ip_type,ip_pattern,port_pattern,client_port,ir_type,do_log,whether_area_block,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
@@ -542,7 +548,7 @@ public class IpMultiplexController extends CommonController {
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(), snatNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put(entity.getMenuNameCode(),ipLists);
|
||||
|
||||
String timeRange = initTimeMap(entity);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
|
||||
@@ -43,6 +43,7 @@ import com.nis.domain.configuration.AvSignSampleCfg;
|
||||
import com.nis.domain.configuration.AvSignSampleCfgModel;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.FileDigestCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
@@ -585,18 +586,20 @@ public class AvController extends BaseController {
|
||||
Map<String, List> dataMap = new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
|
||||
/*
|
||||
* //导出选中记录 if(!StringUtil.isEmpty(ids)){ for(String
|
||||
* id:ids.split(",")){ Long.parseLong(id); } //List<CfgIndexInfo>
|
||||
* list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename()
|
||||
* , entity.getFunctionId(), ids); }else{
|
||||
*/
|
||||
List<AvFileSampleCfg> ipLists = new ArrayList<AvFileSampleCfg>();
|
||||
// 导出选中记录
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
ipLists = avCfgService.getAvFileBySampleList(ids);
|
||||
} else {
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<AvFileSampleCfg> pageInfo = new Page<AvFileSampleCfg>(request, response, "a");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<AvFileSampleCfg> page = avCfgService.getAvFileSampleList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
// 条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<AvFileSampleCfg> pageInfo = new Page<AvFileSampleCfg>(request, response, "a");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<AvFileSampleCfg> page = avCfgService.getAvFileSampleList(pageInfo, entity);
|
||||
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), AvFileSampleCfg.class);
|
||||
String cfgIndexInfoNoExport = ",group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
@@ -616,7 +619,7 @@ public class AvController extends BaseController {
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
|
||||
String timeRange = initTimeMap(entity);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
|
||||
@@ -826,23 +826,22 @@ public class FileTransferCfgController extends BaseController {
|
||||
Map<String, Class<?>> classMap = new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap = new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
|
||||
/*
|
||||
* //导出选中记录 if(!StringUtil.isEmpty(ids)){ for(String
|
||||
* id:ids.split(",")){ Long.parseLong(id); } //List<CfgIndexInfo>
|
||||
* list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename()
|
||||
* , entity.getFunctionId(), ids); }else{
|
||||
*/
|
||||
// 条件导出数据大于最大导出数,只导出最大导出条数
|
||||
entity.setTableName(IpPortCfg.getTablename());
|
||||
Page<FileDigestCfg> pageInfo = new Page<FileDigestCfg>(request, response, "a");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<FileDigestCfg> page = fileTransferCfgService.getFileDigestList(pageInfo, entity);
|
||||
List<FileDigestCfg> ipLists = new ArrayList<FileDigestCfg>();
|
||||
// 导出选中记录
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
ipLists = fileTransferCfgService.getFileByDigestList(ids);
|
||||
} else {
|
||||
Page<FileDigestCfg> pageInfo = new Page<FileDigestCfg>(request, response, "a");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<FileDigestCfg> page = fileTransferCfgService.getFileDigestList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), FileDigestCfg.class);
|
||||
String cfgIndexInfoNoExport = ",policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
|
||||
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
|
||||
@@ -858,7 +857,7 @@ public class FileTransferCfgController extends BaseController {
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
/* } */
|
||||
|
||||
String timeRange = initTimeMap(entity);
|
||||
|
||||
@@ -3,39 +3,27 @@ package com.nis.web.controller.configuration.proxy;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.callback.ProxyFileStrategyCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CachePolicyUserRegion;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.FileDigestCfg;
|
||||
import com.nis.domain.configuration.HttpBodyCfg;
|
||||
import com.nis.domain.configuration.HttpReqHeadCfg;
|
||||
import com.nis.domain.configuration.HttpResHeadCfg;
|
||||
import com.nis.domain.configuration.HttpUrlCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
@@ -43,7 +31,6 @@ import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
|
||||
import jersey.repackaged.com.google.common.collect.Lists;
|
||||
|
||||
/**
|
||||
* http重定向策略
|
||||
@@ -233,166 +220,90 @@ public class CachePolicyController extends BaseController{
|
||||
|
||||
|
||||
//http配置导出
|
||||
/*@RequestMapping(value = "exportHttp")
|
||||
public String exportHttp(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")CfgIndexInfo entity,String ids,RedirectAttributes redirectAttributes){
|
||||
try {
|
||||
//export data info
|
||||
List<String> titleList=new ArrayList<String>();
|
||||
Map<String, Class<?>> classMap=new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap=new HashMap<String, List>();
|
||||
Map<String, String> noExportMap=new HashMap<String, String>();
|
||||
|
||||
List<FunctionRegionDict> regionList = DictUtils.getFunctionRegionDictList(entity.getFunctionId());
|
||||
|
||||
//导出选中记录
|
||||
if(!StringUtil.isEmpty(ids)){
|
||||
for(String id:ids.split(",")){
|
||||
Long.parseLong(id);
|
||||
}
|
||||
//List<CfgIndexInfo> list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids);
|
||||
}else{
|
||||
//条件导出数据大于最大导出数,只导出最大导出条数
|
||||
Page<CfgIndexInfo> pageInfo=new Page<CfgIndexInfo>(request, response,"a");
|
||||
if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
}else{
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(-1);
|
||||
}
|
||||
|
||||
Page<CfgIndexInfo> page = cachePolicyService.getCachePolicyList(pageInfo, entity);
|
||||
Properties prop = getMsgProp();
|
||||
for (CfgIndexInfo str : page.getList()) {
|
||||
if(entity.getFunctionId()!=210 && entity.getFunctionId()!=211){
|
||||
String type="RESPONSE_CODE";
|
||||
if(entity.getFunctionId()==207){
|
||||
type="RESPONSE_CODE";
|
||||
}else if(entity.getFunctionId()==208){
|
||||
type="REDIRECT_RESPONSE_CODE";
|
||||
}else if(entity.getFunctionId()==209){
|
||||
type="CONTROL_REPLACE_ZONE";
|
||||
}
|
||||
String dictlabel= DictUtils.getDictLabel(type, str.getUserRegion1());
|
||||
str.setUserRegion1(prop.getProperty(dictlabel));
|
||||
if(entity.getFunctionId()==207 || entity.getFunctionId()==208){
|
||||
if(StringUtil.isEmpty(str.getUserRegion2())){
|
||||
if(!StringUtil.isEmpty(str.getUserRegion3())){
|
||||
ProxyFileStrategyCfg file= new ProxyFileStrategyCfg();
|
||||
file.setCompileId(Integer.valueOf(str.getUserRegion3()));
|
||||
List<ProxyFileStrategyCfg> allProxyFileStrategys = proxyFileStrategyService.getProxyFileStrategyCfgList(file);
|
||||
if(allProxyFileStrategys!=null && allProxyFileStrategys.size()>0){
|
||||
str.setUserRegion2(allProxyFileStrategys.get(0).getCfgDesc());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
String cfgIndexInfoNoExport=",policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
if(entity.getFunctionId()==207){
|
||||
cfgIndexInfoNoExport=",policy_name,group_name,userregion3,userregion4,userregion5,&userregion1:response_code-userregion2:response_content-";
|
||||
}else if(entity.getFunctionId()==208){
|
||||
cfgIndexInfoNoExport=",policy_name,group_name,userregion3,userregion4,userregion5,&userregion1:redirect_response_code-userregion2:redirect_url-";
|
||||
}else if(entity.getFunctionId()==209){
|
||||
cfgIndexInfoNoExport=",policy_name,group_name,userregion3,userregion4,userregion5,&userregion1:replace_zone-userregion2:replaced_content-userregion3:replace_content-";
|
||||
}else if(entity.getFunctionId()==211){
|
||||
cfgIndexInfoNoExport=",do_log,log_total,policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
}
|
||||
String httpUrlCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpReqHeadCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpResHeadCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpReqBodyCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String httpResBodyCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
String ipPortCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,";
|
||||
String ntcSubscribeIdCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
List<BaseStringCfg> httpUrlList = new ArrayList<>();
|
||||
List<ComplexkeywordCfg> httpReqHdrList = new ArrayList<>();
|
||||
List<ComplexkeywordCfg> httpResHdrList = new ArrayList<>();
|
||||
List<BaseStringCfg> httpReqBodyList = new ArrayList<>();
|
||||
List<BaseStringCfg> httpResBodyList = new ArrayList<>();
|
||||
List<IpPortCfg> ipPortList = new ArrayList<>();
|
||||
List<BaseStringCfg> subscribeIdList = new ArrayList<>();
|
||||
for (CfgIndexInfo cfg : page.getList()) {
|
||||
Map<String, List> maps=cachePolicyService.exportCachePolicy(cfg);
|
||||
httpUrlList.addAll(maps.get("NTC_HTTP_URL"));
|
||||
httpReqHdrList.addAll(maps.get("NTC_HTTP_REQ_HDR"));
|
||||
httpResHdrList.addAll(maps.get("NTC_HTTP_RES_HDR"));
|
||||
httpReqBodyList.addAll(maps.get("NTC_HTTP_REQ_BODY"));
|
||||
httpResBodyList.addAll(maps.get("NTC_HTTP_RES_BODY"));
|
||||
ipPortList.addAll(maps.get("NTC_UNIVERSAL_IP"));
|
||||
subscribeIdList.addAll(maps.get("NTC_SUBSCRIBE_ID"));
|
||||
}
|
||||
httpUrlList=BaseStringCfg.replaceBaseKeyList(httpUrlList);
|
||||
httpReqHdrList=ComplexkeywordCfg.replaceComplexKeyList(httpReqHdrList);
|
||||
httpResHdrList=ComplexkeywordCfg.replaceComplexKeyList(httpResHdrList);
|
||||
httpReqBodyList=BaseStringCfg.replaceBaseKeyList(httpReqBodyList);
|
||||
httpResBodyList=BaseStringCfg.replaceBaseKeyList(httpResBodyList);
|
||||
subscribeIdList=BaseStringCfg.baseHexList(subscribeIdList);
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("NTC_HTTP_URL");
|
||||
titleList.add("NTC_HTTP_REQ_HDR");
|
||||
classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class);
|
||||
classMap.put("NTC_HTTP_URL", HttpUrlCfg.class);
|
||||
classMap.put("NTC_HTTP_REQ_HDR", HttpReqHeadCfg.class);
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
noExportMap.put("NTC_HTTP_URL", httpUrlCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_REQ_HDR", httpReqHeadCfgNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), page.getList());
|
||||
dataMap.put("NTC_HTTP_URL", httpUrlList);
|
||||
dataMap.put("NTC_HTTP_REQ_HDR", httpReqHdrList);
|
||||
if(entity.getFunctionId()!=208 && entity.getFunctionId()!=211){
|
||||
titleList.add("NTC_HTTP_RES_BODY");
|
||||
classMap.put("NTC_HTTP_RES_BODY", HttpBodyCfg.class);
|
||||
noExportMap.put("NTC_HTTP_RES_BODY", httpResBodyCfgNoExport);
|
||||
dataMap.put("NTC_HTTP_RES_BODY", httpResBodyList);
|
||||
}else if(entity.getFunctionId()!=211){
|
||||
titleList.add("NTC_HTTP_RES_HDR");
|
||||
titleList.add("NTC_HTTP_REQ_BODY");
|
||||
classMap.put("NTC_HTTP_RES_HDR", HttpResHeadCfg.class);
|
||||
classMap.put("NTC_HTTP_REQ_BODY", HttpBodyCfg.class);
|
||||
noExportMap.put("NTC_HTTP_RES_HDR", httpResHeadCfgNoExport);
|
||||
noExportMap.put("NTC_HTTP_REQ_BODY", httpReqBodyCfgNoExport);
|
||||
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
|
||||
dataMap.put("NTC_HTTP_REQ_BODY", httpReqBodyList);
|
||||
}
|
||||
titleList.add("NTC_UNIVERSAL_IP");
|
||||
titleList.add("NTC_SUBSCRIBE_ID");
|
||||
classMap.put("NTC_UNIVERSAL_IP", IpPortCfg.class);
|
||||
classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class);
|
||||
noExportMap.put("NTC_UNIVERSAL_IP", ipPortCfgNoExport);
|
||||
noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport);
|
||||
dataMap.put("NTC_UNIVERSAL_IP", ipPortList);
|
||||
dataMap.put("NTC_SUBSCRIBE_ID",subscribeIdList);
|
||||
|
||||
}
|
||||
this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap);
|
||||
} catch (Exception e) {
|
||||
logger.error("http export failed",e);
|
||||
addMessage(redirectAttributes, "export_failed");
|
||||
@RequestMapping(value = "exportCache")
|
||||
public void exportdomain(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
@ModelAttribute("cfg")CachePolicyUserRegion entity,String ids,RedirectAttributes redirectAttributes){
|
||||
try {
|
||||
//export data info
|
||||
List<String> titleList=new ArrayList<String>();
|
||||
Map<String, Class<?>> classMap=new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap=new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
List<CachePolicyUserRegion> ipLists = new ArrayList<CachePolicyUserRegion>();
|
||||
// 导出选中记录
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
ipLists = cachePolicyService.getCachePolicyByUserRegionList(ids);
|
||||
} else {
|
||||
Page<CachePolicyUserRegion> pageInfo=new Page<CachePolicyUserRegion>(request, response,"a");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<CachePolicyUserRegion> page = cachePolicyService.getCachePolicyUserRegionList(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId();
|
||||
}*/
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entity.getFunctionId());
|
||||
Properties msgProp = getMsgProp();
|
||||
for (CachePolicyUserRegion cache : ipLists) {
|
||||
for (FunctionServiceDict service : serviceList) {
|
||||
if(cache.getAction().intValue()==service.getAction().intValue()){
|
||||
cache.setActionCode(msgProp.getProperty(service.getActionCode(),service.getActionCode()));
|
||||
}
|
||||
}
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
titleList.add("PXY_CACHE_HTTP_URL");
|
||||
titleList.add("PXY_CACHE_HTTP_COOKIE");
|
||||
classMap.put(entity.getMenuNameCode(), CachePolicyUserRegion.class);
|
||||
classMap.put("PXY_CACHE_HTTP_URL", HttpUrlCfg.class);
|
||||
classMap.put("PXY_CACHE_HTTP_COOKIE", HttpUrlCfg.class);
|
||||
String cfgIndexInfoNoExport=",block_type,policy_name,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,&action:block_type-";
|
||||
String httpUrlInfoNoExport=",block_type,do_log,action,config_describe,valid_identifier,is_audit,creator,creator"
|
||||
+ ",config_time,editor,edit_time,auditor,audit_time"
|
||||
+",letter,whether_area_block,classification,attribute,label"
|
||||
+",userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null) {
|
||||
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_edit_time_start() == null) {
|
||||
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_audit_time_start() == null) {
|
||||
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (!StringUtil.isEmpty(entity.gethColumns())) {
|
||||
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport);
|
||||
noExportMap.put("PXY_CACHE_HTTP_URL", httpUrlInfoNoExport);
|
||||
noExportMap.put("PXY_CACHE_HTTP_COOKIE", httpUrlInfoNoExport);
|
||||
List<BaseStringCfg> urlList=new ArrayList<BaseStringCfg>();
|
||||
List<BaseStringCfg> cookieList=new ArrayList<BaseStringCfg>();
|
||||
for (CachePolicyUserRegion cfg : ipLists) {
|
||||
Map<String, List> maps=cachePolicyService.getExport(Long.valueOf(cfg.getCfgId()));
|
||||
urlList.addAll(maps.get("PXY_CACHE_HTTP_URL"));
|
||||
cookieList.addAll(maps.get("PXY_CACHE_HTTP_COOKIE"));
|
||||
}
|
||||
urlList=BaseStringCfg.replaceBaseKeyList(urlList);
|
||||
cookieList=BaseStringCfg.replaceBaseKeyList(cookieList);
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
dataMap.put("PXY_CACHE_HTTP_URL", urlList);
|
||||
dataMap.put("PXY_CACHE_HTTP_COOKIE", cookieList);
|
||||
/*}*/
|
||||
String timeRange = initTimeMap(entity);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
if ("csv".equals(entity.getExType())) {
|
||||
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
} else {
|
||||
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("ip white export failed",e);
|
||||
addMessage(redirectAttributes,"error", "export_failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.PolicyGroupInfo;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.PxyObjSpoofingIpPool;
|
||||
@@ -198,4 +199,66 @@ public class PxyObjSpoofingIpPoolController extends BaseController {
|
||||
return "redirect:" + adminPath +"/proxy/spoofing/pool/list?functionId="+functionId;
|
||||
}
|
||||
|
||||
|
||||
// ip配置导出
|
||||
@RequestMapping(value = "exportIpPool")
|
||||
public void exportIpAddr(Model model, HttpServletRequest request, HttpServletResponse response,
|
||||
@ModelAttribute("cfg") PxyObjSpoofingIpPool entity, String ids, RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
// export data info
|
||||
List<String> titleList = new ArrayList<String>();
|
||||
Map<String, Class<?>> classMap = new HashMap<String, Class<?>>();
|
||||
Map<String, List> dataMap = new HashMap<String, List>();
|
||||
Map<String, String> noExportMap = new HashMap<String, String>();
|
||||
|
||||
List<PxyObjSpoofingIpPool> ipLists = new ArrayList<PxyObjSpoofingIpPool>();
|
||||
// 导出选中记录
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
ipLists = pxyObjSpoofingIpPoolService.findByPage(ids);
|
||||
} else {
|
||||
Page<PxyObjSpoofingIpPool> pageInfo = new Page<PxyObjSpoofingIpPool>(request, response, "r");
|
||||
pageInfo.setPageNo(1);
|
||||
pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE);
|
||||
Page<PxyObjSpoofingIpPool> page = pxyObjSpoofingIpPoolService.findPage(pageInfo, entity);
|
||||
ipLists = page.getList();
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), PxyObjSpoofingIpPool.class);
|
||||
String cfgIndexInfoNoExport = ",policy_name,do_log,ir_type,whether_area_block,do_blacklist,block_type,ip_pattern,client_ip,server_ip,port_pattern,client_port,server_port,direction,protocol,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
|
||||
// 时间过滤
|
||||
if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",config_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_edit_time_start() == null && entity.getSearch_edit_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",edit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (entity.getSearch_audit_time_start() == null && entity.getSearch_audit_time_end() == null) {
|
||||
cfgIndexInfoNoExport = ",audit_time" + cfgIndexInfoNoExport;
|
||||
}
|
||||
if (!StringUtil.isEmpty(entity.gethColumns())) {
|
||||
cfgIndexInfoNoExport = "," + entity.gethColumns() + "," + cfgIndexInfoNoExport;
|
||||
}
|
||||
|
||||
noExportMap.put(entity.getMenuNameCode(), cfgIndexInfoNoExport);
|
||||
dataMap.put(entity.getMenuNameCode(), ipLists);
|
||||
/* } */
|
||||
String timeRange = initTimeMap(entity);
|
||||
noExportMap.put("timeRange", timeRange);
|
||||
if ("csv".equals(entity.getExType())) {
|
||||
this._exportCsv(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
} else {
|
||||
this._export(model, request, response, redirectAttributes, entity.getMenuNameCode(), titleList,
|
||||
classMap, dataMap, noExportMap);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("ip white export failed", e);
|
||||
addMessage(redirectAttributes, "error", "export_failed");
|
||||
}
|
||||
// return "redirect:" + adminPath
|
||||
// +"/ntc/iplist/list?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import java.net.URLEncoder;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@@ -94,6 +96,49 @@ public class DashboardController extends BaseController{
|
||||
}
|
||||
return list;
|
||||
}
|
||||
/**
|
||||
* 跳转活跃端口详情界面
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="portActiveChart")
|
||||
@ResponseBody
|
||||
public List portActiveChart(String beginDate,String endDate){
|
||||
Map<String, Object> fromJsonList = new HashMap<String, Object>();
|
||||
List list = new ArrayList();
|
||||
try {
|
||||
String url=Constants.DASHBOARD_URL+Constants.TRAFFIC_PORTACTIVE_FIVEMINUTE;//+Constants.TRAFFIC_IPACTIVE_ONEHOUR;
|
||||
url=urlAddDate(url, beginDate, endDate);
|
||||
String string = HttpClientUtil.get(url);
|
||||
Gson gson = new GsonBuilder().create();
|
||||
fromJsonList = gson.fromJson(string, new TypeToken<Map>(){}.getType());
|
||||
logger.debug("活跃端口从"+beginDate+"到"+endDate+",间隔5分钟数据"+fromJsonList);
|
||||
list = (ArrayList) fromJsonList.get("data");
|
||||
return list;
|
||||
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
logger.error("活跃端口详情界面数据获取错误"+e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 跳转活跃端口详情界面
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value="portActiveList")
|
||||
public String portActiveList(Model model){
|
||||
// 默认当前时间一小时
|
||||
Calendar cal = Calendar. getInstance ();
|
||||
cal.setTime(new Date());
|
||||
String endDate = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());//获取到完整的时间
|
||||
cal.set(Calendar.HOUR_OF_DAY, cal.get(Calendar.HOUR_OF_DAY) - 1);
|
||||
String beginDate = new SimpleDateFormat( "yyyy-MM-dd HH:mm:00" ).format(cal.getTime());
|
||||
model.addAttribute("beginDate", beginDate);
|
||||
model.addAttribute("endDate", endDate);
|
||||
return "/dashboard/trafficPortActiveList";
|
||||
}
|
||||
/**
|
||||
* 活跃IP TOP10
|
||||
*/
|
||||
@@ -194,7 +239,7 @@ public class DashboardController extends BaseController{
|
||||
return "/dashboard/trafficIpActiveList";
|
||||
}
|
||||
/**
|
||||
* 活跃IP TOP10 一小时 间隔5分钟数据
|
||||
* 活跃IP TOP10 一小时每个IP的最大值
|
||||
*/
|
||||
@RequestMapping(value="ajaxIpActiveList")
|
||||
@ResponseBody
|
||||
@@ -209,6 +254,24 @@ public class DashboardController extends BaseController{
|
||||
fromJsonList = gson.fromJson(string, new TypeToken<Map<String, Object>>(){}.getType());
|
||||
logger.debug("活跃IP1小时"+fromJsonList);
|
||||
list = gson.fromJson(fromJsonList.get("data").toString(), new TypeToken<List<TrafficIpActiveStatistic>>() {}.getType()) ;
|
||||
Collections.sort(list, new Comparator<TrafficIpActiveStatistic>() {
|
||||
|
||||
@Override
|
||||
public int compare(TrafficIpActiveStatistic o1, TrafficIpActiveStatistic o2) {
|
||||
if(o1==null&&o2!=null){
|
||||
return 1;
|
||||
}
|
||||
if(o1!=null&&o2==null){
|
||||
return -1;
|
||||
}
|
||||
if(o1==o2&&o1==null){
|
||||
return 0;
|
||||
}
|
||||
Long ob1 = o1.getC2sByteLen()+o1.getS2cByteLen();
|
||||
Long ob2 = o2.getC2sByteLen()+o2.getS2cByteLen();
|
||||
return -(ob1).compareTo(ob2);
|
||||
}
|
||||
});
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -283,19 +346,19 @@ public class DashboardController extends BaseController{
|
||||
//将数字替换为标签文字
|
||||
if(list!=null&&!list.isEmpty()){
|
||||
for (Map map : list) {
|
||||
Double value1 = Double.parseDouble(map.get("protoType").toString());
|
||||
Double value1 = Double.parseDouble(map.get("protoType").toString().trim());
|
||||
for (CodeResult code : codeList) {
|
||||
Double value2 = Double.valueOf(code.getCode());
|
||||
Double value2 = Double.valueOf(code.getCode().trim());
|
||||
if(value1.equals(value2)){
|
||||
map.put("protoType", code.getItem());
|
||||
map.put("protoType", code.getItem().trim());
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 协议没匹配的匹配app码表
|
||||
for (CodeResult code : appCodeList) {
|
||||
Double value3 = Double.valueOf(code.getCode());
|
||||
Double value3 = Double.valueOf(code.getCode().trim());
|
||||
if(value1.equals(value3)){
|
||||
map.put("protoType", code.getItem());
|
||||
map.put("protoType", code.getItem().trim());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -330,11 +393,11 @@ public class DashboardController extends BaseController{
|
||||
//将数字替换为标签文字
|
||||
if(list!=null&&!list.isEmpty()){
|
||||
for (Map map : list) {
|
||||
Double value1 = Double.parseDouble(map.get("appType").toString());
|
||||
Double value1 = Double.parseDouble(map.get("appType").toString().trim());
|
||||
for (CodeResult code : codeList) {
|
||||
Double value2 = Double.valueOf(code.getCode());
|
||||
Double value2 = Double.valueOf(code.getCode().trim());
|
||||
if(value1.equals(value2)){
|
||||
map.put("appType", code.getItem());
|
||||
map.put("appType", code.getItem().trim());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -369,11 +432,11 @@ public class DashboardController extends BaseController{
|
||||
//将数字替换为标签文字
|
||||
if(list!=null&&!list.isEmpty()){
|
||||
for (Map map : list) {
|
||||
Double value1 = Double.parseDouble(map.get("osType").toString());
|
||||
Double value1 = Double.parseDouble(map.get("osType").toString().trim());
|
||||
for (CodeResult code : codeList) {
|
||||
Double value2 = Double.valueOf(code.getCode());
|
||||
Double value2 = Double.valueOf(code.getCode().trim());
|
||||
if(value1.equals(value2)){
|
||||
map.put("osType", code.getItem());
|
||||
map.put("osType", code.getItem().trim());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -403,8 +466,8 @@ public class DashboardController extends BaseController{
|
||||
//将标签文字转为数字
|
||||
Integer os=null;
|
||||
for (CodeResult codeResult : codeList1) {
|
||||
if(osType.equalsIgnoreCase(codeResult.getItem())){
|
||||
os=Integer.parseInt(codeResult.getCode());
|
||||
if(osType.equalsIgnoreCase(codeResult.getItem().trim())){
|
||||
os=Integer.parseInt(codeResult.getCode().trim());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -421,11 +484,11 @@ public class DashboardController extends BaseController{
|
||||
//将数字替换为标签文字
|
||||
if(null!=list&&!list.isEmpty()){
|
||||
for (Map map : list) {
|
||||
Double value1 = Double.parseDouble(map.get("bsType").toString());
|
||||
Double value1 = Double.parseDouble(map.get("bsType").toString().trim());
|
||||
for (CodeResult code : codeList2) {
|
||||
Double value2 = Double.valueOf(code.getCode());
|
||||
Double value2 = Double.valueOf(code.getCode().trim());
|
||||
if(value1.equals(value2)){
|
||||
map.put("bsType", code.getItem());
|
||||
map.put("bsType", code.getItem().trim());
|
||||
break;
|
||||
}
|
||||
//10个域名之外的为others 设为-1外
|
||||
@@ -465,11 +528,11 @@ public class DashboardController extends BaseController{
|
||||
//将数字替换为标签文字
|
||||
if(list!=null&&!list.isEmpty()){
|
||||
for (Map map : list) {
|
||||
Double value1 = Double.parseDouble(map.get("bsType").toString());
|
||||
Double value1 = Double.parseDouble(map.get("bsType").toString().trim());
|
||||
for (CodeResult code : codeList) {
|
||||
Double value2 = Double.valueOf(code.getCode());
|
||||
Double value2 = Double.valueOf(code.getCode().trim());
|
||||
if(value1.equals(value2)){
|
||||
map.put("bsType", code.getItem());
|
||||
map.put("bsType", code.getItem().trim());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -499,13 +562,13 @@ public class DashboardController extends BaseController{
|
||||
//将标签文字转为数字
|
||||
Integer bs=null;
|
||||
for (CodeResult codeResult : codeList1) {
|
||||
if(bsType.equalsIgnoreCase(codeResult.getItem())){
|
||||
bs=Integer.parseInt(codeResult.getCode());
|
||||
if(bsType.equalsIgnoreCase(codeResult.getItem().trim())){
|
||||
bs=Integer.parseInt(codeResult.getCode().trim());
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(bs==null){
|
||||
bs=Integer.parseInt(bsType);//处理为匹配项编码
|
||||
bs=Integer.parseInt(bsType.trim());//处理为匹配项编码
|
||||
}
|
||||
try {
|
||||
String string = HttpClientUtil.get(Constants.DASHBOARD_URL+Constants.TRAFFIC_SYSTEM_CHART+"?bsType="+bs);
|
||||
@@ -517,16 +580,16 @@ public class DashboardController extends BaseController{
|
||||
//将数字替换为标签文字
|
||||
if(null!=list&&!list.isEmpty()){
|
||||
for (Map map : list) {
|
||||
Double value1 = Double.parseDouble(map.get("osType").toString());
|
||||
Double value1 = Double.parseDouble(map.get("osType").toString().trim());
|
||||
for (CodeResult code : codeList2) {
|
||||
Double value2 = Double.valueOf(code.getCode());
|
||||
Double value2 = Double.valueOf(code.getCode().trim());
|
||||
//10个域名之外的为others webId设为-1外
|
||||
if(map.get("osType").toString().equals("-1")){
|
||||
map.put("osType", "Others");
|
||||
break;
|
||||
}
|
||||
if(value1.equals(value2)){
|
||||
map.put("osType", code.getItem());
|
||||
map.put("osType", code.getItem().trim());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -563,15 +626,15 @@ public class DashboardController extends BaseController{
|
||||
if(list!=null&&!list.isEmpty()){
|
||||
for (Map map : list) {
|
||||
Double value1=0d;
|
||||
if(StringUtil.isBlank(map.get("websiteServiceId").toString())){
|
||||
if(StringUtil.isBlank(map.get("websiteServiceId").toString().trim())){
|
||||
value1=268435455d;
|
||||
}else{
|
||||
value1 = Double.parseDouble(map.get("websiteServiceId").toString());
|
||||
value1 = Double.parseDouble(map.get("websiteServiceId").toString().trim());
|
||||
}
|
||||
for (SysDataDictionaryItem code : codeList) {
|
||||
Double value2 = Double.valueOf(code.getItemCode());
|
||||
Double value2 = Double.valueOf(code.getItemCode().trim());
|
||||
if(value1.equals(value2)){
|
||||
map.put("websiteService", code.getItemValue());
|
||||
map.put("websiteService", code.getItemValue().trim());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -611,7 +674,7 @@ public class DashboardController extends BaseController{
|
||||
if(wdt!=null){
|
||||
String domain = wdt.getDomain();
|
||||
Double domainId = wdt.getId().doubleValue();
|
||||
Double webId = Double.parseDouble(dataMap.get("webId").toString());
|
||||
Double webId = Double.parseDouble(dataMap.get("webId").toString().trim());
|
||||
//10个域名之外的为others webId设为-1外
|
||||
if(dataMap.get("webId").toString().equals("-1")){
|
||||
dataMap.put("domain", "Others");
|
||||
@@ -661,12 +724,12 @@ public class DashboardController extends BaseController{
|
||||
if(StringUtil.isBlank(map.get("topicId").toString())){
|
||||
value1=268435455d;
|
||||
}else{
|
||||
value1 = Double.parseDouble(map.get("topicId").toString());
|
||||
value1 = Double.parseDouble(map.get("topicId").toString().trim());
|
||||
}
|
||||
for (SysDataDictionaryItem code : codeList) {
|
||||
Double value2 = Double.valueOf(code.getItemCode());
|
||||
Double value2 = Double.valueOf(code.getItemCode().trim());
|
||||
if(value1.equals(value2)){
|
||||
map.put("topic", code.getItemValue());
|
||||
map.put("topic", code.getItemValue().trim());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -678,7 +741,7 @@ public class DashboardController extends BaseController{
|
||||
if(wdt!=null){
|
||||
String domain = wdt.getDomain();
|
||||
Double domainId = wdt.getId().doubleValue();
|
||||
Double webId = Double.parseDouble(dataMap.get("webId").toString());
|
||||
Double webId = Double.parseDouble(dataMap.get("webId").toString().trim());
|
||||
//10个域名之外的为others webId设为-1
|
||||
// if(dataMap.get("webId").toString().equals("-1")){
|
||||
// dataMap.put("domain", "Others");
|
||||
|
||||
@@ -98,7 +98,7 @@ public class DynamicIndexController extends BaseController {
|
||||
List<Map> results = new ArrayList<>();
|
||||
|
||||
if (hour == null || hour <= 0) {
|
||||
hour = 1;
|
||||
hour = 2;
|
||||
}
|
||||
|
||||
Date now = new Date();
|
||||
@@ -175,7 +175,8 @@ public class DynamicIndexController extends BaseController {
|
||||
List<Map> results = new ArrayList<>();
|
||||
|
||||
if (hour == null || hour <= 0) {
|
||||
hour = 24;
|
||||
//hour = 24;
|
||||
hour = 2;
|
||||
}
|
||||
|
||||
Date now = new Date();
|
||||
@@ -244,7 +245,7 @@ public class DynamicIndexController extends BaseController {
|
||||
List results = new ArrayList<>();
|
||||
|
||||
if (hour == null || hour <= 0) {
|
||||
hour = 24;
|
||||
hour = 2;
|
||||
}
|
||||
|
||||
Date now = new Date();
|
||||
|
||||
@@ -142,7 +142,7 @@ public class CollectVoipLogController extends BaseController {
|
||||
url = Constants.LOG_BASE_URL + Constants.NTC_COLLECT_VOIP_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url, params, request);
|
||||
|
||||
// GsonBuilder builder = new GsonBuilder();
|
||||
GsonBuilder builder = new GsonBuilder();
|
||||
// builder.registerTypeAdapter(Date.class, new JsonDeserializer<Date>() {
|
||||
//
|
||||
// public Date deserialize(JsonElement json, java.lang.reflect.Type typeOfT,
|
||||
@@ -150,8 +150,8 @@ public class CollectVoipLogController extends BaseController {
|
||||
// return new Date(json.getAsJsonPrimitive().getAsLong());
|
||||
// }
|
||||
// });
|
||||
// Gson gson = builder.setDateFormat("yyyy-MM-dd HH:mm:ss").create();
|
||||
Gson gson = new GsonBuilder().create();
|
||||
Gson gson = builder.setDateFormat("yyyy-MM-dd HH:mm:ss").create();
|
||||
// Gson gson = new GsonBuilder().create();
|
||||
// gson泛型支持
|
||||
LogRecvData<NtcCollectVoipLog> fromJson = gson.fromJson(jsonString,
|
||||
new TypeToken<LogRecvData<NtcCollectVoipLog>>() {
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<if test="action != null">
|
||||
AND action=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -682,10 +682,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -826,10 +826,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -956,10 +956,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -1059,10 +1059,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -1159,10 +1159,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -1260,10 +1260,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -1360,10 +1360,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -1455,10 +1455,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy}, r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -1558,10 +1558,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -1661,10 +1661,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -104,6 +104,17 @@
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="ver" property="ver" jdbcType="VARCHAR" />
|
||||
<result column="ihl" property="ihl" jdbcType="VARCHAR" />
|
||||
<result column="tos" property="tos" jdbcType="VARCHAR" />
|
||||
<result column="total_length" property="totalLength" jdbcType="VARCHAR" />
|
||||
<result column="flags" property="flags" jdbcType="VARCHAR" />
|
||||
<result column="fragment_offset" property="fragmentOffset" jdbcType="VARCHAR" />
|
||||
<result column="protocol" property="protocol" jdbcType="VARCHAR" />
|
||||
<result column="icmp_type" property="icmpType" jdbcType="VARCHAR" />
|
||||
<result column="icmp_code" property="icmpCode" jdbcType="VARCHAR" />
|
||||
<result column="icmp_identifier" property="icmpIdentifier" jdbcType="VARCHAR" />
|
||||
<result column="header_type" property="headerType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<!-- APP字符串类配置映射 -->
|
||||
<resultMap id="AppStringFeatureCfgMap" type="com.nis.domain.configuration.AppStringFeatureCfg" >
|
||||
@@ -191,7 +202,9 @@
|
||||
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
|
||||
r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY,
|
||||
r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE,
|
||||
r.DISTRICT,r.CFG_KEYWORDS,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.DO_LOG
|
||||
r.DISTRICT,r.CFG_KEYWORDS,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.DO_LOG,
|
||||
r.ver,r.ihl,r.tos,r.total_length,r.flags,r.fragment_offset,r.protocol,r.icmp_type,r.icmp_code,r.icmp_identifier,
|
||||
r.header_type
|
||||
</sql>
|
||||
|
||||
<sql id="AppStringFeatureCfg_Column" >
|
||||
@@ -339,10 +352,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy}, r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -526,14 +539,18 @@
|
||||
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
||||
DISTRICT,CFG_KEYWORDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5
|
||||
DISTRICT,CFG_KEYWORDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5,
|
||||
ver,ihl,tos,total_length,flags,fragment_offset,protocol,icmp_type,icmp_code,icmp_identifier,header_type
|
||||
)values (
|
||||
<include refid="AppCommonCfg_Value_List" />,
|
||||
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{district,jdbcType=VARCHAR},#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER},
|
||||
#{doLog,jdbcType=INTEGER},#{userRegion1,jdbcType=VARCHAR},#{userRegion2,jdbcType=VARCHAR},
|
||||
#{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR}
|
||||
#{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR},
|
||||
#{ver,jdbcType=VARCHAR},#{ihl,jdbcType=VARCHAR},#{tos,jdbcType=VARCHAR},#{totalLength,jdbcType=VARCHAR},
|
||||
#{flags,jdbcType=VARCHAR},#{fragmentOffset,jdbcType=VARCHAR},#{protocol,jdbcType=VARCHAR},#{icmpType,jdbcType=VARCHAR},
|
||||
#{icmpCode,jdbcType=VARCHAR},#{icmpIdentifier,jdbcType=VARCHAR},#{headerType,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<!-- 新增APP字符串类特征子配置 -->
|
||||
|
||||
@@ -130,10 +130,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -23,4 +23,6 @@ public interface AvCfgDao {
|
||||
public void updateAvSignSampleValid(AvSignSampleCfg entity);
|
||||
public void auditAvFileSample(AvFileSampleCfg entity);
|
||||
public void auditAvSignSample(AvSignSampleCfg entity);
|
||||
|
||||
public List<AvFileSampleCfg> getAvFileBySampleList(@Param("ids")String ids);
|
||||
}
|
||||
|
||||
@@ -190,10 +190,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -289,10 +289,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -560,4 +560,20 @@
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<select id="getAvFileBySampleList" resultMap="AvFileSampleMap" >
|
||||
SELECT
|
||||
<include refid="AvFileSample_Column" />
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
FROM av_file_sample_cfg a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
where a.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -411,10 +411,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -538,10 +538,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -1577,10 +1577,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -1886,10 +1886,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -285,10 +285,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy}, a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.CFG_ID desc
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CachePolicyUserRegion;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
@@ -39,4 +37,8 @@ public interface CommonPolicyDao {
|
||||
public void deleteHttpUrlCfg(@Param("tableName")String tableName,
|
||||
@Param("entity")BaseCfg baseCfg,
|
||||
@Param("compileIds")List compileIds);
|
||||
|
||||
public List<CachePolicyUserRegion> getCachePolicyUserRegionList(CachePolicyUserRegion entity);
|
||||
|
||||
public List<CachePolicyUserRegion> getCachePolicyByUserRegionList(@Param("ids")String ids);
|
||||
}
|
||||
|
||||
@@ -34,6 +34,42 @@
|
||||
<result column="cancel_request_id" property="cancelRequestId" jdbcType="INTEGER" />
|
||||
<result column="do_blacklist" property="doBlackList" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<resultMap id="CacheMap" type="com.nis.domain.configuration.CachePolicyUserRegion" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="dns_strategy_id" property="dnsStrategyId" jdbcType="INTEGER" />
|
||||
<result column="dns_strategy_name" property="dnsStrategyName" jdbcType="VARCHAR" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
|
||||
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
|
||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
<result column="source_compile_id" property="sourceCompileId" jdbcType="INTEGER" />
|
||||
<result column="cancel_request_id" property="cancelRequestId" jdbcType="INTEGER" />
|
||||
<result column="do_blacklist" property="doBlackList" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ipPortMap" type="com.nis.domain.configuration.IpPortCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
@@ -274,10 +310,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy}, a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.CFG_ID desc
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -814,4 +850,119 @@
|
||||
</foreach>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="getCachePolicyUserRegionList" resultMap="CacheMap" parameterType="com.nis.domain.configuration.CachePolicyUserRegion" >
|
||||
SELECT
|
||||
<include refid="ConfigIndex_Column" />
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
FROM cfg_index_info a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND a.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND a.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND a.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null and creatorName != ''">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editorName != null and editorName != ''">
|
||||
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditorName != null and auditorName != ''">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND a.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND a.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify != ''">
|
||||
AND a.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''">
|
||||
AND a.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable != ''">
|
||||
AND a.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
||||
AND a.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND a.function_id=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="strCfg!=null">
|
||||
AND a.compile_id in (select f.compile_id from common_keyword_cfg f
|
||||
<where>
|
||||
<if test="strCfg.cfgKeywords != null and strCfg.cfgKeywords != ''">
|
||||
AND REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{strCfg.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}, a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="getCachePolicyByUserRegionList" resultMap="CacheMap" parameterType="com.nis.domain.configuration.CachePolicyUserRegion" >
|
||||
SELECT
|
||||
<include refid="ConfigIndex_Column" />
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
FROM cfg_index_info a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
where a.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -286,10 +286,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy}, r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -303,7 +303,7 @@
|
||||
<include refid="ComplexkeywordCfg_Column_List_with_id"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
from ${tableName}
|
||||
from ${tableName} a
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
@@ -311,10 +311,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -122,10 +122,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -170,10 +170,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -172,10 +172,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -129,10 +129,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy}, r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -305,10 +305,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -322,7 +322,7 @@
|
||||
<include refid="HttpUrlCfg_Column_List_with_id"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
from HTTP_URL_CFG
|
||||
from HTTP_URL_CFG
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
@@ -330,10 +330,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},is_audit,CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY is_audit,CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -57,5 +57,6 @@ public interface FileTransferCfgDao extends CrudDao<CfgIndexInfo> {
|
||||
public void deleteP2pHashCfg(CfgIndexInfo entity);
|
||||
public void deleteP2pKeywordCfg(CfgIndexInfo entity);
|
||||
public void deleteP2pSubscribeIdCfg(CfgIndexInfo entity);
|
||||
public List<FileDigestCfg> getFileByDigestList(@Param("ids")String ids);
|
||||
|
||||
}
|
||||
|
||||
@@ -311,10 +311,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.CFG_ID desc
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -765,10 +765,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.CFG_ID desc
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -1153,10 +1153,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.CFG_ID desc
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -1267,4 +1267,20 @@
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<select id="getFileByDigestList" resultMap="digestCfgMap" parameterType="com.nis.domain.configuration.FileDigestCfg" >
|
||||
SELECT
|
||||
<include refid="DigestCfg_Column" />
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
FROM file_digest_cfg a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
where a.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -36,6 +36,8 @@ public interface IpAddrPoolCfgDao extends CrudDao<IpAddrPoolCfgDao>{
|
||||
Long getAddrPoolIdByName(String addrPoolName);
|
||||
|
||||
IpReuseIpCfg checkAddrPoolIp(@Param("srcIpAddress")String ip);
|
||||
|
||||
List<IpAddrPoolCfg> findByPage(@Param("ids")String ids);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -135,10 +135,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.cfg_id DESC
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -163,7 +163,7 @@
|
||||
AND r.is_audit = #{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY r.cfg_id
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</select>
|
||||
|
||||
<!-- 保存地址池IP信息 -->
|
||||
@@ -489,4 +489,28 @@
|
||||
r.is_audit != 3 AND
|
||||
r.user_region1 IS NOT NULL
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findByPage" resultMap="addrPoolMap">
|
||||
SELECT
|
||||
<include refid="addrPoolColumns"/>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name,
|
||||
e.name as editor_name,
|
||||
u.name as auditor_name,
|
||||
ri.request_title as requestName
|
||||
</trim>
|
||||
FROM
|
||||
ip_reuse_addr_pool r
|
||||
left join
|
||||
sys_user s on r.creator_id = s.id
|
||||
left join
|
||||
sys_user e on r.editor_id = e.id
|
||||
left join
|
||||
sys_user u on r.auditor_id = u.id
|
||||
left join
|
||||
request_info ri on r.request_id = ri.id
|
||||
where r.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -531,10 +531,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -548,7 +548,7 @@
|
||||
<include refid="BaseIpCfg_Column_List_with_id"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
from ${tableName}
|
||||
from ${tableName} r
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
@@ -556,10 +556,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -1141,10 +1141,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.CFG_ID desc
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -44,4 +44,8 @@ public interface IpMultiplexDao extends CrudDao<IpMultiplexDao>{
|
||||
IpReusePolicyCfg getSnatCfg(@Param("cfgId")Long cfgId,@Param("compileId")Integer compileId);
|
||||
|
||||
IpReuseDnatPolicyCfg getDnatCfg(@Param("cfgId")Long cfgId,@Param("compileId")Integer compileId);
|
||||
|
||||
List<IpReusePolicyCfg> findByPage(@Param("ids")String ids);
|
||||
|
||||
List<BaseIpCfg> findPageByDnat(@Param("ids")String ids);
|
||||
}
|
||||
|
||||
@@ -188,10 +188,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.cfg_id DESC
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -213,7 +213,7 @@
|
||||
AND r.is_valid != -1
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY r.cfg_id
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</select>
|
||||
|
||||
<insert id="savePolicyCfg" parameterType="com.nis.domain.configuration.IpReusePolicyCfg">
|
||||
@@ -684,10 +684,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.cfg_id DESC
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -709,7 +709,7 @@
|
||||
AND a.is_valid != -1
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.cfg_id
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</select>
|
||||
|
||||
<select id="getSnatCfg" resultMap="policyMap">
|
||||
@@ -739,4 +739,50 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="findByPage" resultMap="policyMap">
|
||||
SELECT
|
||||
<include refid="policyColumns"/>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name,
|
||||
e.name as editor_name,
|
||||
u.name as auditor_name,
|
||||
ri.request_title as requestName
|
||||
</trim>
|
||||
FROM
|
||||
ip_reuse_policy_cfg r
|
||||
left join
|
||||
sys_user s on r.creator_id = s.id
|
||||
left join
|
||||
sys_user e on r.editor_id = e.id
|
||||
left join
|
||||
sys_user u on r.auditor_id = u.id
|
||||
left join
|
||||
request_info ri on r.request_id = ri.id
|
||||
where a.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
<select id="findPageByDnat" resultMap="dnatPolicyMap">
|
||||
SELECT
|
||||
<include refid="dnatPolicyColumns"/>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name,
|
||||
e.name as editor_name,
|
||||
u.name as auditor_name,
|
||||
ri.request_title as requestName
|
||||
</trim>
|
||||
FROM
|
||||
ip_reuse_dnat_policy a
|
||||
left join
|
||||
sys_user s on a.creator_id = s.id
|
||||
left join
|
||||
sys_user e on a.editor_id = e.id
|
||||
left join
|
||||
sys_user u on a.auditor_id = u.id
|
||||
left join
|
||||
request_info ri on a.request_id = ri.id
|
||||
where a.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -168,10 +168,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -243,10 +243,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.CFG_ID desc
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -127,10 +127,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.CFG_ID desc
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -213,10 +213,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -296,10 +296,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_valid desc, r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
ORDER BY r.is_valid desc, r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -18,4 +18,6 @@ public interface PxyObjSpoofingIpPoolDao extends CrudDao<PxyObjSpoofingIpPool>{
|
||||
PxyObjSpoofingIpPool getPxyObjSpoofingIpPool(Long cfgId);
|
||||
int insert(PxyObjSpoofingIpPool spoofingPool);
|
||||
int update(PxyObjSpoofingIpPool spoofingPool);
|
||||
|
||||
List<PxyObjSpoofingIpPool> findByPage(@Param("ids")String ids);
|
||||
}
|
||||
@@ -121,10 +121,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
ORDER BY r.is_audit,r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -289,4 +289,23 @@
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
<!-- 查出所有 有效数据-->
|
||||
<select id="findByPage" resultMap="PxyObjSpoofingPoolMap">
|
||||
SELECT
|
||||
<include refid="PxyObjSpoofingIpPoolColumns"/>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName,p.group_name as group_name
|
||||
</trim>
|
||||
FROM pxy_obj_spoofing_ip_pool r
|
||||
left join policy_group_info p on p.group_id=r.group_id
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
left join sys_user u on r.auditor_id=u.id
|
||||
left join request_info ri on r.request_id=ri.id
|
||||
where r.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -86,10 +86,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.create_time desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.create_time desc
|
||||
ORDER BY r.is_audit,r.create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
|
||||
|
||||
@@ -346,10 +346,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_valid desc, r.is_audit,r.cfg_id desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_valid desc, r.is_audit,r.cfg_id desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
@@ -363,7 +363,7 @@
|
||||
<include refid="BaseStringCfg_Column_List_with_id"/>
|
||||
</otherwise>
|
||||
</choose>
|
||||
from ${tableName}
|
||||
from ${tableName} r
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
@@ -371,10 +371,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.cfg_id desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
ORDER BY r.is_audit,r.cfg_id desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -84,10 +84,10 @@
|
||||
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},r.is_audit,r.create_time desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.create_time desc
|
||||
ORDER BY r.is_audit,r.create_time desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -15,6 +15,6 @@ public interface UserManageDao extends CrudDao<UserManage>{
|
||||
UserManage getUserByLoginName(@Param("userName") String userName);
|
||||
List<UserManage> findList(UserManage entity);
|
||||
UserManage getUserById(@Param("id") String id);
|
||||
|
||||
List<UserManage> findByList(@Param("ids")String ids);
|
||||
List<UserManage> findUsers();
|
||||
}
|
||||
|
||||
@@ -157,4 +157,16 @@
|
||||
<include refid="Columns"/>
|
||||
from user_manage a where a.is_valid !=-1
|
||||
</select>
|
||||
|
||||
<select id="findByList" parameterType="com.nis.domain.configuration.UserManage" resultMap="userManageMap">
|
||||
SELECT
|
||||
<include refid="Columns"/>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
,s.name as creator_name ,e.name as editor_name
|
||||
</trim>
|
||||
FROM user_manage a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
where a.CFG_ID in (${ids})
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -333,10 +333,10 @@
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
ORDER BY ${page.orderBy},a.is_audit,a.CFG_ID desc
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.CFG_ID desc
|
||||
ORDER BY a.is_audit,a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
@@ -205,7 +205,8 @@ public abstract class BaseService {
|
||||
} else {
|
||||
// 如果包含全部权限,则去掉之前添加的所有条件但增加配置审核取消以及删除的配置,并跳出循环。
|
||||
sqlString = new StringBuilder();
|
||||
sqlString.append(" OR " + configAlias + ".is_audit !=3");
|
||||
// sqlString.append(" OR " + configAlias + ".is_audit !=3");
|
||||
sqlString.append(" OR " + configAlias + ".creator_id <> 1");
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(sqlString.toString())) {
|
||||
@@ -272,11 +273,14 @@ public abstract class BaseService {
|
||||
+ ".type>1)");
|
||||
|
||||
} else if (SysRole.DATA_SCOPE_CREATOR.equals(dataScope)) {
|
||||
scopeSql.append(" OR " + configAlias + ".is_audit !=3");
|
||||
// scopeSql.append(" OR " + configAlias + ".is_audit !=3");
|
||||
scopeSql.append(" OR " + configAlias + ".creator_id <>1 ");
|
||||
} else if (SysRole.DATA_SCOPE_AUDITOR.equals(dataScope)) {
|
||||
scopeSql.append(" OR " + configAlias + ".is_audit = 0 or " + configAlias + ".is_audit = 1");
|
||||
scopeSql.append(" OR " + configAlias + ".creator_id <>1 ");
|
||||
} else if (SysRole.DATA_SCOPE_SHOWER.equals(dataScope)) {
|
||||
scopeSql.append(" OR " + configAlias + ".is_audit = 1");
|
||||
scopeSql.append(" OR " + configAlias + ".creator_id <>1 ");
|
||||
}
|
||||
|
||||
return scopeSql.toString();
|
||||
|
||||
@@ -105,8 +105,52 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
}
|
||||
if(entity.getComplexList()!=null){
|
||||
for(AppComplexFeatureCfg cfg:entity.getComplexList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
if(StringUtils.isNotBlank(cfg.getDistrict()) && cfg.getDistrict().equals("L3_header")){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
cfg.setIsHexbin(1);
|
||||
cfg.setIsCaseInsenstive(0);
|
||||
cfg.setExprType(3);
|
||||
cfg.setMatchMethod(0);
|
||||
String keyword = "";
|
||||
if(cfg.getHeaderType().equals("IP_header")){
|
||||
if(StringUtils.isNoneBlank(cfg.getVer())){
|
||||
keyword += "0-3:"+cfg.getVer()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getIhl())){
|
||||
keyword += "4-7:"+cfg.getIhl()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getTos())){
|
||||
keyword += "8-15:"+cfg.getTos()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getTotalLength())){
|
||||
keyword += "16-31:"+cfg.getTotalLength()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFlags())){
|
||||
keyword += "48-50:"+cfg.getFlags()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFragmentOffset())){
|
||||
keyword += "56-63:"+cfg.getFragmentOffset()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getProtocol())){
|
||||
keyword += "72-79:"+cfg.getProtocol()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
}else{
|
||||
if(StringUtils.isNoneBlank(cfg.getIcmpType())){
|
||||
keyword += "0-7:"+cfg.getIcmpType()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getIcmpCode())){
|
||||
keyword += "8-15:"+cfg.getIcmpCode()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getIcmpIdentifier())){
|
||||
keyword += "32-47:"+cfg.getIcmpIdentifier()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
}
|
||||
keyword=keyword.substring(0,keyword.lastIndexOf(Constants.KEYWORD_EXPR));
|
||||
cfg.setCfgKeywords(keyword);
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
}else if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
cfg.setHeaderType(null);
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
}
|
||||
|
||||
@@ -155,9 +199,53 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
}
|
||||
if(entity.getComplexList()!=null){
|
||||
for(AppComplexFeatureCfg cfg:entity.getComplexList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
if(StringUtils.isNotBlank(cfg.getDistrict()) && cfg.getDistrict().equals("L3_header")){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
cfg.setIsHexbin(1);
|
||||
cfg.setIsCaseInsenstive(0);
|
||||
cfg.setExprType(3);
|
||||
cfg.setMatchMethod(0);
|
||||
String keyword = "";
|
||||
if(cfg.getHeaderType().equals("IP_header")){
|
||||
if(StringUtils.isNoneBlank(cfg.getVer())){
|
||||
keyword += "0-3:"+cfg.getVer()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getIhl())){
|
||||
keyword += "4-7:"+cfg.getIhl()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getTos())){
|
||||
keyword += "8-15:"+cfg.getTos()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getTotalLength())){
|
||||
keyword += "16-31:"+cfg.getTotalLength()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFlags())){
|
||||
keyword += "48-50:"+cfg.getFlags()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFragmentOffset())){
|
||||
keyword += "56-63:"+cfg.getFragmentOffset()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getProtocol())){
|
||||
keyword += "72-79:"+cfg.getProtocol()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
}else{
|
||||
if(StringUtils.isNoneBlank(cfg.getIcmpType())){
|
||||
keyword += "0-7:"+cfg.getIcmpType()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getIcmpCode())){
|
||||
keyword += "8-15:"+cfg.getIcmpCode()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getIcmpIdentifier())){
|
||||
keyword += "32-47:"+cfg.getIcmpIdentifier()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
}
|
||||
keyword=keyword.substring(0,keyword.lastIndexOf(Constants.KEYWORD_EXPR));
|
||||
cfg.setCfgKeywords(keyword);
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
}else if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
cfg.setHeaderType(null);
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,6 +66,12 @@ public class AvCfgService extends BaseService{
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public List<AvFileSampleCfg> getAvFileBySampleList(String ids){
|
||||
List<AvFileSampleCfg> list = avCfgDao.getAvFileBySampleList(ids);
|
||||
return list;
|
||||
}
|
||||
|
||||
public Page<AvSignSampleCfg> getAvSignSampleList(Page<AvSignSampleCfg> page, AvSignSampleCfg entity){
|
||||
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
|
||||
@@ -16,9 +16,11 @@ import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CachePolicyUserRegion;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.CommonStringCfg;
|
||||
import com.nis.domain.configuration.HttpBodyCfg;
|
||||
@@ -38,6 +40,7 @@ import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
||||
import com.nis.web.dao.configuration.CommonPolicyDao;
|
||||
@@ -69,26 +72,81 @@ public class CachePolicyService extends CrudService<WebsiteCfgDao,CfgIndexInfo>
|
||||
return entity;
|
||||
}
|
||||
|
||||
/*public Map<String, List> exportCachePolicy(CfgIndexInfo entity){
|
||||
public Page<CachePolicyUserRegion> getCachePolicyUserRegionList(Page<CachePolicyUserRegion> page, CachePolicyUserRegion entity){
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
entity.setPage(page);
|
||||
List<CachePolicyUserRegion> list = commonPolicyDao.getCachePolicyUserRegionList(entity);
|
||||
for (CachePolicyUserRegion c : list) {
|
||||
JSONObject jsonObject=JSONObject.fromObject(c.getUserRegion1());
|
||||
CachePolicyUserRegion stu=(CachePolicyUserRegion)JSONObject.toBean(jsonObject, CachePolicyUserRegion.class);
|
||||
c.setCache_cookied_cont(stu.getCache_cookied_cont());
|
||||
c.setCache_dyn_url(stu.getCache_dyn_url());
|
||||
c.setForce_caching(stu.getForce_caching());
|
||||
c.setIgnore_req_nocache(stu.getIgnore_req_nocache());
|
||||
c.setIgnore_res_nocache(stu.getIgnore_res_nocache());
|
||||
c.setInactive_time(stu.getInactive_time());
|
||||
c.setMax_cache_obj_size(stu.getMax_cache_obj_size());
|
||||
c.setMax_cache_size(stu.getMax_cache_size());
|
||||
c.setMin_use(stu.getMin_use());
|
||||
c.setNo_revalidate(stu.getNo_revalidate());
|
||||
c.setPinning_time(stu.getPinning_time());
|
||||
if(stu.getCache_key()!=null){
|
||||
String ignore=String.valueOf(stu.getCache_key().get("ignore_qs"));
|
||||
String cookie=String.valueOf(stu.getCache_key().get("cookie"));
|
||||
if(!ignore.equals("null") && ignore!=null){
|
||||
c.setIgnore_qs(ignore);
|
||||
}
|
||||
if(!cookie.equals("null") && cookie!=null){
|
||||
c.setCookie(cookie);
|
||||
}
|
||||
}
|
||||
}
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
|
||||
public List<CachePolicyUserRegion> getCachePolicyByUserRegionList(String ids){
|
||||
List<CachePolicyUserRegion> list = commonPolicyDao.getCachePolicyByUserRegionList(ids);
|
||||
for (CachePolicyUserRegion c : list) {
|
||||
JSONObject jsonObject=JSONObject.fromObject(c.getUserRegion1());
|
||||
CachePolicyUserRegion stu=(CachePolicyUserRegion)JSONObject.toBean(jsonObject, CachePolicyUserRegion.class);
|
||||
c.setCache_cookied_cont(stu.getCache_cookied_cont());
|
||||
c.setCache_dyn_url(stu.getCache_dyn_url());
|
||||
c.setForce_caching(stu.getForce_caching());
|
||||
c.setIgnore_req_nocache(stu.getIgnore_req_nocache());
|
||||
c.setIgnore_res_nocache(stu.getIgnore_res_nocache());
|
||||
c.setInactive_time(stu.getInactive_time());
|
||||
c.setMax_cache_obj_size(stu.getMax_cache_obj_size());
|
||||
c.setMax_cache_size(stu.getMax_cache_size());
|
||||
c.setMin_use(stu.getMin_use());
|
||||
c.setNo_revalidate(stu.getNo_revalidate());
|
||||
c.setPinning_time(stu.getPinning_time());
|
||||
if(stu.getCache_key()!=null){
|
||||
String ignore=String.valueOf(stu.getCache_key().get("ignore_qs"));
|
||||
String cookie=String.valueOf(stu.getCache_key().get("cookie"));
|
||||
if(!ignore.equals("null") && ignore!=null){
|
||||
c.setIgnore_qs(ignore);
|
||||
}
|
||||
if(!cookie.equals("null") && cookie!=null){
|
||||
c.setCookie(cookie);
|
||||
}
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public Map<String, List> getExport(Long cfgId){
|
||||
Map<String, List> dataMap=new HashMap<String, List>();
|
||||
List<HttpUrlCfg> httpUrlList = commonPolicyDao.getHttpUrlList(entity);
|
||||
List<HttpReqHeadCfg> httpReqHdrList = commonPolicyDao.getHttpReqHdrList(entity);
|
||||
List<HttpResHeadCfg> httpResHdrList = commonPolicyDao.getHttpResHdrList(entity);
|
||||
List<IpPortCfg> ipPortCfgList = commonPolicyDao.getIpPortList(entity);
|
||||
entity.setCfgType(Constants.HTTP_REDIRECT_REQ_BODY_REGION);
|
||||
List<HttpBodyCfg> httpReqBodyList = commonPolicyDao.getHttpReqBodyList(entity);
|
||||
entity.setCfgType(Constants.HTTP_REDIRECT_RES_BODY_REGION);
|
||||
List<HttpBodyCfg> httpResBodyList = commonPolicyDao.getHttpResBodyList(entity);
|
||||
List<NtcSubscribeIdCfg> subscribeIdList = stringCfgDao.findSubscribeIdCfgListByCfgIndexInfo(entity);
|
||||
dataMap.put("NTC_UNIVERSAL_IP", ipPortCfgList);
|
||||
dataMap.put("NTC_CACHE_URL", httpUrlList);
|
||||
dataMap.put("NTC_HTTP_REQ_HDR", httpReqHdrList);
|
||||
dataMap.put("NTC_HTTP_RES_HDR", httpResHdrList);
|
||||
dataMap.put("NTC_HTTP_REQ_BODY", httpReqBodyList);
|
||||
dataMap.put("NTC_HTTP_RES_BODY", httpResBodyList);
|
||||
dataMap.put("NTC_SUBSCRIBE_ID", subscribeIdList);
|
||||
CfgIndexInfo entity = commonPolicyDao.getPolicyById(cfgId);
|
||||
entity.setCfgType("PXY_CACHE_HTTP_URL");
|
||||
List<BaseStringCfg> urlList = commonPolicyDao.getCommonStringList(entity);
|
||||
entity.setCfgType("PXY_CACHE_HTTP_COOKIE");
|
||||
List<BaseStringCfg> cookieList = commonPolicyDao.getCommonStringList(entity);
|
||||
dataMap.put("PXY_CACHE_HTTP_URL", urlList);
|
||||
dataMap.put("PXY_CACHE_HTTP_COOKIE", cookieList);
|
||||
return dataMap;
|
||||
}*/
|
||||
}
|
||||
|
||||
public Page<CfgIndexInfo> getCachePolicyList(Page<CfgIndexInfo> page, CfgIndexInfo entity){
|
||||
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
||||
|
||||
@@ -401,6 +401,15 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
return page;
|
||||
}
|
||||
|
||||
public List<FileDigestCfg> getFileByDigestList(String ids){
|
||||
List<FileDigestCfg> list = fileTransferCfgDao.getFileByDigestList(ids);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public FileDigestCfg getFileDigestCfg(Long cfgId,Integer compileId){
|
||||
FileDigestCfg entity = fileTransferCfgDao.getFileDigest(cfgId,compileId);
|
||||
List<NtcSubscribeIdCfg> subscribeidList = fileTransferCfgDao.getFileDigestSubscribeidList(entity);
|
||||
|
||||
@@ -54,6 +54,11 @@ public class IpAddrPoolCfgService extends BaseService{
|
||||
return page;
|
||||
}
|
||||
|
||||
public List<IpAddrPoolCfg> findByPage(String ids) {
|
||||
List<IpAddrPoolCfg> list=ipAddrPoolCfgDao.findByPage(ids);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据跳转表单
|
||||
* @param id
|
||||
|
||||
@@ -43,6 +43,11 @@ public class IpMultiplexService extends BaseService{
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public List<IpReusePolicyCfg> findByPage(String ids) {
|
||||
List<IpReusePolicyCfg> list=ipMultiplexDao.findByPage(ids);
|
||||
return list;
|
||||
}
|
||||
|
||||
public IpReusePolicyCfg getPolicyCfg(Long cfgId, Integer isValid) {
|
||||
List<IpReusePolicyCfg> list=ipMultiplexDao.findList(cfgId,isValid);
|
||||
@@ -284,6 +289,12 @@ public class IpMultiplexService extends BaseService{
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public List<BaseIpCfg> findPageByDnat(String ids) {
|
||||
List<BaseIpCfg> list=ipMultiplexDao.findPageByDnat(ids);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
public IpReuseDnatPolicyCfg getDnatPolicyCfg(Long cfgId, Integer isValid) {
|
||||
List<IpReuseDnatPolicyCfg> list=ipMultiplexDao.findDnatList(cfgId,isValid);
|
||||
|
||||
@@ -73,6 +73,11 @@ public class PxyObjSpoofingIpPoolService extends BaseService{
|
||||
return page;
|
||||
}
|
||||
|
||||
public List<PxyObjSpoofingIpPool> findByPage(String ids) {
|
||||
List<PxyObjSpoofingIpPool> list=pxyObjSpoofingIpPoolDao.findByPage(ids);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
public List<PxyObjSpoofingIpPool> findPxyObjSpoofingIpPools(PxyObjSpoofingIpPool entity) {
|
||||
List<PxyObjSpoofingIpPool> list=pxyObjSpoofingIpPoolDao.findList(entity);
|
||||
@@ -212,7 +217,7 @@ public class PxyObjSpoofingIpPoolService extends BaseService{
|
||||
if(!ispList.contains(ispCode)){
|
||||
ispList.add(ispCode);
|
||||
}
|
||||
map.replace(areaCode, ispList);
|
||||
//map.replace(areaCode, ispList);
|
||||
}
|
||||
}else {
|
||||
// 区域
|
||||
|
||||
@@ -47,6 +47,13 @@ public class UserManageService extends BaseService{
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public List<UserManage> findByPage(String ids ) {
|
||||
List<UserManage> list=userManageDao.findByList(ids);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
public UserManage getUserByLoginName(String userName) {
|
||||
return userManageDao.getUserByLoginName(userName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user