Merge branch 'bugfix-2019012718-export-ddos' into 'develop'

配置导出统一显示全部区域显示,子配置中去掉日志总量,在主配置显示

See merge request K18_NTCS_WEB/NTC!26
This commit is contained in:
方顺健
2019-01-27 20:18:40 +08:00
3 changed files with 20 additions and 2 deletions

View File

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

View File

@@ -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;
}
}

View File

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