summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhanghongqing <[email protected]>2019-01-27 18:32:02 +0800
committerzhanghongqing <[email protected]>2019-01-27 18:32:02 +0800
commit715e9b3c73a91b6540085a54cc769f02196ee401 (patch)
tree0689f2fdfd0aea5b3e1f3fe9ffc0146b685e4745
parent5923554e5216921717e8f4c4c96f9de3452e9cea (diff)
配置导出统一显示全部区域显示,子配置中去掉日志总量,在主配置显示
-rw-r--r--src/main/java/com/nis/domain/configuration/BaseIpCfg.java2
-rw-r--r--src/main/java/com/nis/domain/configuration/DdosIpCfg.java8
-rw-r--r--src/main/java/com/nis/util/excel/ExcelCsv.java12
3 files changed, 20 insertions, 2 deletions
diff --git a/src/main/java/com/nis/domain/configuration/BaseIpCfg.java b/src/main/java/com/nis/domain/configuration/BaseIpCfg.java
index 1d543f06b..a43e094ba 100644
--- a/src/main/java/com/nis/domain/configuration/BaseIpCfg.java
+++ b/src/main/java/com/nis/domain/configuration/BaseIpCfg.java
@@ -75,7 +75,7 @@ public class BaseIpCfg extends BaseCfg<BaseIpCfg> {
protected String organization; //仅用于copy属性使用
protected String country; //仅用于copy属性使用
protected String detail; //仅用于copy属性使用
- @ExcelField(title="log_total",sort=42)
+// @ExcelField(title="log_total",sort=42)
private Long totalLogs;
public String getOrganization() {
diff --git a/src/main/java/com/nis/domain/configuration/DdosIpCfg.java b/src/main/java/com/nis/domain/configuration/DdosIpCfg.java
index d57e8d577..d8a3172d5 100644
--- a/src/main/java/com/nis/domain/configuration/DdosIpCfg.java
+++ b/src/main/java/com/nis/domain/configuration/DdosIpCfg.java
@@ -29,6 +29,8 @@ public class DdosIpCfg extends BaseIpCfg {
private Long bpsThreadshold;// 即DDoS攻击保护动作触发阈值,每秒Bit数和每秒包数
@ExcelField(title="pps_threadshold",sort=48)
private Long ppsThreadshold;
+ @ExcelField(title="log_total",sort=42)
+ private Long totalLogs;
public String getAntiddosProtocol() {
return antiddosProtocol;
@@ -54,6 +56,12 @@ public class DdosIpCfg extends BaseIpCfg {
public void setIndexTable(String indexTable) {
this.indexTable = indexTable;
}
+ public Long getTotalLogs() {
+ return totalLogs;
+ }
+ public void setTotalLogs(Long totalLogs) {
+ this.totalLogs = totalLogs;
+ }
}
diff --git a/src/main/java/com/nis/util/excel/ExcelCsv.java b/src/main/java/com/nis/util/excel/ExcelCsv.java
index 9cb812f03..d2bdd346e 100644
--- a/src/main/java/com/nis/util/excel/ExcelCsv.java
+++ b/src/main/java/com/nis/util/excel/ExcelCsv.java
@@ -286,8 +286,8 @@ public class ExcelCsv {
}
}
// If is dict, get dict label
+ String valStr=val==null?"":val.toString();
if (StringUtils.isNotBlank(ef.dictType())){
- String valStr=val==null?"":val.toString();
if("type".equals(ef.dictType()) || "attribute".equals(ef.dictType())
|| "label".equals(ef.dictType())){
// Get basic info
@@ -308,6 +308,16 @@ public class ExcelCsv {
}
}
+ if(ef.title().equals("whether_area_block")&&!StringUtil.isEmpty(val)){
+ Integer whetherAreaBlock=Integer.parseInt(valStr);
+ if(whetherAreaBlock.equals(0)){
+ val = msgProp.getProperty("all","all");
+ }else if(whetherAreaBlock.equals(1)){
+ val = msgProp.getProperty("selective","selective");
+ }else{
+ val ="";
+ }
+ }
if(ef.title().equals("is_hex") && !StringUtil.isEmpty(val)){
Integer isHex=Integer.parseInt(val.toString());
if(isHex.equals(0) || isHex.equals(2)){