From 0866888337a8ab319fc207eeee851a244c1a7162 Mon Sep 17 00:00:00 2001 From: zhangwei Date: Thu, 21 Jun 2018 09:12:25 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E7=89=B9=E5=AE=9A=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=EF=BC=88APP=EF=BC=89=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=89=B9=E5=AE=9A=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=A0=81=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/specific/SpecificServiceCfg.java | 8 ++++- .../SpecificServiceCfgController.java | 4 +-- .../dao/specific/SpecificServiceCfgDao.xml | 32 ++++++++++++------- .../specific/SpecificServiceCfgService.java | 24 ++++---------- .../views/specific/specificServiceCfgForm.jsp | 14 ++++---- .../views/specific/specificServiceCfgList.jsp | 8 ++--- 6 files changed, 46 insertions(+), 44 deletions(-) diff --git a/src/main/java/com/nis/domain/specific/SpecificServiceCfg.java b/src/main/java/com/nis/domain/specific/SpecificServiceCfg.java index a20649561..fcc2e9811 100644 --- a/src/main/java/com/nis/domain/specific/SpecificServiceCfg.java +++ b/src/main/java/com/nis/domain/specific/SpecificServiceCfg.java @@ -17,7 +17,7 @@ public class SpecificServiceCfg extends BaseEntity{ private static final long serialVersionUID = -1133644323636425766L; private Integer specServiceId; //spec_service_id 协议ID int N 主键,初始化 - //private Integer specServiceCode; //协议编码 int N 暂定,以后可扩展 1000:微信 , 1001:QQ + private Integer specServiceCode; //协议编码 int N 暂定,以后可扩展 1000:微信 , 1001:QQ private String specServiceName; //spec_service_name 协议名称 varchar(64) N private String specServiceDesc; //spec_service_desc 协议描述 varchar2(64) N private Integer isValid; //is_valid 有效标志 int N 1-有效 0-无效 @@ -36,6 +36,12 @@ public class SpecificServiceCfg extends BaseEntity{ public void setSpecServiceId(Integer specServiceId) { this.specServiceId = specServiceId; } + public Integer getSpecServiceCode() { + return specServiceCode; + } + public void setSpecServiceCode(Integer specServiceCode) { + this.specServiceCode = specServiceCode; + } public String getSpecServiceName() { return specServiceName; } diff --git a/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java b/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java index b6d5a5742..6e7003dd9 100644 --- a/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java +++ b/src/main/java/com/nis/web/controller/specific/SpecificServiceCfgController.java @@ -147,9 +147,9 @@ public class SpecificServiceCfgController extends BaseController { @RequiresPermissions(value= {"specific:service:add","specific:service:edit"},logical=Logical.OR) @RequestMapping(value="saveOrUpdate") public String saveOrUpdate(SpecificServiceCfg specificServiceCfg, Model model, - RedirectAttributes redirectAttributes,Integer oldId) { + RedirectAttributes redirectAttributes) { try { - specificServiceCfgService.saveOrUpdate(specificServiceCfg,oldId); + specificServiceCfgService.saveOrUpdate(specificServiceCfg); addMessage(redirectAttributes, "save_success"); } catch (Exception e) { e.printStackTrace(); diff --git a/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.xml b/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.xml index b9c4084e6..e9cff258c 100644 --- a/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.xml +++ b/src/main/java/com/nis/web/dao/specific/SpecificServiceCfgDao.xml @@ -4,6 +4,7 @@ + @@ -18,6 +19,7 @@ s.spec_service_id AS specServiceId, + s.spec_service_code AS specServiceCode, s.spec_service_name AS specServiceName, s.spec_service_desc AS specServiceDesc, s.is_valid AS isValid, @@ -62,6 +64,9 @@ AND s2.spec_service_id like '%${specServiceId}%' + + AND spec_service_code = #{specServiceCode} + AND s2.spec_service_name like '%${specServiceName}%' @@ -93,7 +98,10 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ +
+ + + +
+
+
+
+
+
+ + + + + + + <%@include file="/WEB-INF/include/form/ipInfo.jsp" %> + <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> + <%@include file="/WEB-INF/include/form/basicInfo.jsp" %> +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/ipList.jsp new file mode 100644 index 000000000..a8fd29272 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/ipList.jsp @@ -0,0 +1,336 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + +<spring:message code="ip_intercept"></spring:message> + + + + +
+ +

+ + +

+ +
+
+
+
+
+ + + + + + + + +
+
+ + + + + + +
+
+ +
+
+ + + + + + + + + +
+ + + +
+
+
+ + + +
+
+ + + + + +
+ + +
+
+ + href="javascript:;"> + + +
+
+ + + +
+
+
+
+ + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+
+
+ +
+
+
+ + + + + + <%-- --%> + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + <%-- --%> + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + +
ip
${status.index+1 }${cfg.cfgDesc } + ${ipType.itemValue} + ${cfg.srcIpAddress }${cfg.srcPort }${cfg.destIpAddress }${cfg.destPort } + + + + + + + + + + + + + + + + + + + ${cfg.requestName } + + + + ${fl.itemValue}, + + + + + + + ${xz.itemValue}, + + + + + + ${lable.itemValue}, + + + ${cfg.areaEffectiveIds } + + + + + + + + + + +
${cfg.creatorName }${cfg.editorName }${cfg.auditorName }
+
${page}
+
+ +
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp index a7b77d615..afb81986e 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipForm.jsp @@ -216,7 +216,11 @@ $(function(){ checked> - + + + + + From 16b4b22504de71c60ea00c3f2ee9e4f2b8dc2435 Mon Sep 17 00:00:00 2001 From: wangxin Date: Thu, 21 Jun 2018 14:51:43 +0800 Subject: [PATCH 5/6] =?UTF-8?q?IP=E7=B1=BB=E9=85=8D=E7=BD=AE=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E6=96=B0=E5=AD=97=E6=AE=B5ratelimit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nis/domain/configuration/BaseIpCfg.java | 19 ++++++++++++++++++ .../nis/web/dao/configuration/IpCfgDao.xml | 20 ++++++++++++++----- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/nis/domain/configuration/BaseIpCfg.java b/src/main/java/com/nis/domain/configuration/BaseIpCfg.java index 4915c0e6d..c91963265 100644 --- a/src/main/java/com/nis/domain/configuration/BaseIpCfg.java +++ b/src/main/java/com/nis/domain/configuration/BaseIpCfg.java @@ -65,6 +65,25 @@ public class BaseIpCfg extends BaseCfg { @Expose @SerializedName("protocolId") protected Integer protocolId ; + /** + * 限速比例 + */ + protected Integer ratelimit ; + + /** + * ratelimit + * @return ratelimit + */ + + public Integer getRatelimit() { + return ratelimit; + } + /** + * @param ratelimit the ratelimit to set + */ + public void setRatelimit(Integer ratelimit) { + this.ratelimit = ratelimit; + } /** * ipType * @return ipType diff --git a/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml index a9a7ee632..32a078831 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml @@ -34,6 +34,7 @@ + @@ -48,7 +49,7 @@ DIRECTION,PROTOCOL,PROTOCOL_ID,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,FUNCTION_ID + ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT @@ -58,7 +59,7 @@ ${page.alias}.DIRECTION as direction,${page.alias}.PROTOCOL as protocol,${page.alias}.PROTOCOL_ID as protocolId,${page.alias}.ACTION as action,${page.alias}.IS_VALID as isValid,${page.alias}.IS_AUDIT as isAudit, ${page.alias}.CREATOR_ID as creatorId,${page.alias}.CREATE_TIME AS createTime,${page.alias}.EDITOR_ID as editorId,${page.alias}.EDIT_TIME AS editTime,${page.alias}.AUDITOR_ID as auditorId,${page.alias}.AUDIT_TIME AS auditTime, ${page.alias}.SERVICE_ID as serviceId,${page.alias}.REQUEST_ID AS requestId,${page.alias}.COMPILE_ID AS compileId,${page.alias}.IS_AREA_EFFECTIVE as isAreaEffective,${page.alias}.classify, - ${page.alias}.ATTRIBUTE AS attribute,${page.alias}.LABLE AS lable,${page.alias}.AREA_EFFECTIVE_IDS AS areaEffectiveIds,${page.alias}.FUNCTION_ID AS functionId + ${page.alias}.ATTRIBUTE AS attribute,${page.alias}.LABLE AS lable,${page.alias}.AREA_EFFECTIVE_IDS AS areaEffectiveIds,${page.alias}.FUNCTION_ID AS functionId,${page.alias}.RATELIMIT AS ratelimit r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc,r.CFG_REGION_CODE as cfgRegionCode,r.CFG_TYPE as cfgType, r.IP_TYPE as ipType, @@ -66,7 +67,7 @@ r.DIRECTION as direction,r.PROTOCOL as protocol,r.PROTOCOL_ID as protocolId,r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit, r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime, r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify, - r.ATTRIBUTE AS attribute,r.LABLE AS lable,r.AREA_EFFECTIVE_IDS AS areaEffectiveIds,r.FUNCTION_ID as functionId + r.ATTRIBUTE AS attribute,r.LABLE AS lable,r.AREA_EFFECTIVE_IDS AS areaEffectiveIds,r.FUNCTION_ID as functionId,r.RATELIMIT AS ratelimit @@ -80,7 +81,7 @@ AUDITOR_ID,AUDIT_TIME,SERVICE_ID, REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE, CLASSIFY,ATTRIBUTE,LABLE, - AREA_EFFECTIVE_IDS,FUNCTION_ID + AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT #{cfgDesc,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},#{cfgType,jdbcType=VARCHAR}, @@ -92,7 +93,7 @@ #{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},#{serviceId,jdbcType=INTEGER}, #{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER}, #{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR}, - #{areaEffectiveIds,jdbcType=VARCHAR}, #{functionId,jdbcType=INTEGER} + #{areaEffectiveIds,jdbcType=VARCHAR}, #{functionId,jdbcType=INTEGER}, #{ratelimit,jdbcType=INTEGER}