配置导入增加‘配置描述’非空限制;dns block配置导入增加默认策略;修改用户行为统计查询时间范围限制

This commit is contained in:
zhangwenqing
2019-01-10 18:32:11 +08:00
parent f04fb1090c
commit daa2e55682
6 changed files with 38 additions and 19 deletions

View File

@@ -92,8 +92,12 @@ public class CheckAppFeatureComplexStringFormatThread implements Callable<String
StringBuffer errInfo = new StringBuffer();
AppComplexFeatureCfg baseStringCfg = new AppComplexFeatureCfg();
BeanUtils.copyProperties(list.get(i), baseStringCfg);
// 配置描述长度限制
if(baseStringCfg.getCfgDesc().length() > 128) {
String cfgDesc = baseStringCfg.getCfgDesc();
// 配置描述限制
if(StringUtils.isBlank(cfgDesc)) {
errInfo.append(
String.format(prop.getProperty("can_not_null"), prop.getProperty("config_describe")) + ";");
}else if(cfgDesc.length() > 128) {
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
}
@@ -151,14 +155,7 @@ public class CheckAppFeatureComplexStringFormatThread implements Callable<String
if (StringUtils.isNotBlank(dirtrictP)) {
if (StringUtils.isBlank(district)) {
if (dirtrictP.indexOf(",") == -1) {
baseStringCfg.setDistrict(dirtrictP);
} else {
// baseStringCfg.setDistrict(dirtrictP.split(",")[0]);
errInfo.append(
String.format(prop.getProperty("can_not_null"), prop.getProperty("district") + " ")
+ ";");
}
baseStringCfg.setDistrict(dirtrictP.split(",")[0]);
} else if (dirtrictP.indexOf(district) == -1) {
errInfo.append(
String.format(prop.getProperty("is_incorrect"), prop.getProperty("district") + " ")

View File

@@ -90,8 +90,12 @@ public class CheckComplexStringFormatThread implements Callable<String>{
StringBuffer errInfo = new StringBuffer();
ComplexkeywordCfg baseStringCfg = new ComplexkeywordCfg();
BeanUtils.copyProperties(list.get(i), baseStringCfg);
String cfgDesc = baseStringCfg.getCfgDesc();
// 配置描述、关键字长度限制
if(baseStringCfg.getCfgDesc().length() > 128) {
if(StringUtils.isBlank(cfgDesc)) {
errInfo.append(
String.format(prop.getProperty("can_not_null"), prop.getProperty("config_describe")) + ";");
}else if(cfgDesc.length() > 128) {
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
}
if(baseStringCfg.getCfgKeywords().length() < 4 || baseStringCfg.getCfgKeywords().length() > 1024){
@@ -101,6 +105,9 @@ public class CheckComplexStringFormatThread implements Callable<String>{
if (regionDict.getRegionType().equals(3)) {
if (regionDict.getFunctionId().equals(7)) {
Long dnsStrategyId = baseStringCfg.getDnsStrategyId();
if(dnsStrategyId == null) { // 默认策略
dnsStrategyId = Long.parseLong("0");
}
if (dnsStrategyId != null&&dnsStrategyId>0) {
List<DnsResStrategy> dnsStrategys = DictUtils.getDnsResStrategyList(dnsStrategyId);
if (dnsStrategys == null || dnsStrategys.size() == 0) {

View File

@@ -104,8 +104,12 @@ public class CheckIpFormatThread implements Callable<String>{
StringBuffer errInfo = new StringBuffer();
IpPortCfg baseIpCfg = new IpPortCfg();
BeanUtils.copyProperties(list.get(i), baseIpCfg);
// 配置描述长度限制
if(baseIpCfg.getCfgDesc()!=null&&baseIpCfg.getCfgDesc().length() > 128) {
String cfgDesc = baseIpCfg.getCfgDesc();
// 配置描述限制
if(StringUtils.isBlank(cfgDesc)) {
errInfo.append(
String.format(prop.getProperty("can_not_null"), prop.getProperty("config_describe")) + ";");
}else if(cfgDesc.length() > 128) {
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
}
@@ -182,6 +186,9 @@ public class CheckIpFormatThread implements Callable<String>{
// dns ip
if (regionDict.getFunctionId().equals(7)) {
Integer dnsStrategyId = baseIpCfg.getDnsStrategyId();
if(dnsStrategyId == null) { // 默认策略
dnsStrategyId = 0;
}
if (dnsStrategyId != null&&dnsStrategyId>0) {
List<DnsResStrategy> dnsStrategys = DictUtils.getDnsResStrategyList(Long.valueOf(dnsStrategyId));
if (dnsStrategys == null || dnsStrategys.size() == 0) {

View File

@@ -88,8 +88,12 @@ public class CheckStringFormatThread implements Callable<String>{
StringBuffer errInfo = new StringBuffer();
BaseStringCfg baseStringCfg = new BaseStringCfg();
BeanUtils.copyProperties(list.get(i), baseStringCfg);
// 配置描述、关键字长度限制
if(baseStringCfg.getCfgDesc().length() > 128) {
String cfgDesc = baseStringCfg.getCfgDesc();
// 配置描述限制
if(StringUtils.isBlank(cfgDesc)) {
errInfo.append(
String.format(prop.getProperty("can_not_null"), prop.getProperty("config_describe")) + ";");
}else if(cfgDesc.length() > 128) {
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
}

View File

@@ -89,8 +89,12 @@ public class CheckTopicWebsiteFormatThread implements Callable<String>{
StringBuffer errInfo = new StringBuffer();
AppTopicDomainCfg baseStringCfg = new AppTopicDomainCfg();
BeanUtils.copyProperties(list.get(i), baseStringCfg);
// 配置描述、关键字长度限制
if(baseStringCfg.getCfgDesc().length() > 128) {
String cfgDesc = baseStringCfg.getCfgDesc();
// 配置描述限制
if(StringUtils.isBlank(cfgDesc)) {
errInfo.append(
String.format(prop.getProperty("can_not_null"), prop.getProperty("config_describe")) + ";");
}else if(cfgDesc.length() > 128) {
errInfo.append(prop.getProperty("config_describe")+prop.getProperty("length_error")+" "+String.format(prop.getProperty("max_length")+":128") + ";");
}

View File

@@ -222,7 +222,7 @@
<%-- value="${log.searchFoundStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'${nowTime}'});"/> --%>
<input id="searchFoundStartTime" name="searchFoundStartTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="${log.searchFoundStartTime}" onclick="WdatePicker({onpicked:setReportTime,dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{$dp.$D(\'searchFoundEndTime\')}'});"/>
value="${log.searchFoundStartTime}" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setStartTime('#searchFoundStartTime','#searchFoundEndTime',1,'w','yyyy-MM-dd hh:mm:ss',false)"/>
</div>
</div>
<div class="pull-left">
@@ -234,7 +234,7 @@
<%-- value="${log.searchFoundEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'${nowTime}'});"/> --%>
<input id="searchFoundEndTime" name="searchFoundEndTime" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="${log.searchFoundEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,minDate:'#F{$dp.$D(\'searchFoundStartTime\')}',maxDate:'#F{$dp.$D(\'searchFoundStartTime\',{d:7})}'});"/>
value="${log.searchFoundEndTime}" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setEndTime('#searchFoundStartTime','#searchFoundEndTime',1,'w','yyyy-MM-dd hh:mm:ss',false)"/>
</div>
</div>
<div class="pull-left accountSearch">