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 { 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)){