diff --git a/src/main/java/com/nis/domain/configuration/AppByteCfg.java b/src/main/java/com/nis/domain/configuration/AppByteCfg.java index 41c15b7fd..1587b9f47 100644 --- a/src/main/java/com/nis/domain/configuration/AppByteCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppByteCfg.java @@ -29,7 +29,8 @@ public class AppByteCfg extends BaseCfg { private Integer compileId; @Expose private Integer ratelimit; - private String appCode; + private Integer appCode;//specific_service_cfg表一级节点的spec_service_code + private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; private String bytes; private String cfgKeywords; @@ -99,10 +100,10 @@ public class AppByteCfg extends BaseCfg { public void setRatelimit(Integer ratelimit) { this.ratelimit = ratelimit; } - public String getAppCode() { + public Integer getAppCode() { return appCode; } - public void setAppCode(String appCode) { + public void setAppCode(Integer appCode) { this.appCode = appCode; } public Integer getSpecServiceId() { @@ -135,5 +136,13 @@ public class AppByteCfg extends BaseCfg { public void setAppName(String appName) { this.appName = appName; } + + public Integer getBehavCode() { + return behavCode; + } + + public void setBehavCode(Integer behavCode) { + this.behavCode = behavCode; + } } diff --git a/src/main/java/com/nis/domain/configuration/AppDomainCfg.java b/src/main/java/com/nis/domain/configuration/AppDomainCfg.java index d82587ef3..30e24f777 100644 --- a/src/main/java/com/nis/domain/configuration/AppDomainCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppDomainCfg.java @@ -29,7 +29,8 @@ public class AppDomainCfg extends BaseCfg { private Integer compileId; @Expose private Integer ratelimit; - private String appCode; + private Integer appCode;//specific_service_cfg表一级节点的spec_service_code + private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; private String domain; private String cfgKeywords; @@ -98,10 +99,10 @@ public class AppDomainCfg extends BaseCfg { public void setRatelimit(Integer ratelimit) { this.ratelimit = ratelimit; } - public String getAppCode() { + public Integer getAppCode() { return appCode; } - public void setAppCode(String appCode) { + public void setAppCode(Integer appCode) { this.appCode = appCode; } public Integer getSpecServiceId() { @@ -131,4 +132,13 @@ public class AppDomainCfg extends BaseCfg { public void setAppName(String appName) { this.appName = appName; } + + public Integer getBehavCode() { + return behavCode; + } + + public void setBehavCode(Integer behavCode) { + this.behavCode = behavCode; + } + } diff --git a/src/main/java/com/nis/domain/configuration/AppHttpCfg.java b/src/main/java/com/nis/domain/configuration/AppHttpCfg.java index 2d135305c..5f775cd35 100644 --- a/src/main/java/com/nis/domain/configuration/AppHttpCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppHttpCfg.java @@ -29,7 +29,8 @@ public class AppHttpCfg extends BaseCfg { private Integer compileId; @Expose private Integer ratelimit; - private String appCode; + private Integer appCode;//specific_service_cfg表一级节点的spec_service_code + private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; private String district; private String cfgKeywords; @@ -99,10 +100,10 @@ public class AppHttpCfg extends BaseCfg { public void setRatelimit(Integer ratelimit) { this.ratelimit = ratelimit; } - public String getAppCode() { + public Integer getAppCode() { return appCode; } - public void setAppCode(String appCode) { + public void setAppCode(Integer appCode) { this.appCode = appCode; } public Integer getSpecServiceId() { @@ -135,5 +136,13 @@ public class AppHttpCfg extends BaseCfg { public void setAppName(String appName) { this.appName = appName; } + + public Integer getBehavCode() { + return behavCode; + } + + public void setBehavCode(Integer behavCode) { + this.behavCode = behavCode; + } } diff --git a/src/main/java/com/nis/domain/configuration/AppInnerRuleCfg.java b/src/main/java/com/nis/domain/configuration/AppInnerRuleCfg.java index 0df18652e..44ca43c9e 100644 --- a/src/main/java/com/nis/domain/configuration/AppInnerRuleCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppInnerRuleCfg.java @@ -29,7 +29,8 @@ public class AppInnerRuleCfg extends BaseCfg { private Integer compileId; @Expose private Integer ratelimit; - private String appCode; + private Integer appCode;//specific_service_cfg表一级节点的spec_service_code + private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; private String ruleFile; private String cfgKeywords; @@ -98,10 +99,10 @@ public class AppInnerRuleCfg extends BaseCfg { public void setRatelimit(Integer ratelimit) { this.ratelimit = ratelimit; } - public String getAppCode() { + public Integer getAppCode() { return appCode; } - public void setAppCode(String appCode) { + public void setAppCode(Integer appCode) { this.appCode = appCode; } public Integer getSpecServiceId() { @@ -127,5 +128,12 @@ public class AppInnerRuleCfg extends BaseCfg { this.cfgKeywords = cfgKeywords; } + public Integer getBehavCode() { + return behavCode; + } + + public void setBehavCode(Integer behavCode) { + this.behavCode = behavCode; + } } diff --git a/src/main/java/com/nis/domain/configuration/AppIpCfg.java b/src/main/java/com/nis/domain/configuration/AppIpCfg.java index f86e8b651..921aaaf66 100644 --- a/src/main/java/com/nis/domain/configuration/AppIpCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppIpCfg.java @@ -21,7 +21,8 @@ public class AppIpCfg extends BaseCfg { private Integer compileId; @Expose private Integer ratelimit; - private String appCode; + private Integer appCode;//specific_service_cfg表一级节点的spec_service_code + private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; private String appName; @Expose @@ -219,10 +220,10 @@ public class AppIpCfg extends BaseCfg { public void setRatelimit(Integer ratelimit) { this.ratelimit = ratelimit; } - public String getAppCode() { + public Integer getAppCode() { return appCode; } - public void setAppCode(String appCode) { + public void setAppCode(Integer appCode) { this.appCode = appCode; } public Integer getSpecServiceId() { @@ -237,5 +238,11 @@ public class AppIpCfg extends BaseCfg { public void setAppName(String appName) { this.appName = appName; } + public Integer getBehavCode() { + return behavCode; + } + public void setBehavCode(Integer behavCode) { + this.behavCode = behavCode; + } } diff --git a/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java b/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java index 7dee3cebb..0eddc6ea2 100644 --- a/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java @@ -29,7 +29,8 @@ public class AppPolicyCfg extends BaseCfg { private Integer compileId; @Expose private Integer ratelimit; - private String appCode; + private Integer appCode;//specific_service_cfg表一级节点的spec_service_code + private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; private String appName; private String cfgKeywords; @@ -98,10 +99,10 @@ public class AppPolicyCfg extends BaseCfg { public void setRatelimit(Integer ratelimit) { this.ratelimit = ratelimit; } - public String getAppCode() { + public Integer getAppCode() { return appCode; } - public void setAppCode(String appCode) { + public void setAppCode(Integer appCode) { this.appCode = appCode; } public Integer getSpecServiceId() { @@ -125,4 +126,13 @@ public class AppPolicyCfg extends BaseCfg { public void setCfgKeywords(String cfgKeywords) { this.cfgKeywords = cfgKeywords; } + + public Integer getBehavCode() { + return behavCode; + } + + public void setBehavCode(Integer behavCode) { + this.behavCode = behavCode; + } + } diff --git a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java index 0ecb84ea9..8745b5e60 100644 --- a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java @@ -92,7 +92,7 @@ public class AppCfgController extends BaseController { addMessage(redirectAttributes, e.getMessage()); } - return "redirect:" + adminPath +"/app/policyCfgList?function="+entity.getFunctionId(); + return "redirect:" + adminPath +"/app/policyCfgList?functionId="+entity.getFunctionId(); } /** * 策略配置审核 @@ -198,7 +198,7 @@ public class AppCfgController extends BaseController { addMessage(redirectAttributes, e.getMessage()); } - return "redirect:" + adminPath +"/app/ipCfgList?function="+entity.getFunctionId(); + return "redirect:" + adminPath +"/app/ipCfgList?functionId="+entity.getFunctionId(); } /** * 协议IP配置审核 @@ -259,7 +259,7 @@ public class AppCfgController extends BaseController { for(AppHttpCfg entity:page.getList()){ SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId()); entity.setAppName(app.getSpecServiceName()); - entity.setCfgKeywords(entity.getCfgKeywords().replace(Constants.KEYWORD_EXPR, "&")); +// entity.setCfgKeywords(entity.getCfgKeywords().replace(Constants.KEYWORD_EXPR, "&")); } model.addAttribute("page", page); initPageCondition(model,cfg); @@ -304,7 +304,7 @@ public class AppCfgController extends BaseController { addMessage(redirectAttributes, e.getMessage()); } - return "redirect:" + adminPath +"/app/httpCfgList?function="+entity.getFunctionId(); + return "redirect:" + adminPath +"/app/httpCfgList?functionId="+entity.getFunctionId(); } /** * http配置审核 @@ -409,7 +409,7 @@ public class AppCfgController extends BaseController { addMessage(redirectAttributes, e.getMessage()); } - return "redirect:" + adminPath +"/app/domainCfgList?function="+entity.getFunctionId(); + return "redirect:" + adminPath +"/app/domainCfgList?functionId="+entity.getFunctionId(); } /** * domain配置审核 @@ -514,7 +514,7 @@ public class AppCfgController extends BaseController { addMessage(redirectAttributes, e.getMessage()); } - return "redirect:" + adminPath +"/app/byteCfgList?function="+entity.getFunctionId(); + return "redirect:" + adminPath +"/app/byteCfgList?functionId="+entity.getFunctionId(); } /** * byte配置审核 diff --git a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml index 804c577f8..28f60c301 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml @@ -4,7 +4,8 @@ - + + @@ -33,7 +34,8 @@ - + + @@ -68,7 +70,8 @@ - + + @@ -98,7 +101,8 @@ - + + @@ -127,7 +131,8 @@ - + + @@ -156,7 +161,8 @@ - + + @@ -184,7 +190,7 @@ - r.CFG_ID, r.APP_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT, + r.CFG_ID, r.APP_CODE,r.BEHAV_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT, r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME, r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY, r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID, @@ -192,7 +198,7 @@ - r.CFG_ID, r.APP_CODE,r.SPEC_SERVICE_ID, r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT, + r.CFG_ID, r.APP_CODE,r.BEHAV_CODE,r.SPEC_SERVICE_ID, r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT, r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME, r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY, r.ATTRIBUTE,r.LABLE,AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE, @@ -201,7 +207,7 @@ - r.CFG_ID, r.APP_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,ACTION,r.IS_VALID,r.IS_AUDIT, + r.CFG_ID, r.APP_CODE,r.BEHAV_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,ACTION,r.IS_VALID,r.IS_AUDIT, r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME, r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY, r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE, @@ -209,7 +215,7 @@ - r.CFG_ID, r.APP_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT, + r.CFG_ID, r.APP_CODE,r.BEHAV_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT, r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME, r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY, r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE, @@ -217,7 +223,7 @@ - r.CFG_ID, r.APP_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT, + r.CFG_ID, r.APP_CODE,r.BEHAV_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT, r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME, r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY, r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE, @@ -225,14 +231,14 @@ - r.CFG_ID, r.APP_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT, + r.CFG_ID, r.APP_CODE,r.BEHAV_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT, r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME, r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY, r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE, r.RULE_FILE,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN - #{appCode,jdbcType=VARCHAR},#{specServiceId,jdbcType=INTEGER}, + #{appCode,jdbcType=INTEGER},#{behavCode,jdbcType=INTEGER},#{specServiceId,jdbcType=INTEGER}, #{cfgDesc,jdbcType=VARCHAR},#{action,jdbcType=INTEGER}, #{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},#{creatorId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},#{editTime,jdbcType=TIMESTAMP}, @@ -912,7 +918,7 @@ SELECT LAST_INSERT_ID() insert into app_policy_cfg ( - APP_CODE,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT, + APP_CODE,BEHAV_CODE,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT, CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID, @@ -927,7 +933,7 @@ SELECT LAST_INSERT_ID() insert into app_ip_cfg ( - APP_CODE,SPEC_SERVICE_ID, CFG_DESC,ACTION,IS_VALID,IS_AUDIT, + APP_CODE,BEHAV_CODE,SPEC_SERVICE_ID, CFG_DESC,ACTION,IS_VALID,IS_AUDIT, CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE, @@ -945,7 +951,7 @@ SELECT LAST_INSERT_ID() insert into app_http_cfg ( - APP_CODE,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT, + APP_CODE,BEHAV_CODE,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT, CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE, @@ -961,7 +967,7 @@ SELECT LAST_INSERT_ID() insert into app_domain_cfg ( - APP_CODE,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT, + APP_CODE,BEHAV_CODE,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT, CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE, @@ -977,7 +983,7 @@ SELECT LAST_INSERT_ID() insert into app_byte_cfg ( - APP_CODE,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT, + APP_CODE,BEHAV_CODE,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT, CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE, @@ -993,7 +999,7 @@ SELECT LAST_INSERT_ID() insert into app_inner_rule_cfg ( - APP_CODE,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT, + APP_CODE,BEHAV_CODE,SPEC_SERVICE_ID,CFG_DESC,ACTION,IS_VALID,IS_AUDIT, CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE, @@ -1012,8 +1018,11 @@ cfg_desc = #{cfgDesc,jdbcType=VARCHAR}, - - APP_CODE = #{appCode,jdbcType=VARCHAR}, + + APP_CODE = #{appCode,jdbcType=INTEGER}, + + + BEHAV_CODE = #{behavCode,jdbcType=INTEGER}, SPEC_SERVICE_ID = #{specServiceId,jdbcType=INTEGER}, @@ -1093,8 +1102,11 @@ cfg_desc = #{cfgDesc,jdbcType=VARCHAR}, - - APP_CODE = #{appCode,jdbcType=VARCHAR}, + + APP_CODE = #{appCode,jdbcType=INTEGER}, + + + BEHAV_CODE = #{behavCode,jdbcType=INTEGER}, SPEC_SERVICE_ID = #{specServiceId,jdbcType=INTEGER}, @@ -1200,8 +1212,11 @@ cfg_desc = #{cfgDesc,jdbcType=VARCHAR}, - - APP_CODE = #{appCode,jdbcType=VARCHAR}, + + APP_CODE = #{appCode,jdbcType=INTEGER}, + + + BEHAV_CODE = #{behavCode,jdbcType=INTEGER}, SPEC_SERVICE_ID = #{specServiceId,jdbcType=INTEGER}, @@ -1295,8 +1310,11 @@ cfg_desc = #{cfgDesc,jdbcType=VARCHAR}, - - APP_CODE = #{appCode,jdbcType=VARCHAR}, + + APP_CODE = #{appCode,jdbcType=INTEGER}, + + + BEHAV_CODE = #{behavCode,jdbcType=INTEGER}, SPEC_SERVICE_ID = #{specServiceId,jdbcType=INTEGER}, @@ -1387,8 +1405,11 @@ cfg_desc = #{cfgDesc,jdbcType=VARCHAR}, - - APP_CODE = #{appCode,jdbcType=VARCHAR}, + + APP_CODE = #{appCode,jdbcType=INTEGER}, + + + BEHAV_CODE = #{behavCode,jdbcType=INTEGER}, SPEC_SERVICE_ID = #{specServiceId,jdbcType=INTEGER}, 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 4d117b6b5..8dc890d53 100644 --- a/src/main/java/com/nis/web/service/configuration/AppCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AppCfgService.java @@ -28,6 +28,7 @@ import com.nis.domain.maat.MaatCfg.StringCfg; import com.nis.exceptions.MaatConvertException; import com.nis.util.ConfigServiceUtil; import com.nis.util.Constants; +import com.nis.util.DictUtils; import com.nis.util.StringUtil; import com.nis.web.dao.configuration.AppCfgDao; import com.nis.web.dao.configuration.AreaIpCfgDao; @@ -126,7 +127,7 @@ public class AppCfgService extends BaseService { }catch (Exception e) { e.printStackTrace(); logger.info("获取编译ID出错"); - throw new MaatConvertException(":"+e.getMessage()); + throw new MaatConvertException(e.getMessage()); } }else{ entity.setEditorId(entity.getCurrentUser().getId()); @@ -185,7 +186,7 @@ public class AppCfgService extends BaseService { }catch (Exception e) { e.printStackTrace(); logger.info("获取编译ID出错"); - throw new MaatConvertException(":"+e.getMessage()); + throw new MaatConvertException(e.getMessage()); } }else{ entity.setEditorId(entity.getCurrentUser().getId()); @@ -242,7 +243,7 @@ public class AppCfgService extends BaseService { }catch (Exception e) { e.printStackTrace(); logger.info("获取编译ID出错"); - throw new MaatConvertException(":"+e.getMessage()); + throw new MaatConvertException(e.getMessage()); } }else{ entity.setEditorId(entity.getCurrentUser().getId()); @@ -299,7 +300,7 @@ public class AppCfgService extends BaseService { }catch (Exception e) { e.printStackTrace(); logger.info("获取编译ID出错"); - throw new MaatConvertException(":"+e.getMessage()); + throw new MaatConvertException(e.getMessage()); } }else{ entity.setEditorId(entity.getCurrentUser().getId()); @@ -352,7 +353,7 @@ public class AppCfgService extends BaseService { }catch (Exception e) { e.printStackTrace(); logger.info("获取编译ID出错"); - throw new MaatConvertException(":"+e.getMessage()); + throw new MaatConvertException(e.getMessage()); } }else{ entity.setEditorId(entity.getCurrentUser().getId()); @@ -390,7 +391,12 @@ public class AppCfgService extends BaseService { entity.setTableName(AppPolicyCfg.getTablename()); appCfgDao.auditCfg(entity); if(isAudit==1){ - entity.setCfgKeywords(entity.getAppCode()); + if(entity.getBehavCode()!=null){ + entity.setCfgKeywords(entity.getAppCode()+"&"+entity.getBehavCode()); + }else{ + entity.setCfgKeywords(entity.getAppCode()+""); + } + List list = new ArrayList(); list.add(entity); Map map = cfgConvert(strRegionList,list,2,entity,groupRelationList); @@ -424,18 +430,17 @@ public class AppCfgService extends BaseService { maatCfg.setGroupNum(groupRelationList.size()); maatCfg.setAreaIpRegionList(areaIpRegionList); maatCfg.setIsValid(entity.getIsValid()); - //设置用户自定义域 - String userRegion = ""; - if(!StringUtil.isEmpty(entity.getAppCode())){ - userRegion = userRegion+entity.getAppCode()+Constants.USER_REGION_SPLIT; - }else{ - userRegion = userRegion+Constants.USER_REGION_SPLIT; - } - if(entity.getRatelimit()!=null){ - userRegion = userRegion+entity.getRatelimit()+Constants.USER_REGION_SPLIT; - }else{ - userRegion = userRegion+Constants.USER_REGION_SPLIT; + + //设置APP自定义域 + String userRegion = "APP_ID="+entity.getAppCode(); + //限速业务需要设置 + String actionCode = DictUtils.getDictCode("SERVICE_ACTION", "action_ratelimit"); + if(!actionCode.equals("默认")){ + if(entity.getAction().equals(Integer.parseInt(actionCode))){ + userRegion += Constants.USER_REGION_SPLIT+"RATE_LIMIT="+entity.getRatelimit(); + } } + maatCfg.setUserRegion(userRegion); configCompileList.add(maatCfg); maatBean.setConfigCompileList(configCompileList); @@ -514,18 +519,8 @@ public class AppCfgService extends BaseService { maatCfg.setGroupNum(groupRelationList.size()); maatCfg.setAreaIpRegionList(areaIpRegionList); maatCfg.setIsValid(entity.getIsValid()); - //设置用户自定义域 - String userRegion = ""; - if(!StringUtil.isEmpty(entity.getAppCode())){ - userRegion = userRegion+entity.getAppCode()+Constants.USER_REGION_SPLIT; - }else{ - userRegion = userRegion+Constants.USER_REGION_SPLIT; - } - if(entity.getRatelimit()!=null){ - userRegion = userRegion+entity.getRatelimit()+Constants.USER_REGION_SPLIT; - }else{ - userRegion = userRegion+Constants.USER_REGION_SPLIT; - } + //设置APP自定义域 + String userRegion = "APP_ID="+entity.getAppCode(); maatCfg.setUserRegion(userRegion); configCompileList.add(maatCfg); maatBean.setConfigCompileList(configCompileList); @@ -605,18 +600,8 @@ public class AppCfgService extends BaseService { maatCfg.setGroupNum(groupRelationList.size()); maatCfg.setAreaIpRegionList(areaIpRegionList); maatCfg.setIsValid(entity.getIsValid()); - //设置用户自定义域 - String userRegion = ""; - if(!StringUtil.isEmpty(entity.getAppCode())){ - userRegion = userRegion+entity.getAppCode()+Constants.USER_REGION_SPLIT; - }else{ - userRegion = userRegion+Constants.USER_REGION_SPLIT; - } - if(entity.getRatelimit()!=null){ - userRegion = userRegion+entity.getRatelimit()+Constants.USER_REGION_SPLIT; - }else{ - userRegion = userRegion+Constants.USER_REGION_SPLIT; - } + //设置APP自定义域 + String userRegion = "APP_ID="+entity.getAppCode(); maatCfg.setUserRegion(userRegion); configCompileList.add(maatCfg); maatBean.setConfigCompileList(configCompileList); @@ -696,18 +681,10 @@ public class AppCfgService extends BaseService { maatCfg.setGroupNum(groupRelationList.size()); maatCfg.setAreaIpRegionList(areaIpRegionList); maatCfg.setIsValid(entity.getIsValid()); - //设置用户自定义域 - String userRegion = ""; - if(!StringUtil.isEmpty(entity.getAppCode())){ - userRegion = userRegion+entity.getAppCode()+Constants.USER_REGION_SPLIT; - }else{ - userRegion = userRegion+Constants.USER_REGION_SPLIT; - } - if(entity.getRatelimit()!=null){ - userRegion = userRegion+entity.getRatelimit()+Constants.USER_REGION_SPLIT; - }else{ - userRegion = userRegion+Constants.USER_REGION_SPLIT; - } + //设置APP自定义域 + String userRegion = "APP_ID="+entity.getAppCode()+Constants.USER_REGION_SPLIT+ + "DOMAIN_ID="+entity.getCompileId()+Constants.USER_REGION_SPLIT+ + "DOMAIN_STR="+entity.getDomain(); maatCfg.setUserRegion(userRegion); configCompileList.add(maatCfg); maatBean.setConfigCompileList(configCompileList); @@ -789,17 +766,7 @@ public class AppCfgService extends BaseService { maatCfg.setAreaIpRegionList(areaIpRegionList); maatCfg.setIsValid(entity.getIsValid()); //设置用户自定义域 - String userRegion = ""; - if(!StringUtil.isEmpty(entity.getAppCode())){ - userRegion = userRegion+entity.getAppCode()+Constants.USER_REGION_SPLIT; - }else{ - userRegion = userRegion+Constants.USER_REGION_SPLIT; - } - if(entity.getRatelimit()!=null){ - userRegion = userRegion+entity.getRatelimit()+Constants.USER_REGION_SPLIT; - }else{ - userRegion = userRegion+Constants.USER_REGION_SPLIT; - } + String userRegion = "APP_ID="+entity.getAppCode(); maatCfg.setUserRegion(userRegion); configCompileList.add(maatCfg); maatBean.setConfigCompileList(configCompileList); diff --git a/src/main/java/com/nis/web/service/configuration/MailCfgService.java b/src/main/java/com/nis/web/service/configuration/MailCfgService.java index 401e6cb71..dfe0a37a0 100644 --- a/src/main/java/com/nis/web/service/configuration/MailCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/MailCfgService.java @@ -174,7 +174,7 @@ public class MailCfgService extends CrudService { if(entity.getAreaCfg()!=null){ for(AreaIpCfg cfg:entity.getAreaCfg()){ cfg.initDefaultValue(); - BeanUtils.copyProperties(entity, cfg,new String[]{"cfgDesc","cfgRegionCode","cfgType"}); + BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"}); areaIpCfgDao.saveAreaIpCfg(cfg); } } diff --git a/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java b/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java index 8b5a596bb..3b4261f05 100644 --- a/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/WebsiteCfgService.java @@ -45,6 +45,7 @@ import com.nis.domain.maat.MaatCfg.StringCfg; import com.nis.exceptions.MaatConvertException; import com.nis.util.ConfigServiceUtil; import com.nis.util.Constants; +import com.nis.util.DictUtils; import com.nis.util.IpUtil; import com.nis.util.StringUtil; import com.nis.web.dao.configuration.AreaIpCfgDao; @@ -413,6 +414,41 @@ public class WebsiteCfgService extends CrudService { maatCfg.setAreaIpRegionList(areaIpRegionList); maatCfg.setIsValid(entity.getIsValid()); + //判断http配置是否需要设置自定义域参数 + String actionValue = DictUtils.getDictCode("SERVICE_ACTION", "action_monit"); + String userRegion = ""; + //只有监测业务,并且头域的匹配区域不匹配字典中的信息时需要设置 + if(!actionValue.equals("默认") && entity.getAction().equals(Integer.parseInt(actionValue))){ + //请求头域 + if(entity.getHttpReqHdrList()!=null && entity.getHttpReqHdrList().size()>0){ + for(ComplexkeywordCfg head:entity.getHttpReqHdrList()){ + String dictValue = DictUtils.getDictCode("REQUEST_HEADER_DISTRICT", head.getDistrict()); + if(StringUtil.isEmpty(dictValue) || dictValue.equals("默认")){ + if(userRegion.equals("")){ + userRegion += "HTTP_HEADER="+head.getDistrict(); + }else{ + userRegion += ";"+"HTTP_HEADER="+head.getDistrict(); + } + + } + } + } + //应答头域 + if(entity.getHttpResHdrList()!=null && entity.getHttpResHdrList().size()>0){ + for(ComplexkeywordCfg head:entity.getHttpResHdrList()){ + String dictValue = DictUtils.getDictCode("RESPONSE_HEADER_DISTRICT", head.getDistrict()); + if(StringUtil.isEmpty(dictValue) || dictValue.equals("默认")){ + if(userRegion.equals("")){ + userRegion += "HTTP_HEADER="+head.getDistrict(); + }else{ + userRegion += ";"+"HTTP_HEADER="+head.getDistrict(); + } + + } + } + } + maatCfg.setUserRegion(userRegion); + } configCompileList.add(maatCfg); maatBean.setConfigCompileList(configCompileList); maatBean.setAuditTime(entity.getAuditTime()); @@ -869,7 +905,8 @@ public class WebsiteCfgService extends CrudService { maatCfg.setIsValid(entity.getIsValid()); // dns reject userRegion=;dnsStrategyId; if(!StringUtil.isEmpty(entity.getDnsStrategyId())){ - maatCfg.setUserRegion(Constants.USER_REGION_SPLIT+entity.getDnsStrategyId()+Constants.USER_REGION_SPLIT); +// maatCfg.setUserRegion(Constants.USER_REGION_SPLIT+entity.getDnsStrategyId()+Constants.USER_REGION_SPLIT); + maatCfg.setUserRegion("DNS_STRATEGY="+entity.getDnsStrategyId()); } configCompileList.add(maatCfg); maatBean.setConfigCompileList(configCompileList); diff --git a/src/main/webapp/WEB-INF/tags/sys/message.tag b/src/main/webapp/WEB-INF/tags/sys/message.tag index 8ef2205ac..bf283170f 100644 --- a/src/main/webapp/WEB-INF/tags/sys/message.tag +++ b/src/main/webapp/WEB-INF/tags/sys/message.tag @@ -11,7 +11,7 @@ - +
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgForm.jsp index 9b60d5dfd..aac6a122a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgForm.jsp @@ -65,6 +65,7 @@ $(function(){ + diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgList.jsp index 1435f3573..98cb29158 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appByteCfgList.jsp @@ -269,6 +269,9 @@ + + + @@ -277,6 +280,7 @@ + @@ -294,6 +298,20 @@ ${cfg.cfgDesc } ${cfg.appName } ${cfg.bytes } + + + + + + + + + + + + + + @@ -381,6 +399,7 @@ +
${cfg.creatorName } ${cfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp index 0a811c88f..ce93ec642 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgForm.jsp @@ -66,6 +66,7 @@ $(function(){ + 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 282c3f8f5..d982a2cef 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appDomainCfgList.jsp @@ -269,6 +269,9 @@ + + + @@ -277,6 +280,7 @@ + @@ -294,6 +298,20 @@ ${cfg.cfgDesc } ${cfg.appName } ${cfg.domain } + + + + + + + + + + + + + + @@ -381,6 +399,7 @@ +
${cfg.creatorName } ${cfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp index b9dadf39f..65b02cb20 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgForm.jsp @@ -66,6 +66,7 @@ $(function(){ + diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp index 8f7ee3034..403c8d98b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appHttpCfgList.jsp @@ -270,6 +270,9 @@ + + + @@ -278,6 +281,7 @@ + @@ -295,7 +299,26 @@ ${cfg.cfgDesc } ${cfg.appName } ${cfg.district } - ${cfg.cfgKeywords } + + + ${fns:abbr(fn:replace(cfg.cfgKeywords, "***and***", " "),20)} + + + + + + + + + + + + + + + + @@ -383,6 +406,7 @@ +
${cfg.creatorName } ${cfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgForm.jsp index 4bdec6810..25f329e98 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgForm.jsp @@ -47,6 +47,7 @@ $(function(){ + diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp index 293bff7f4..f81bedb03 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appIpCfgList.jsp @@ -285,6 +285,7 @@ + @@ -402,6 +403,7 @@ +
${cfg.creatorName } ${cfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp index 86956adbb..186233949 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgForm.jsp @@ -75,6 +75,7 @@ $(function(){ + @@ -137,7 +138,7 @@ $(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp index e6b9f54b5..3874b5b0d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp @@ -274,6 +274,7 @@ + @@ -378,6 +379,7 @@ +
${cfg.creatorName } ${cfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp index 387121371..69105b261 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/fileSampleList.jsp @@ -281,6 +281,7 @@ + @@ -388,6 +389,7 @@ +
${cfg.creatorName } ${cfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp index 4961a8900..cc294f2dd 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/signSampleList.jsp @@ -284,6 +284,7 @@ + @@ -385,6 +386,7 @@ +
${cfg.creatorName } ${cfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp index cb42b6bc6..f3c157b2e 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp @@ -271,6 +271,7 @@ + @@ -381,6 +382,7 @@ +
${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp index d91a94a11..bddec0641 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp @@ -314,6 +314,7 @@ + @@ -417,6 +418,7 @@ +
${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp b/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp index b1d5b427c..a9dc76e2f 100644 --- a/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp @@ -314,6 +314,7 @@ + @@ -417,6 +418,7 @@ +
${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp index 9c9bb09a1..2aa6800e0 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp @@ -314,6 +314,7 @@ + diff --git a/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp index cd9f15931..69b1590d8 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp @@ -471,6 +471,7 @@ + @@ -574,6 +575,7 @@ +
${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp index 4731d018d..75370dc9d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp @@ -313,6 +313,7 @@ +