(1)maatCfg 加入requestId字段,注解为affairId,用来来函的实时统计

(2)IP白名单导入,调整来函不验证
(3)基础协议,加密隧道行为,修改部分界面字段名
This commit is contained in:
wangxin
2018-07-26 11:04:57 +08:00
parent 05736d7d41
commit 6705bf02ec
6 changed files with 29 additions and 10 deletions

View File

@@ -73,6 +73,9 @@ public class MaatCfg implements Serializable {
@Expose @Expose
private Integer fatherCfgId; private Integer fatherCfgId;
@Expose @Expose
@SerializedName("affairId")
private Integer requestId;
@Expose
@SerializedName("opTime") @SerializedName("opTime")
private Date auditTime; private Date auditTime;
@Expose @Expose
@@ -652,6 +655,13 @@ public class MaatCfg implements Serializable {
public void setIsValid(Integer isValid) { public void setIsValid(Integer isValid) {
this.isValid = isValid; this.isValid = isValid;
} }
public Integer getRequestId() {
return requestId;
}
public void setRequestId(Integer requestId) {
this.requestId = requestId;
}
public void initDefaultValue() { public void initDefaultValue() {
this.doLog=2; this.doLog=2;
this.doBlackList=1; this.doBlackList=1;

View File

@@ -818,13 +818,22 @@ public class BaseController {
// requestId check start // requestId check start
Integer requestId=value.getRequestId(); Integer requestId=value.getRequestId();
if(requestId==null){ 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 }else{//查询数据库是否存在ID
RequestInfo info=requestInfoService.getRequestInfoById((long)requestId.intValue()); if("whitelistip".equals(specialItem)) {
if(info==null){ value.setRequestId(0);
errInfo.append(String.format(prop.getProperty("id_not_exists"),requestId, prop.getProperty("letter"))+";"); }else {
}else if(info.getIsValid()==Constants.VALID_NO||info.getIsValid()==Constants.VALID_DEL){ RequestInfo info=requestInfoService.getRequestInfoById((long)requestId.intValue());
errInfo.append(String.format(prop.getProperty("id_not_valid"),requestId, prop.getProperty("letter"))+";"); 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 // requestId check end

View File

@@ -2,7 +2,7 @@
<%@ include file="/WEB-INF/include/taglib.jsp"%> <%@ include file="/WEB-INF/include/taglib.jsp"%>
<html> <html>
<head> <head>
<title><spring:message code="${cfgName}"></spring:message></title> <title><spring:message code="basic_protocol"></spring:message></title>
<script type="text/javascript"> <script type="text/javascript">
$(function(){ $(function(){
$("#cancel").on("click",function(){ $("#cancel").on("click",function(){

View File

@@ -312,7 +312,7 @@
<tr> <tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="cfgDesc"><spring:message code="config_describe"/></th> <th class="cfgDesc"><spring:message code="config_describe"/></th>
<th><spring:message code="social_app"/></th> <th><spring:message code="basic_protocol"/></th>
<%-- <th><spring:message code="behaviour_type"/></th> --%> <%-- <th><spring:message code="behaviour_type"/></th> --%>
<th><spring:message code="ratelimit"/></th> <th><spring:message code="ratelimit"/></th>
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>

View File

@@ -181,7 +181,7 @@ var delContent = function(contentClassName, addBtnClassName) {
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="social_app"/></label> <label class="control-label col-md-3"><font color="red">*</font><spring:message code="encrypted_tunnel_behavior"/></label>
<div class="col-md-6"> <div class="col-md-6">
<sys:treeselect id="specServiceId" name="specServiceId" value="${_cfg.specServiceId}" <sys:treeselect id="specServiceId" name="specServiceId" value="${_cfg.specServiceId}"
labelName="parent.specServiceName" labelName="parent.specServiceName"

View File

@@ -312,7 +312,7 @@
<tr> <tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="cfgDesc"><spring:message code="config_describe"/></th> <th class="cfgDesc"><spring:message code="config_describe"/></th>
<th><spring:message code="encrypted_protocol_behavior"/></th> <th><spring:message code="encrypted_tunnel_behavior"/></th>
<th><spring:message code="behaviour_type"/></th> <th><spring:message code="behaviour_type"/></th>
<th><spring:message code="ratelimit"/></th> <th><spring:message code="ratelimit"/></th>
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>