From 6705bf02ec70547bbc99e452e2c6f965220b75a4 Mon Sep 17 00:00:00 2001 From: wangxin Date: Thu, 26 Jul 2018 11:04:57 +0800 Subject: [PATCH] =?UTF-8?q?(1)maatCfg=20=E5=8A=A0=E5=85=A5requestId?= =?UTF-8?q?=E5=AD=97=E6=AE=B5,=E6=B3=A8=E8=A7=A3=E4=B8=BAaffairId=EF=BC=8C?= =?UTF-8?q?=E7=94=A8=E6=9D=A5=E6=9D=A5=E5=87=BD=E7=9A=84=E5=AE=9E=E6=97=B6?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=20(2)IP=E7=99=BD=E5=90=8D=E5=8D=95=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=EF=BC=8C=E8=B0=83=E6=95=B4=E6=9D=A5=E5=87=BD=E4=B8=8D?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=20(3)=E5=9F=BA=E7=A1=80=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=EF=BC=8C=E5=8A=A0=E5=AF=86=E9=9A=A7=E9=81=93=E8=A1=8C=E4=B8=BA?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E9=83=A8=E5=88=86=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/nis/domain/maat/MaatCfg.java | 10 +++++++++ .../nis/web/controller/BaseController.java | 21 +++++++++++++------ .../WEB-INF/views/cfg/basicprotocol/form.jsp | 2 +- .../WEB-INF/views/cfg/basicprotocol/list.jsp | 2 +- .../views/cfg/encryptedtunnelbehav/form.jsp | 2 +- .../views/cfg/encryptedtunnelbehav/list.jsp | 2 +- 6 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/nis/domain/maat/MaatCfg.java b/src/main/java/com/nis/domain/maat/MaatCfg.java index f1347172f..9321277ff 100644 --- a/src/main/java/com/nis/domain/maat/MaatCfg.java +++ b/src/main/java/com/nis/domain/maat/MaatCfg.java @@ -73,6 +73,9 @@ public class MaatCfg implements Serializable { @Expose private Integer fatherCfgId; @Expose + @SerializedName("affairId") + private Integer requestId; + @Expose @SerializedName("opTime") private Date auditTime; @Expose @@ -652,6 +655,13 @@ public class MaatCfg implements Serializable { public void setIsValid(Integer isValid) { this.isValid = isValid; } + + public Integer getRequestId() { + return requestId; + } + public void setRequestId(Integer requestId) { + this.requestId = requestId; + } public void initDefaultValue() { this.doLog=2; this.doBlackList=1; diff --git a/src/main/java/com/nis/web/controller/BaseController.java b/src/main/java/com/nis/web/controller/BaseController.java index 3bdc0473f..c0a03a292 100644 --- a/src/main/java/com/nis/web/controller/BaseController.java +++ b/src/main/java/com/nis/web/controller/BaseController.java @@ -818,13 +818,22 @@ public class BaseController { // requestId check start Integer requestId=value.getRequestId(); if(requestId==null){ - errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("letter"))+";"); + if("whitelistip".equals(specialItem)) { + value.setRequestId(0); + }else { + errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("letter"))+";"); + } + }else{//查询数据库是否存在ID - RequestInfo info=requestInfoService.getRequestInfoById((long)requestId.intValue()); - if(info==null){ - errInfo.append(String.format(prop.getProperty("id_not_exists"),requestId, prop.getProperty("letter"))+";"); - }else if(info.getIsValid()==Constants.VALID_NO||info.getIsValid()==Constants.VALID_DEL){ - errInfo.append(String.format(prop.getProperty("id_not_valid"),requestId, prop.getProperty("letter"))+";"); + if("whitelistip".equals(specialItem)) { + value.setRequestId(0); + }else { + RequestInfo info=requestInfoService.getRequestInfoById((long)requestId.intValue()); + if(info==null){ + errInfo.append(String.format(prop.getProperty("id_not_exists"),requestId, prop.getProperty("letter"))+";"); + }else if(info.getIsValid()==Constants.VALID_NO||info.getIsValid()==Constants.VALID_DEL){ + errInfo.append(String.format(prop.getProperty("id_not_valid"),requestId, prop.getProperty("letter"))+";"); + } } } // requestId check end diff --git a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp index 2c9ea71f2..fc75ac9f9 100644 --- a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/form.jsp @@ -2,7 +2,7 @@ <%@ include file="/WEB-INF/include/taglib.jsp"%> -<spring:message code="${cfgName}"></spring:message> +<spring:message code="basic_protocol"></spring:message>