diff --git a/src/main/java/com/nis/domain/basics/PolicyGroupInfo.java b/src/main/java/com/nis/domain/basics/PolicyGroupInfo.java index db39aa4fd..162c76306 100644 --- a/src/main/java/com/nis/domain/basics/PolicyGroupInfo.java +++ b/src/main/java/com/nis/domain/basics/PolicyGroupInfo.java @@ -22,7 +22,7 @@ public class PolicyGroupInfo extends BaseCfg implements Seriali private Integer groupType; private Integer serviceGroupId; private String description; - private Integer asnNo; + private Long asnNo; public Integer getServiceGroupId() { return serviceGroupId; @@ -66,10 +66,10 @@ public class PolicyGroupInfo extends BaseCfg implements Seriali public void setDescription(String description) { this.description = description; } - public Integer getAsnNo() { + public Long getAsnNo() { return asnNo; } - public void setAsnNo(Integer asnNo) { + public void setAsnNo(Long asnNo) { this.asnNo = asnNo; } diff --git a/src/main/java/com/nis/domain/configuration/BaseStringCfg.java b/src/main/java/com/nis/domain/configuration/BaseStringCfg.java index 7d9c43222..802003922 100644 --- a/src/main/java/com/nis/domain/configuration/BaseStringCfg.java +++ b/src/main/java/com/nis/domain/configuration/BaseStringCfg.java @@ -43,7 +43,14 @@ public class BaseStringCfg extends BaseCfg { protected Integer appCode;//仅用于copy属性使用 protected Integer behavCode;//仅用于copy属性使用 protected Integer specServiceId;//仅用于copy属性使用 + protected String domain;//仅用于copy属性使用 + public String getDomain() { + return domain; + } + public void setDomain(String domain) { + this.domain = domain; + } public Integer getAppCode() { return appCode; } diff --git a/src/main/java/com/nis/domain/configuration/template/AppDomainTemplate.java b/src/main/java/com/nis/domain/configuration/template/AppDomainTemplate.java new file mode 100644 index 000000000..4b379f180 --- /dev/null +++ b/src/main/java/com/nis/domain/configuration/template/AppDomainTemplate.java @@ -0,0 +1,58 @@ +/** + *@Title: BaseStringConfig.java + *@Package com.nis.domain.restful + *@Description TODO + *@author dell + *@date 2018年2月5日 下午5:26:02 + *@version 版本号 + */ +package com.nis.domain.configuration.template; + +import com.nis.util.excel.ExcelField; + +/** + * @Description: excel导入字符串类配置 + */ +public class AppDomainTemplate { + private String cfgDesc; + private String cfgKeywords; + private Integer matchMethod ; + private Integer isHex; + private Integer isCaseInsenstive; + + @ExcelField(title="config_describe",align=2,sort=1) + public String getCfgDesc() { + return cfgDesc; + } + public void setCfgDesc(String cfgDesc) { + this.cfgDesc = cfgDesc; + } + @ExcelField(title="domain_name",sort=2) + public String getCfgKeywords() { + return cfgKeywords; + } + public void setCfgKeywords(String cfgKeywords) { + this.cfgKeywords = cfgKeywords; + } + @ExcelField(title="match_method",dictType="MATCH_METHOD",sort=13) + public Integer getMatchMethod() { + return matchMethod; + } + public void setMatchMethod(Integer matchMethod) { + this.matchMethod = matchMethod; + } + @ExcelField(title="is_hex",dictType="IS_HEX",sort=14) + public Integer getIsHex() { + return isHex; + } + public void setIsHex(Integer isHex) { + this.isHex = isHex; + } + @ExcelField(title="is_case_insenstive",dictType="CASE_INSENSTIVE",sort=15) + public Integer getIsCaseInsenstive() { + return isCaseInsenstive; + } + public void setIsCaseInsenstive(Integer isCaseInsenstive) { + this.isCaseInsenstive = isCaseInsenstive; + } +} diff --git a/src/main/java/com/nis/domain/specific/ConfigGroupInfo.java b/src/main/java/com/nis/domain/specific/ConfigGroupInfo.java index 95de31a55..b00eea4fe 100644 --- a/src/main/java/com/nis/domain/specific/ConfigGroupInfo.java +++ b/src/main/java/com/nis/domain/specific/ConfigGroupInfo.java @@ -16,12 +16,12 @@ public class ConfigGroupInfo { private Integer groupType; @ExcelField(title="cfg_id",sort=301) private Integer compileId; - private Integer asnId; + private Long asnId; - public Integer getAsnId() { + public Long getAsnId() { return asnId; } - public void setAsnId(Integer asnId) { + public void setAsnId(Long asnId) { this.asnId = asnId; } public Integer getCompileId() { diff --git a/src/main/java/com/nis/util/Constants.java b/src/main/java/com/nis/util/Constants.java index ae846b188..4afcb70d0 100644 --- a/src/main/java/com/nis/util/Constants.java +++ b/src/main/java/com/nis/util/Constants.java @@ -56,6 +56,10 @@ public final class Constants { * 配置审核下发的类型 回调类型 */ public static final int CALLBACK_TYPE=2; + /** + * 域名验证正则 + */ + public static final String DOMAIN_REGEXP=Configurations.getStringProperty("domain_regexp", "*"); /** * IP验证正则 */ diff --git a/src/main/java/com/nis/util/excel/ImportExcel.java b/src/main/java/com/nis/util/excel/ImportExcel.java index c557130ed..5291357fe 100644 --- a/src/main/java/com/nis/util/excel/ImportExcel.java +++ b/src/main/java/com/nis/util/excel/ImportExcel.java @@ -17,11 +17,14 @@ import java.util.List; import java.util.Properties; import org.apache.commons.lang3.StringUtils; +import org.apache.hadoop.hbase.protobuf.generated.CellProtos.CellType; +import org.apache.poi.hssf.usermodel.HSSFDataFormatter; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.DateUtil; import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Row.MissingCellPolicy; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook; @@ -219,6 +222,35 @@ public class ImportExcel { } return val; } + /** + * 获取单元格值 + * @param row 获取的行 + * @param column 获取单元格列号 + * @return 单元格值 + */ + public Object getStringCellValue(Row row, int column){ + Object val = ""; + try{ + Cell cell = row.getCell(column); + if (cell != null){ + if (cell.getCellType() == Cell.CELL_TYPE_NUMERIC){ + HSSFDataFormatter dataFormatter = new HSSFDataFormatter(); + val = dataFormatter.formatCellValue(cell); + }else if (cell.getCellType() == Cell.CELL_TYPE_STRING){ + val = cell.getStringCellValue(); + }else if (cell.getCellType() == Cell.CELL_TYPE_FORMULA){ + val = cell.getCellFormula(); + }else if (cell.getCellType() == Cell.CELL_TYPE_BOOLEAN){ + val = cell.getBooleanCellValue(); + }else if (cell.getCellType() == Cell.CELL_TYPE_ERROR){ + val = cell.getErrorCellValue(); + } + } + }catch (Exception e) { + return val; + } + return val; + } /** * //递归获取cls实体对象及父级对象的属性 * wx:修改,子类覆盖父类的同名方法 @@ -786,7 +818,8 @@ public class ImportExcel { Row row = this.getRow(i); StringBuilder sb = new StringBuilder(); for (Object[] os : annotationList){ - Object val = this.getCellValue(row, column++); +// Object val = this.getCellValue(row, column++); + Object val = this.getStringCellValue(row, column++); if (val != null){ ExcelField ef = (ExcelField)os[0]; // If is dict type, get dict value diff --git a/src/main/java/com/nis/web/controller/BaseController.java b/src/main/java/com/nis/web/controller/BaseController.java index faaa39ad7..1233acf48 100644 --- a/src/main/java/com/nis/web/controller/BaseController.java +++ b/src/main/java/com/nis/web/controller/BaseController.java @@ -55,6 +55,7 @@ import com.nis.domain.configuration.DnsResStrategy; import com.nis.domain.configuration.IpPortCfg; import com.nis.domain.configuration.RequestInfo; import com.nis.domain.configuration.StringCfgTemplate; +import com.nis.domain.configuration.template.AppDomainTemplate; import com.nis.domain.configuration.template.AsnIpTemplate; import com.nis.domain.configuration.template.ComplexStringAllTemplate; import com.nis.domain.configuration.template.DdosIpTemplate; @@ -857,6 +858,7 @@ public class BaseController { } StringBuffer errTip = new StringBuffer(); Pattern pattern = Pattern.compile("\t|\r|\n|\b|\f"); + Pattern domainPattern = Pattern.compile(Constants.DOMAIN_REGEXP); for (int i = 0; i < list.size(); i++) { StringBuffer errInfo = new StringBuffer(); BaseStringCfg baseStringCfg = new BaseStringCfg(); @@ -880,47 +882,71 @@ public class BaseController { } } String keyword = baseStringCfg.getCfgKeywords(); - if (StringUtils.isBlank(keyword)) { - errInfo.append( - String.format(prop.getProperty("can_not_null"), prop.getProperty("key_word") + " ") + ";"); - } - if (mulityKeywordsP.equals("0")) { - if (keyword.indexOf("\n") > -1) { + if (!regionDict.getFunctionId().equals(403)) { + if (StringUtils.isBlank(keyword)) { errInfo.append( - String.format(prop.getProperty("not_multiple"), prop.getProperty("key_word")) + ";"); + String.format(prop.getProperty("can_not_null"), prop.getProperty("key_word") + " ") + ";"); } - Matcher m = pattern.matcher(keyword); - if (m.find()) { - errInfo.append(String.format(prop.getProperty("has_invisible_char"), - prop.getProperty("key_word") + " '" + keyword + "'") + ";"); - } - } else { - boolean has = false; - Set keywordSet=Sets.newHashSet(); - for (String key : keyword.split("\n")) { - Matcher m = pattern.matcher(key); + if (mulityKeywordsP.equals("0")) { + if (keyword.indexOf("\n") > -1) { + errInfo.append( + String.format(prop.getProperty("not_multiple"), prop.getProperty("key_word")) + ";"); + } + Matcher m = pattern.matcher(keyword); if (m.find()) { - has = true; errInfo.append(String.format(prop.getProperty("has_invisible_char"), - prop.getProperty("key_word") + " '" + key + "'") + ";"); - break; + prop.getProperty("key_word") + " '" + keyword + "'") + ";"); } - if(!keywordSet.contains(key)) { - keywordSet.add(key); - }else { - errInfo.append(prop.getProperty("key_word") + " '" + key + "'"+" "+prop.getProperty("repeat") + ";"); + } else { + boolean has = false; + Set keywordSet=Sets.newHashSet(); + for (String key : keyword.split("\n")) { + Matcher m = pattern.matcher(key); + if (m.find()) { + has = true; + errInfo.append(String.format(prop.getProperty("has_invisible_char"), + prop.getProperty("key_word") + " '" + key + "'") + ";"); + break; + } + if(!keywordSet.contains(key)) { + keywordSet.add(key); + }else { + errInfo.append(prop.getProperty("key_word") + " '" + key + "'"+" "+prop.getProperty("repeat") + ";"); + } + } + if (!has) { + if(keyword.replaceAll("\n","").length()>1024) { + errInfo.append(String.format(prop.getProperty("most_keywords"), + prop.getProperty("key_word")) + ";"); + }else { + String reWord = keyword.replaceAll("\n", Constants.KEYWORD_EXPR); + baseStringCfg.setCfgKeywords(reWord); + } } } - if (!has) { - if(keyword.replaceAll("\n","").length()>1024) { - errInfo.append(String.format(prop.getProperty("most_keywords"), - prop.getProperty("key_word")) + ";"); + }else { + if (StringUtils.isBlank(keyword)) { + errInfo.append( + String.format(prop.getProperty("can_not_null"), prop.getProperty("domain_name") + " ") + ";"); + }else { + Matcher m = pattern.matcher(keyword); + if (m.find()) { + errInfo.append(String.format(prop.getProperty("has_invisible_char"), + prop.getProperty("domain_name") + " '" + keyword + "'") + ";"); }else { - String reWord = keyword.replaceAll("\n", Constants.KEYWORD_EXPR); - baseStringCfg.setCfgKeywords(reWord); + m = domainPattern.matcher(keyword); + if(!m.matches()) { + errInfo.append(String.format(prop.getProperty("not_valid_domain"), + prop.getProperty("domain_name") + " '" + keyword + "'") + ";"); + }else { + baseStringCfg.setDomain(keyword); + } + } } + } + Integer exprType = baseStringCfg.getExprType(); boolean has = false; if (exprType == null) { @@ -1474,7 +1500,7 @@ public class BaseController { + ";"); }else { try { - Integer.parseInt(userRegion1); + Long asnNo=Long.parseLong(userRegion1); /*ConfigGroupInfo configGroupInfo=asnIpCfgService.getConfigGroupInfoByAsnNo(asnNo); if(configGroupInfo==null) {//不存在则新增 PolicyGroupInfo info=new PolicyGroupInfo(); @@ -1486,6 +1512,11 @@ public class BaseController { configGroupInfo=asnIpCfgService.getConfigGroupInfoByAsnNo(asnNo); } baseIpCfg.setAsnIpGroup(configGroupInfo.getGroupId());*/ + if(asnNo.longValue()>4294967295l||asnNo.longValue()<1) { + errInfo.append(prop.getProperty("asn_no")+" "+ + String.format(prop.getProperty("must_between"),"1","4294967295" ) + + ";"); + } }catch (Exception e) { // TODO: handle exception errInfo.append( @@ -3272,6 +3303,10 @@ public class BaseController { List list = ei.getDataList(P2pHashStringTemplate.class, this.getMsgProp(),regionDict,serviceDict); stringCfgs = this.checkStringCfg(serviceDict, regionDict, list); + }else if (regionDict.getFunctionId().equals(403)) { + List list = ei.getDataList(AppDomainTemplate.class, + this.getMsgProp(),regionDict,serviceDict); + stringCfgs = this.checkStringCfg(serviceDict, regionDict, list); } else { List list = ei.getDataList(StringAllTemplate.class, this.getMsgProp(),regionDict,serviceDict); stringCfgs = this.checkStringCfg(serviceDict, regionDict, list); @@ -3307,6 +3342,7 @@ public class BaseController { || serviceDict.getServiceId().intValue() == 148 || serviceDict.getServiceId().intValue() == 1028// app ip || serviceDict.getServiceId().intValue() == 1024//app http + || serviceDict.getServiceId().intValue() == 1026//app domain )) { if (StringUtils.isNotBlank(specServiceId)) { specificServiceCfg = specificServiceCfgService @@ -3507,9 +3543,12 @@ public class BaseController { appPolicyCfgs.add(appPolicyCfg); } } else { - CfgIndexInfo cfgIndexInfo = new CfgIndexInfo(); - BeanUtils.copyProperties(cfg, cfgIndexInfo, new String[] {"cfgId"}); - cfgIndexInfos.add(cfgIndexInfo); + if(!regionDict.getFunctionId().equals(403)) { + CfgIndexInfo cfgIndexInfo = new CfgIndexInfo(); + BeanUtils.copyProperties(cfg, cfgIndexInfo, new String[] {"cfgId"}); + cfgIndexInfos.add(cfgIndexInfo); + } + } ind++; } @@ -3547,6 +3586,9 @@ public class BaseController { if(regionDict.getDictId().intValue()==16){ avContentCfgService.saveVoIpAccountCfg(stringCfgs); } + if(regionDict.getDictId().intValue()==64){ + appCfgService.saveAppDomainCfg(stringCfgs); + } } else if (regionDict.getRegionType().equals(3)) { List compileIds=Lists.newArrayList(); try { diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java b/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java index 525eb43df..c19845cb3 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java @@ -28,6 +28,7 @@ import com.nis.domain.SysDataDictionaryItem; import com.nis.domain.configuration.CfgIndexInfo; import com.nis.domain.configuration.IpPortCfg; import com.nis.domain.configuration.NtcSubscribeIdCfg; +import com.nis.domain.configuration.template.AppDomainTemplate; import com.nis.domain.configuration.template.AsnIpTemplate; import com.nis.domain.configuration.template.ComplexStringAllTemplate; import com.nis.domain.configuration.template.DdosIpTemplate; @@ -309,6 +310,11 @@ public class IpController extends BaseController{ ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, P2pHashStringTemplate.class, 2); excel.setDataList(this.getMsgProp(),classList,null). write(request,response, fileName).dispose(); + }else if(regionDict.getFunctionId().equals(403)) {//app domain + List classList=new ArrayList(); + ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, AppDomainTemplate.class, 2); + excel.setDataList(this.getMsgProp(),classList,null). + write(request,response, fileName).dispose(); }else{ List classList=new ArrayList(); ExportExcel excel=new ExportExcel(serviceDict,regionDict,this.getMsgProp(),null, StringAllTemplate.class, 2); diff --git a/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.java b/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.java index 17ab6b9fb..09a46b25c 100644 --- a/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.java +++ b/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.java @@ -19,7 +19,7 @@ public interface AsnIpCfgDao extends CrudDao{ // public List findPolicyGroupInfosByType(@Param("groupId")Integer groupId); public List findOtherIps(@Param("groupId")Integer groupId,@Param("cfgId")Integer cfgId); public List countValidIPs(@Param("groups")String groups,@Param("ids")String ids); - public ConfigGroupInfo getInfoByAsnNo(@Param("asnId")Integer asnNo); - public List getByAsnGroup(@Param("groupId")Integer groupId,@Param("asnId")Integer asnNo); - public void deleteByAsnGroup(@Param("groupId")Integer groupId,@Param("asnId")Integer asnNo); + public ConfigGroupInfo getInfoByAsnNo(@Param("asnId")Long asnNo); + public List getByAsnGroup(@Param("groupId")long groupId,@Param("asnId")long asnNo); + public void deleteByAsnGroup(@Param("groupId")long groupId,@Param("asnId")long asnNo); } diff --git a/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.xml b/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.xml index f90aa5a54..e5ece76e5 100644 --- a/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.xml +++ b/src/main/java/com/nis/web/dao/basics/AsnIpCfgDao.xml @@ -206,7 +206,7 @@ from asn_ip_cfg r where r.cfg_id in (${ids}) and is_valid !=-1 - select from asn_ip_cfg r where r.is_valid!=-1 and r.asn_ip_group=#{groupId} and r.user_region1=#{asnId} @@ -399,7 +399,7 @@ - + delete from asn_ip_cfg where asn_ip_group=#{groupId} and user_region1=#{asnId} select count(1) from asn_ip_cfg where is_valid !=-1 and asn_ip_group in(${groups}) and cfg_id not in(${ids}) GROUP BY asn_ip_group; - select id,group_id,group_name,is_issued,insert_time,update_time,group_type,compile_id,asn_id from config_group_info c where c.asn_id= #{asnId} and c.group_type=4 diff --git a/src/main/java/com/nis/web/dao/basics/PolicyGroupInfoDao.xml b/src/main/java/com/nis/web/dao/basics/PolicyGroupInfoDao.xml index 048e508fa..fbb21273e 100644 --- a/src/main/java/com/nis/web/dao/basics/PolicyGroupInfoDao.xml +++ b/src/main/java/com/nis/web/dao/basics/PolicyGroupInfoDao.xml @@ -12,7 +12,7 @@ - + diff --git a/src/main/java/com/nis/web/service/basics/AsnIpCfgService.java b/src/main/java/com/nis/web/service/basics/AsnIpCfgService.java index 724bfe438..5939b8d4a 100644 --- a/src/main/java/com/nis/web/service/basics/AsnIpCfgService.java +++ b/src/main/java/com/nis/web/service/basics/AsnIpCfgService.java @@ -93,11 +93,11 @@ public class AsnIpCfgService extends CrudService, AsnIpCfg> { List toSaveAsnIpCfgs=Lists.newArrayList(); List isImportAll=DictUtils.getDictList("IS_ASN_IP_IMPORT_ALL"); for(Entry> entry:cfgs.entrySet()) { - Integer asnNo=Integer.parseInt(entry.getKey()); + Long asnNo=Long.parseLong(entry.getKey()); ConfigGroupInfo configGroupInfo=this.getConfigGroupInfoByAsnNo(asnNo); if(configGroupInfo==null) {//不存在则新增 PolicyGroupInfo info=new PolicyGroupInfo(); - info.setAsnNo(Integer.parseInt(entry.getKey())); + info.setAsnNo(Long.parseLong(entry.getKey())); info.setDescription("Create by import excel"); info.setGroupName("Import"+asnNo); info.setGroupType(4); @@ -281,19 +281,19 @@ public class AsnIpCfgService extends CrudService, AsnIpCfg> { } return false; } - public ConfigGroupInfo getConfigGroupInfoByAsnNo(Integer asnNo) { + public ConfigGroupInfo getConfigGroupInfoByAsnNo(Long asnNo) { return asnIpCfgDao.getInfoByAsnNo(asnNo); } - public List getByAsnGroup(Integer groupId,Integer asnNo) { + public List getByAsnGroup(Integer groupId,Long asnNo) { if(groupId==null||asnNo==null) { throw new RuntimeException("groupId or asnNo is null!"); } - return asnIpCfgDao.getByAsnGroup(groupId,asnNo); + return asnIpCfgDao.getByAsnGroup(groupId.longValue(),asnNo.longValue()); } - public void deleteByAsnGroup(Integer groupId,Integer asnNo) { + public void deleteByAsnGroup(Integer groupId,Long asnNo) { if(groupId==null||asnNo==null) { throw new RuntimeException("groupId or asnNo is null!"); } - asnIpCfgDao.deleteByAsnGroup(groupId,asnNo); + asnIpCfgDao.deleteByAsnGroup(groupId.longValue(),asnNo.longValue()); } } diff --git a/src/main/java/com/nis/web/service/configuration/AppCfgService.java b/src/main/java/com/nis/web/service/configuration/AppCfgService.java index 930be64a0..1ae702a8f 100644 --- a/src/main/java/com/nis/web/service/configuration/AppCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AppCfgService.java @@ -25,6 +25,7 @@ import com.nis.domain.configuration.AppTcpCfg; import com.nis.domain.configuration.AppTopicDomainCfg; import com.nis.domain.configuration.AreaIpCfg; import com.nis.domain.configuration.BaseIpCfg; +import com.nis.domain.configuration.BaseStringCfg; import com.nis.domain.configuration.ComplexkeywordCfg; import com.nis.domain.configuration.IpPortCfg; import com.nis.domain.configuration.NtcSubscribeIdCfg; @@ -512,7 +513,15 @@ public class AppCfgService extends BaseService { } } - + @Transactional(readOnly = false, rollbackFor = RuntimeException.class) + public void saveAppDomainCfg(List> cfgs) throws Exception { + for(BaseStringCfg cfg:cfgs) { + AppDomainCfg entity=new AppDomainCfg(); + BeanUtils.copyProperties(cfg, entity); + appCfgDao.insertAppDomainCfg(entity); + } + + } @Transactional(readOnly = false, rollbackFor = RuntimeException.class) public void saveOrUpdateAppDomainCfg(AppDomainCfg entity) throws Exception { // 设置区域运营商信息 diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index bb98eb858..7132d6dc9 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -1326,4 +1326,5 @@ traffic_user_behavior=Traffic Account Behavior user_behavior_data=Account statistics ip_behavior_data=IP statistics p2p_eMule_keywords=eMule Search Keywords -p2p_hash_keywords=File Marking Keywords \ No newline at end of file +p2p_hash_keywords=File Marking Keywords +not_valid_domain=%s is not a valid domain \ No newline at end of file diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties index a59cb1f71..84ae4a616 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -1315,4 +1315,5 @@ traffic_user_behavior=Traffic Account Behavior user_behavior_data=Account statistics ip_behavior_data=IP statistics p2p_eMule_keywords=eMule Search Keywords -p2p_hash_keywords=File Marking Keywords \ No newline at end of file +p2p_hash_keywords=File Marking Keywords +not_valid_domain=%s\u4E0D\u662F\u4E00\u4E2A\u5408\u6CD5\u57DF\u540D \ No newline at end of file diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index b7fcb6907..6bf66c9bb 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -1316,4 +1316,5 @@ p2p_eMule_keywords=eMule\u641C\u7D22\u5173\u952E\u5B57 p2p_hash_keywords=\u6587\u4EF6\u6807\u8BC6\u5173\u952E\u5B57 traffic_user_behavior=\u7528\u6237\u884C\u4E3A\u7EDF\u8BA1 user_behavior_data=\u7528\u6237\u7EDF\u8BA1 -ip_behavior_data=\u7528\u6237IP\u7EDF\u8BA1 \ No newline at end of file +ip_behavior_data=\u7528\u6237IP\u7EDF\u8BA1 +not_valid_domain=%s\u4E0D\u662F\u4E00\u4E2A\u5408\u6CD5\u57DF\u540D \ No newline at end of file diff --git a/src/main/resources/nis.properties b/src/main/resources/nis.properties index 1f4b789d8..a3428156a 100644 --- a/src/main/resources/nis.properties +++ b/src/main/resources/nis.properties @@ -541,4 +541,5 @@ cert_validate_file=x509 cert_validate_success_info=Successful #ipv4 range新格式0.0.0.1-2 ipv4_ip_range_regexp_new=^(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)-(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)$ -ipv4_ip_subnet_regexp_original=^(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)/(3[0-2]|1[0-9]|2[0-9]|[0-9])$ \ No newline at end of file +ipv4_ip_subnet_regexp_original=^(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(0|1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)/(3[0-2]|1[0-9]|2[0-9]|[0-9])$ +domain_regexp=^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$ \ No newline at end of file diff --git a/src/main/resources/sql/20181105/change_asn_no_range.sql b/src/main/resources/sql/20181105/change_asn_no_range.sql new file mode 100644 index 000000000..31daa683f --- /dev/null +++ b/src/main/resources/sql/20181105/change_asn_no_range.sql @@ -0,0 +1,2 @@ +ALTER TABLE config_group_info MODIFY COLUMN asn_id BIGINT(20) NULL COMMENT 'asn 组对应的asn号'; +ALTER TABLE policy_group_info MODIFY COLUMN asn_no BIGINT(20) NULL COMMENT 'asn号'; \ No newline at end of file diff --git a/src/main/resources/sql/20181105/update_region_service_dict.sql b/src/main/resources/sql/20181105/update_region_service_dict.sql new file mode 100644 index 000000000..e7687c8a3 --- /dev/null +++ b/src/main/resources/sql/20181105/update_region_service_dict.sql @@ -0,0 +1,2 @@ +UPDATE function_region_dict SET is_import=1 WHERE function_id=403 AND is_valid=1; +UPDATE function_service_dict SET is_import=1 WHERE function_id=403 AND is_valid=1; \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp index 9cc686c23..b126fa49a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp @@ -53,6 +53,23 @@ onClick="javascript:window.location='${ctx}/app/domainCfgForm?functionId=${cfg.functionId}'"> + + + + + + + + + + + + + + + @@ -440,6 +457,8 @@ - + + +<%@include file="/WEB-INF/include/excel/importModal.jsp" %> \ No newline at end of file