Merge remote-tracking branch 'origin/develop' into develop
Conflicts: src/main/resources/messages/message_en.properties src/main/resources/messages/message_zh_CN.properties
This commit is contained in:
@@ -16,6 +16,60 @@ public class FunctionRegionDict extends BaseCfg<FunctionRegionDict> {
|
||||
private String configDesc;
|
||||
private Integer isMaat;
|
||||
private Integer regionType;
|
||||
private String configMultiKeywords;
|
||||
private String configHex;
|
||||
private String configExprType;
|
||||
private String configMatchMethod;
|
||||
private String configServiceType;
|
||||
private String configIpPortShow;
|
||||
private String configIpType;
|
||||
private String configIpPattern;
|
||||
private String configPortPattern;
|
||||
private String configDirection;
|
||||
private String configProtocol;
|
||||
|
||||
public String getConfigIpPortShow() {
|
||||
return configIpPortShow;
|
||||
}
|
||||
public void setConfigIpPortShow(String configIpPortShow) {
|
||||
this.configIpPortShow = configIpPortShow;
|
||||
}
|
||||
public String getConfigIpType() {
|
||||
return configIpType;
|
||||
}
|
||||
public void setConfigIpType(String configIpType) {
|
||||
this.configIpType = configIpType;
|
||||
}
|
||||
public String getConfigIpPattern() {
|
||||
return configIpPattern;
|
||||
}
|
||||
public void setConfigIpPattern(String configIpPattern) {
|
||||
this.configIpPattern = configIpPattern;
|
||||
}
|
||||
public String getConfigPortPattern() {
|
||||
return configPortPattern;
|
||||
}
|
||||
public void setConfigPortPattern(String configPortPattern) {
|
||||
this.configPortPattern = configPortPattern;
|
||||
}
|
||||
public String getConfigDirection() {
|
||||
return configDirection;
|
||||
}
|
||||
public void setConfigDirection(String configDirection) {
|
||||
this.configDirection = configDirection;
|
||||
}
|
||||
public String getConfigProtocol() {
|
||||
return configProtocol;
|
||||
}
|
||||
public void setConfigProtocol(String configProtocol) {
|
||||
this.configProtocol = configProtocol;
|
||||
}
|
||||
public String getConfigServiceType() {
|
||||
return configServiceType;
|
||||
}
|
||||
public void setConfigServiceType(String configServiceType) {
|
||||
this.configServiceType = configServiceType;
|
||||
}
|
||||
public Integer getDictId() {
|
||||
return dictId;
|
||||
}
|
||||
@@ -64,5 +118,30 @@ public class FunctionRegionDict extends BaseCfg<FunctionRegionDict> {
|
||||
public void setRegionType(Integer regionType) {
|
||||
this.regionType = regionType;
|
||||
}
|
||||
public String getConfigMultiKeywords() {
|
||||
return configMultiKeywords;
|
||||
}
|
||||
public void setConfigMultiKeywords(String configMultiKeywords) {
|
||||
this.configMultiKeywords = configMultiKeywords;
|
||||
}
|
||||
public String getConfigHex() {
|
||||
return configHex;
|
||||
}
|
||||
public void setConfigHex(String configHex) {
|
||||
this.configHex = configHex;
|
||||
}
|
||||
public String getConfigExprType() {
|
||||
return configExprType;
|
||||
}
|
||||
public void setConfigExprType(String configExprType) {
|
||||
this.configExprType = configExprType;
|
||||
}
|
||||
public String getConfigMatchMethod() {
|
||||
return configMatchMethod;
|
||||
}
|
||||
public void setConfigMatchMethod(String configMatchMethod) {
|
||||
this.configMatchMethod = configMatchMethod;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,14 @@ public class FunctionServiceDict extends BaseCfg<FunctionServiceDict> {
|
||||
private String serviceName;
|
||||
private String serviceDesc;
|
||||
private String actionCode;
|
||||
private Integer regionCode;
|
||||
|
||||
public Integer getRegionCode() {
|
||||
return regionCode;
|
||||
}
|
||||
public void setRegionCode(Integer regionCode) {
|
||||
this.regionCode = regionCode;
|
||||
}
|
||||
public Integer getDictId() {
|
||||
return dictId;
|
||||
}
|
||||
|
||||
147
src/main/java/com/nis/domain/configuration/AppSslCertCfg.java
Normal file
147
src/main/java/com/nis/domain/configuration/AppSslCertCfg.java
Normal file
@@ -0,0 +1,147 @@
|
||||
/**
|
||||
*@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;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
* APP SSL证书特征配置
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class AppSslCertCfg extends BaseCfg<AppSslCertCfg> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -4366457794248757698L;
|
||||
private static final String tableName="app_ssl_cert_cfg";
|
||||
@Expose
|
||||
private Integer compileId;
|
||||
@Expose
|
||||
private Integer ratelimit;
|
||||
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;
|
||||
private String appName;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="expression_type")
|
||||
@SerializedName("exprType")
|
||||
protected Integer exprType ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="match_method")
|
||||
@SerializedName("matchMethod")
|
||||
protected Integer matchMethod ;
|
||||
|
||||
@Expose
|
||||
@ExcelField(title="whether_hexbinary")
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin;
|
||||
|
||||
public Integer getExprType() {
|
||||
return exprType;
|
||||
}
|
||||
|
||||
public void setExprType(Integer exprType) {
|
||||
this.exprType = exprType;
|
||||
}
|
||||
|
||||
public Integer getMatchMethod() {
|
||||
return matchMethod;
|
||||
}
|
||||
|
||||
public void setMatchMethod(Integer matchMethod) {
|
||||
this.matchMethod = matchMethod;
|
||||
}
|
||||
|
||||
public Integer getIsHexbin() {
|
||||
return isHexbin;
|
||||
}
|
||||
|
||||
public void setIsHexbin(Integer isHexbin) {
|
||||
this.isHexbin = isHexbin;
|
||||
}
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.isHexbin = 0;
|
||||
}
|
||||
|
||||
|
||||
public Integer getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
public void setCompileId(Integer compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
public Integer getRatelimit() {
|
||||
return ratelimit;
|
||||
}
|
||||
|
||||
public void setRatelimit(Integer ratelimit) {
|
||||
this.ratelimit = ratelimit;
|
||||
}
|
||||
public Integer getAppCode() {
|
||||
return appCode;
|
||||
}
|
||||
public void setAppCode(Integer appCode) {
|
||||
this.appCode = appCode;
|
||||
}
|
||||
public Integer getSpecServiceId() {
|
||||
return specServiceId;
|
||||
}
|
||||
public void setSpecServiceId(Integer specServiceId) {
|
||||
this.specServiceId = specServiceId;
|
||||
}
|
||||
|
||||
public String getDistrict() {
|
||||
return district;
|
||||
}
|
||||
|
||||
public void setDistrict(String district) {
|
||||
this.district = district;
|
||||
}
|
||||
|
||||
public String getCfgKeywords() {
|
||||
return cfgKeywords;
|
||||
}
|
||||
|
||||
public void setCfgKeywords(String cfgKeywords) {
|
||||
this.cfgKeywords = cfgKeywords;
|
||||
}
|
||||
|
||||
public String getAppName() {
|
||||
return appName;
|
||||
}
|
||||
|
||||
public void setAppName(String appName) {
|
||||
this.appName = appName;
|
||||
}
|
||||
|
||||
public Integer getBehavCode() {
|
||||
return behavCode;
|
||||
}
|
||||
|
||||
public void setBehavCode(Integer behavCode) {
|
||||
this.behavCode = behavCode;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,12 +8,14 @@ package com.nis.domain.configuration;
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AvVoipIpCfg extends BaseIpCfg {
|
||||
|
||||
private static final String tableName="av_voip_ip_cfg";
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -942354218504312548L;
|
||||
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.domain.BaseEntity;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
@@ -196,6 +197,18 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
*/
|
||||
protected Integer functionId;
|
||||
|
||||
/**
|
||||
* do_log属性在界面(do_log:0不需要1记录所有日志2只记录结构化日志。默认是2)
|
||||
*/
|
||||
protected Integer doLog = Constants.MAAT_CFG_DOLOG_DEFAULT;
|
||||
|
||||
|
||||
public Integer getDoLog() {
|
||||
return doLog;
|
||||
}
|
||||
public void setDoLog(Integer doLog) {
|
||||
this.doLog = doLog;
|
||||
}
|
||||
/**
|
||||
* cfgRegionCode
|
||||
* @return cfgRegionCode
|
||||
|
||||
@@ -51,10 +51,30 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
private List<ComplexkeywordCfg> complexList;
|
||||
private List<BaseStringCfg> stringList;
|
||||
private List<FileDigestCfg> digestList;
|
||||
private List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList;//新增SUBSCRIBE_ID
|
||||
private NtcSubscribeIdCfg ntcSubscribeIdCfg;
|
||||
|
||||
private Long dnsStrategyId;
|
||||
private String dnsStrategyName;
|
||||
|
||||
private P2pHashCfg p2pHash;
|
||||
private P2pKeywordCfg p2pKeyword;
|
||||
private List<P2pHashCfg> p2pHashList;
|
||||
private List<P2pKeywordCfg> p2pKeywordList;
|
||||
|
||||
|
||||
public List<NtcSubscribeIdCfg> getNtcSubscribeIdCfgList() {
|
||||
return ntcSubscribeIdCfgList;
|
||||
}
|
||||
public void setNtcSubscribeIdCfgList(List<NtcSubscribeIdCfg> ntcSubscribeIdCfgList) {
|
||||
this.ntcSubscribeIdCfgList = ntcSubscribeIdCfgList;
|
||||
}
|
||||
public NtcSubscribeIdCfg getNtcSubscribeIdCfg() {
|
||||
return ntcSubscribeIdCfg;
|
||||
}
|
||||
public void setNtcSubscribeIdCfg(NtcSubscribeIdCfg ntcSubscribeIdCfg) {
|
||||
this.ntcSubscribeIdCfg = ntcSubscribeIdCfg;
|
||||
}
|
||||
public Long getDnsStrategyId() {
|
||||
return dnsStrategyId;
|
||||
}
|
||||
@@ -200,6 +220,30 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
|
||||
public void setDigestList(List<FileDigestCfg> digestList) {
|
||||
this.digestList = digestList;
|
||||
}
|
||||
public P2pHashCfg getP2pHash() {
|
||||
return p2pHash;
|
||||
}
|
||||
public void setP2pHash(P2pHashCfg p2pHash) {
|
||||
this.p2pHash = p2pHash;
|
||||
}
|
||||
public P2pKeywordCfg getP2pKeyword() {
|
||||
return p2pKeyword;
|
||||
}
|
||||
public void setP2pKeyword(P2pKeywordCfg p2pKeyword) {
|
||||
this.p2pKeyword = p2pKeyword;
|
||||
}
|
||||
public List<P2pHashCfg> getP2pHashList() {
|
||||
return p2pHashList;
|
||||
}
|
||||
public void setP2pHashList(List<P2pHashCfg> p2pHashList) {
|
||||
this.p2pHashList = p2pHashList;
|
||||
}
|
||||
public List<P2pKeywordCfg> getP2pKeywordList() {
|
||||
return p2pKeywordList;
|
||||
}
|
||||
public void setP2pKeywordList(List<P2pKeywordCfg> p2pKeywordList) {
|
||||
this.p2pKeywordList = p2pKeywordList;
|
||||
}
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
public class NtcSubscribeIdCfg extends BaseStringCfg<NtcSubscribeIdCfg> {
|
||||
private static final String tableName="ntc_subscribe_id_cfg";
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 9137401459733286997L;
|
||||
/**
|
||||
* 配置关键字
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
super.initDefaultValue();
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
}
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
}
|
||||
24
src/main/java/com/nis/domain/configuration/P2pHashCfg.java
Normal file
24
src/main/java/com/nis/domain/configuration/P2pHashCfg.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
public class P2pHashCfg extends BaseStringCfg<P2pHashCfg>{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -7072353181349049294L;
|
||||
private static final String tableName="p2p_hash_cfg";
|
||||
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
}
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
public class P2pKeywordCfg extends BaseStringCfg<P2pKeywordCfg>{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1308668362397070497L;
|
||||
private static final String tableName="p2p_keyword_cfg";
|
||||
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,11 @@ public class BaseLogEntity<T> extends BaseEntity<T> {
|
||||
protected String serverLocate;// 服务端地址定位信息
|
||||
protected String clientLocate;// 客户端地址定位信息
|
||||
protected String userRegion; //用户自定义
|
||||
protected String sAsn;//客户端ASN
|
||||
protected String dAsn;//服务端ASN
|
||||
protected String sSubscribeId;//客户端用户名
|
||||
protected String dSubscribeId;//服务端用户名
|
||||
protected String sceneFile;//现场日志文件地址
|
||||
|
||||
protected Integer functionId;
|
||||
protected Integer action;
|
||||
@@ -178,15 +183,58 @@ public class BaseLogEntity<T> extends BaseEntity<T> {
|
||||
public void setClientLocate(String clientLocate) {
|
||||
this.clientLocate = clientLocate;
|
||||
}
|
||||
public String getsAsn() {
|
||||
return sAsn;
|
||||
}
|
||||
public void setsAsn(String sAsn) {
|
||||
this.sAsn = sAsn;
|
||||
}
|
||||
public String getdAsn() {
|
||||
return dAsn;
|
||||
}
|
||||
public void setdAsn(String dAsn) {
|
||||
this.dAsn = dAsn;
|
||||
}
|
||||
public String getsSubscribeId() {
|
||||
return sSubscribeId;
|
||||
}
|
||||
public void setsSubscribeId(String sSubscribeId) {
|
||||
this.sSubscribeId = sSubscribeId;
|
||||
}
|
||||
public String getdSubscribeId() {
|
||||
return dSubscribeId;
|
||||
}
|
||||
public void setdSubscribeId(String dSubscribeId) {
|
||||
this.dSubscribeId = dSubscribeId;
|
||||
}
|
||||
public String getSceneFile() {
|
||||
return sceneFile;
|
||||
}
|
||||
public void setSceneFile(String sceneFile) {
|
||||
this.sceneFile = sceneFile;
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BaseLogEntity [cfgId=" + cfgId + ", foundTime=" + foundTime + ", recvTime=" + recvTime + ", transProto="
|
||||
+ transProto + ", addrType=" + addrType + ", dIp=" + dIp + ", sIp=" + sIp + ", dPort=" + dPort
|
||||
+ ", sPort=" + sPort + ", service=" + service + ", entranceId=" + entranceId + ", deviceId=" + deviceId
|
||||
+ ", direction=" + direction + ", streamDir=" + streamDir + ", capIp=" + capIp + ", addrList="
|
||||
+ addrList + ", serverLocate=" + serverLocate + ", clientLocate=" + clientLocate + ", userRegion="
|
||||
+ userRegion + ", functionId=" + functionId + ", action=" + action + ", seltype=" + seltype
|
||||
+ ", searchFoundStartTime=" + searchFoundStartTime + ", searchFoundEndTime=" + searchFoundEndTime + "]";
|
||||
return "{\"cfgId\"=\"" + cfgId + "\", \"foundTime\"=\"" + foundTime
|
||||
+ "\", \"recvTime\"=\"" + recvTime + "\", \"transProto\"=\""
|
||||
+ transProto + "\", \"addrType\"=\"" + addrType
|
||||
+ "\", \"dIp\"=\"" + dIp + "\", \"sIp\"=\"" + sIp
|
||||
+ "\", \"dPort\"=\"" + dPort + "\", \"sPort\"=\"" + sPort
|
||||
+ "\", \"service\"=\"" + service + "\", \"entranceId\"=\""
|
||||
+ entranceId + "\", \"deviceId\"=\"" + deviceId
|
||||
+ "\", \"direction\"=\"" + direction + "\", \"streamDir\"=\""
|
||||
+ streamDir + "\", \"capIp\"=\"" + capIp
|
||||
+ "\", \"addrList\"=\"" + addrList + "\", \"serverLocate\"=\""
|
||||
+ serverLocate + "\", \"clientLocate\"=\"" + clientLocate
|
||||
+ "\", \"userRegion\"=\"" + userRegion + "\", \"sAsn\"=\""
|
||||
+ sAsn + "\", \"dAsn\"=\"" + dAsn + "\", \"sSubscribeId\"=\""
|
||||
+ sSubscribeId + "\", \"dSubscribeId\"=\"" + dSubscribeId
|
||||
+ "\", \"sceneFile\"=\"" + sceneFile + "\", \"functionId\"=\""
|
||||
+ functionId + "\", \"action\"=\"" + action
|
||||
+ "\", \"seltype\"=\"" + seltype
|
||||
+ "\", \"searchFoundStartTime\"=\"" + searchFoundStartTime
|
||||
+ "\", \"searchFoundEndTime\"=\"" + searchFoundEndTime + "}";
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.wordnik.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @ClassName:MmAvIpLog
|
||||
* @Description:TODO(这里用一句话描述这个类的作用)
|
||||
* @author (zdx)
|
||||
* @date 2018年7月16日 下午2:54:23
|
||||
* @version V1.0
|
||||
@@ -19,7 +18,7 @@ public class MmAvIpLog extends BaseLogEntity<MmAvIpLog> {
|
||||
@ApiModelProperty(value="封堵现场片段路径", required=true)
|
||||
protected String logUri;
|
||||
@ApiModelProperty(value="入口页面", required=true)
|
||||
protected String refer;
|
||||
protected String referer;
|
||||
@ApiModelProperty(value="有害级别", required=true)
|
||||
protected Integer level;
|
||||
@ApiModelProperty(value="封堵类型", required=true)
|
||||
@@ -44,11 +43,11 @@ public class MmAvIpLog extends BaseLogEntity<MmAvIpLog> {
|
||||
public void setLogUri(String logUri) {
|
||||
this.logUri = logUri;
|
||||
}
|
||||
public String getRefer() {
|
||||
return refer;
|
||||
public String getReferer() {
|
||||
return referer;
|
||||
}
|
||||
public void setRefer(String refer) {
|
||||
this.refer = refer;
|
||||
public void setReferer(String referer) {
|
||||
this.referer = referer;
|
||||
}
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
|
||||
@@ -19,7 +19,7 @@ public class MmAvUrlLog extends BaseLogEntity<MmAvUrlLog> {
|
||||
@ApiModelProperty(value="封堵现场片段路径", required=true)
|
||||
protected String logUri;
|
||||
@ApiModelProperty(value="入口页面", required=true)
|
||||
protected String refer;
|
||||
protected String referer;
|
||||
@ApiModelProperty(value="有害级别", required=true)
|
||||
protected Integer level;
|
||||
@ApiModelProperty(value="封堵类型", required=true)
|
||||
@@ -44,11 +44,11 @@ public class MmAvUrlLog extends BaseLogEntity<MmAvUrlLog> {
|
||||
public void setLogUri(String logUri) {
|
||||
this.logUri = logUri;
|
||||
}
|
||||
public String getRefer() {
|
||||
return refer;
|
||||
public String getReferer() {
|
||||
return referer;
|
||||
}
|
||||
public void setRefer(String refer) {
|
||||
this.refer = refer;
|
||||
public void setReferer(String referer) {
|
||||
this.referer = referer;
|
||||
}
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
|
||||
@@ -7,7 +7,7 @@ public class MmPicIpLog extends BaseLogEntity<MmPicIpLog> {
|
||||
private String pid;// 节目ID
|
||||
private String url;// 节目访问地址
|
||||
private String logUri;// fd现场片段路径
|
||||
private String refer;// 入口页面
|
||||
private String referer;// 入口页面
|
||||
private Integer level;// 有害级别
|
||||
private Integer fdType;// fd类型
|
||||
private String protocol;// 传输协议
|
||||
@@ -30,11 +30,11 @@ public class MmPicIpLog extends BaseLogEntity<MmPicIpLog> {
|
||||
public void setLogUri(String logUri) {
|
||||
this.logUri = logUri;
|
||||
}
|
||||
public String getRefer() {
|
||||
return refer;
|
||||
public String getReferer() {
|
||||
return referer;
|
||||
}
|
||||
public void setRefer(String refer) {
|
||||
this.refer = refer;
|
||||
public void setReferer(String referer) {
|
||||
this.referer = referer;
|
||||
}
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
|
||||
@@ -7,7 +7,7 @@ public class MmPicUrlLog extends BaseLogEntity<MmPicUrlLog>{
|
||||
private String pid;// 节目ID
|
||||
private String url;// 节目访问地址
|
||||
private String logUri;// fd现场片段路径
|
||||
private String refer;// 入口页面
|
||||
private String referer;// 入口页面
|
||||
private Integer level;// 有害级别
|
||||
private Integer fdType;// fd类型
|
||||
private String protocol;// 传输协议
|
||||
@@ -30,11 +30,11 @@ public class MmPicUrlLog extends BaseLogEntity<MmPicUrlLog>{
|
||||
public void setLogUri(String logUri) {
|
||||
this.logUri = logUri;
|
||||
}
|
||||
public String getRefer() {
|
||||
return refer;
|
||||
public String getReferer() {
|
||||
return referer;
|
||||
}
|
||||
public void setRefer(String refer) {
|
||||
this.refer = refer;
|
||||
public void setReferer(String referer) {
|
||||
this.referer = referer;
|
||||
}
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
|
||||
@@ -7,7 +7,7 @@ public class MmSampleAudioLog extends BaseLogEntity<MmSampleAudioLog>{
|
||||
private String pid;// 节目ID
|
||||
private String url;// 节目访问地址
|
||||
private String logUri;// fd现场片段路径
|
||||
private String refer;// 入口页面
|
||||
private String referer;// 入口页面
|
||||
private Integer level;// 有害级别
|
||||
private Integer fdType;// fd类型
|
||||
private String protocol;// 传输协议
|
||||
@@ -30,11 +30,11 @@ public class MmSampleAudioLog extends BaseLogEntity<MmSampleAudioLog>{
|
||||
public void setLogUri(String logUri) {
|
||||
this.logUri = logUri;
|
||||
}
|
||||
public String getRefer() {
|
||||
return refer;
|
||||
public String getReferer() {
|
||||
return referer;
|
||||
}
|
||||
public void setRefer(String refer) {
|
||||
this.refer = refer;
|
||||
public void setReferer(String referer) {
|
||||
this.referer = referer;
|
||||
}
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
@@ -56,7 +56,7 @@ public class MmSampleAudioLog extends BaseLogEntity<MmSampleAudioLog>{
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MmSampleAudioLog [pid=" + pid + ", url=" + url + ", logUri=" + logUri + ", refer=" + refer + ", level="
|
||||
return "MmSampleAudioLog [pid=" + pid + ", url=" + url + ", logUri=" + logUri + ", referer=" + referer + ", level="
|
||||
+ level + ", fdType=" + fdType + ", protocol=" + protocol + "]";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ public class MmSamplePicLog extends BaseLogEntity<MmSamplePicLog>{
|
||||
private String pid;// 节目ID
|
||||
private String url;// 节目访问地址
|
||||
private String logUri;// fd现场片段路径
|
||||
private String refer;// 入口页面
|
||||
private String referer;// 入口页面
|
||||
private Integer level;// 有害级别
|
||||
private Integer fdType;// fd类型
|
||||
private String protocol;// 传输协议
|
||||
@@ -29,11 +29,11 @@ public class MmSamplePicLog extends BaseLogEntity<MmSamplePicLog>{
|
||||
public void setLogUri(String logUri) {
|
||||
this.logUri = logUri;
|
||||
}
|
||||
public String getRefer() {
|
||||
return refer;
|
||||
public String getReferer() {
|
||||
return referer;
|
||||
}
|
||||
public void setRefer(String refer) {
|
||||
this.refer = refer;
|
||||
public void setReferer(String referer) {
|
||||
this.referer = referer;
|
||||
}
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
@@ -55,7 +55,7 @@ public class MmSamplePicLog extends BaseLogEntity<MmSamplePicLog>{
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MmSamplePicLog [pid=" + pid + ", url=" + url + ", logUri=" + logUri + ", refer=" + refer + ", level="
|
||||
return "MmSamplePicLog [pid=" + pid + ", url=" + url + ", logUri=" + logUri + ", referer=" + referer + ", level="
|
||||
+ level + ", fdType=" + fdType + ", protocol=" + protocol + "]";
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ public class MmSampleVideoLog extends BaseLogEntity<MmSampleVideoLog>{
|
||||
private String pid;// 节目ID
|
||||
private String url;// 节目访问地址
|
||||
private String logUri;// fd现场片段路径
|
||||
private String refer;// 入口页面
|
||||
private String referer;// 入口页面
|
||||
private Integer level;// 有害级别
|
||||
private Integer fdType;// fd类型
|
||||
private String protocol;// 传输协议
|
||||
@@ -29,11 +29,11 @@ public class MmSampleVideoLog extends BaseLogEntity<MmSampleVideoLog>{
|
||||
public void setLogUri(String logUri) {
|
||||
this.logUri = logUri;
|
||||
}
|
||||
public String getRefer() {
|
||||
return refer;
|
||||
public String getReferer() {
|
||||
return referer;
|
||||
}
|
||||
public void setRefer(String refer) {
|
||||
this.refer = refer;
|
||||
public void setReferer(String referer) {
|
||||
this.referer = referer;
|
||||
}
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
@@ -55,7 +55,7 @@ public class MmSampleVideoLog extends BaseLogEntity<MmSampleVideoLog>{
|
||||
}
|
||||
@Override
|
||||
public String toString() {
|
||||
return "MmSampleVideoLog [pid=" + pid + ", url=" + url + ", logUri=" + logUri + ", refer=" + refer + ", level="
|
||||
return "MmSampleVideoLog [pid=" + pid + ", url=" + url + ", logUri=" + logUri + ", referer=" + referer + ", level="
|
||||
+ level + ", fdType=" + fdType + ", protocol=" + protocol + "]";
|
||||
}
|
||||
|
||||
|
||||
7
src/main/java/com/nis/domain/log/NtBgpLog.java
Normal file
7
src/main/java/com/nis/domain/log/NtBgpLog.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package com.nis.domain.log;
|
||||
|
||||
public class NtBgpLog extends BaseLogEntity<NtBgpLog> {
|
||||
private static final long serialVersionUID = 1000090441108515598L;
|
||||
|
||||
|
||||
}
|
||||
@@ -5,10 +5,16 @@ public class NtcHttpLog extends BaseLogEntity<NtcHttpLog> {
|
||||
private static final long serialVersionUID = -7697668215327123848L;
|
||||
|
||||
private String url;
|
||||
private String reqHdrKey;//请求头转储文件key
|
||||
private String reqHdrFile;
|
||||
private String reqBodyKey;//请求体转储文件key
|
||||
private String reqBodyFile;
|
||||
private String resHdrKey;//应答头转储文件key
|
||||
private String resHdrFile;
|
||||
private String resBodyKey;//应答体转储文件key
|
||||
private String resBodyFile;
|
||||
private String website;//域名
|
||||
|
||||
|
||||
/*以下字段无需反馈到界面*/
|
||||
private Integer c2sIsn;
|
||||
@@ -134,4 +140,34 @@ public class NtcHttpLog extends BaseLogEntity<NtcHttpLog> {
|
||||
public void setResLine(String resLine) {
|
||||
this.resLine = resLine;
|
||||
}
|
||||
public String getReqHdrKey() {
|
||||
return reqHdrKey;
|
||||
}
|
||||
public void setReqHdrKey(String reqHdrKey) {
|
||||
this.reqHdrKey = reqHdrKey;
|
||||
}
|
||||
public String getReqBodyKey() {
|
||||
return reqBodyKey;
|
||||
}
|
||||
public void setReqBodyKey(String reqBodyKey) {
|
||||
this.reqBodyKey = reqBodyKey;
|
||||
}
|
||||
public String getResHdrKey() {
|
||||
return resHdrKey;
|
||||
}
|
||||
public void setResHdrKey(String resHdrKey) {
|
||||
this.resHdrKey = resHdrKey;
|
||||
}
|
||||
public String getResBodyKey() {
|
||||
return resBodyKey;
|
||||
}
|
||||
public void setResBodyKey(String resBodyKey) {
|
||||
this.resBodyKey = resBodyKey;
|
||||
}
|
||||
public String getWebsite() {
|
||||
return website;
|
||||
}
|
||||
public void setWebsite(String website) {
|
||||
this.website = website;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,105 +51,126 @@ public class CodeDicUtils {
|
||||
// }
|
||||
// putCache(CACHE_MENU_LIST, menuList);
|
||||
// }
|
||||
|
||||
//注释码表获取缓存,增加修改清除缓存功能后可以添加缓存
|
||||
List<CodeResult> result = new ArrayList<>();
|
||||
if (name.equals(APP_CODE)) {
|
||||
List<CodeAppDic> codeDicList = (List<CodeAppDic>) CacheUtils.get(APP_CODE);
|
||||
if(StringUtil.isEmpty(codeDicList)){
|
||||
codeDicList = codeAppDicDao.getCodeDicList();
|
||||
CacheUtils.put(APP_CODE,codeDicList);
|
||||
}
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getAppName());
|
||||
codeResult.setCode(codeDicList.get(i).getViewCode());
|
||||
codeResult.setCoreApp(codeDicList.get(i).getCoreApp());
|
||||
result.add(codeResult);
|
||||
// List<CodeAppDic> codeDicList = (List<CodeAppDic>) CacheUtils.get(APP_CODE);
|
||||
List<CodeAppDic> codeDicList = codeAppDicDao.getCodeDicList();
|
||||
// if(StringUtil.isEmpty(codeDicList)){
|
||||
// codeDicList = codeAppDicDao.getCodeDicList();
|
||||
// CacheUtils.put(APP_CODE,codeDicList);
|
||||
// }
|
||||
if(codeDicList!=null&&codeDicList.size()>0){
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getAppName());
|
||||
codeResult.setCode(codeDicList.get(i).getViewCode());
|
||||
codeResult.setCoreApp(codeDicList.get(i).getCoreApp());
|
||||
result.add(codeResult);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
} else if (name.equals(BEHAVIOR_CODE)) {
|
||||
List<CodeBehaviorTypeDic> codeDicList = (List<CodeBehaviorTypeDic>) CacheUtils.get(BEHAVIOR_CODE);
|
||||
if(StringUtil.isEmpty(codeDicList)){
|
||||
codeDicList = codeBehaviorTypeDicDao.getCodeDicList();
|
||||
CacheUtils.put(BEHAVIOR_CODE,codeDicList);
|
||||
}
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getBehaviorType());
|
||||
codeResult.setCode(codeDicList.get(i).getViewCode());
|
||||
|
||||
result.add(codeResult);
|
||||
// List<CodeBehaviorTypeDic> codeDicList = (List<CodeBehaviorTypeDic>) CacheUtils.get(BEHAVIOR_CODE);
|
||||
// if(StringUtil.isEmpty(codeDicList)){
|
||||
// codeDicList = codeBehaviorTypeDicDao.getCodeDicList();
|
||||
// CacheUtils.put(BEHAVIOR_CODE,codeDicList);
|
||||
// }
|
||||
List<CodeBehaviorTypeDic> codeDicList = codeBehaviorTypeDicDao.getCodeDicList();
|
||||
if(codeDicList!=null&&codeDicList.size()>0){
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getBehaviorType());
|
||||
codeResult.setCode(codeDicList.get(i).getViewCode());
|
||||
|
||||
result.add(codeResult);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
} else if (name.equals(BROWSER_CODE)) {
|
||||
List<CodeBrowserTypeDic> codeDicList = (List<CodeBrowserTypeDic>) CacheUtils.get(BROWSER_CODE);
|
||||
if(StringUtil.isEmpty(codeDicList)){
|
||||
codeDicList = codeBrowserTypeDicDao.getCodeDicList();
|
||||
CacheUtils.put(BROWSER_CODE, codeDicList);
|
||||
}
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getBrowserType());
|
||||
codeResult.setCode(codeDicList.get(i).getViewCode());
|
||||
|
||||
result.add(codeResult);
|
||||
// List<CodeBrowserTypeDic> codeDicList = (List<CodeBrowserTypeDic>) CacheUtils.get(BROWSER_CODE);
|
||||
// if(StringUtil.isEmpty(codeDicList)){
|
||||
// codeDicList = codeBrowserTypeDicDao.getCodeDicList();
|
||||
// CacheUtils.put(BROWSER_CODE, codeDicList);
|
||||
// }
|
||||
List<CodeBrowserTypeDic> codeDicList = codeBrowserTypeDicDao.getCodeDicList();
|
||||
if(codeDicList!=null&&codeDicList.size()>0){
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getBrowserType());
|
||||
codeResult.setCode(codeDicList.get(i).getViewCode());
|
||||
|
||||
result.add(codeResult);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
} else if (name.equals(OS_CODE)) {
|
||||
List<CodeOsTypeDic> codeDicList = (List<CodeOsTypeDic>) CacheUtils.get(OS_CODE);
|
||||
if(StringUtil.isEmpty(codeDicList)){
|
||||
codeDicList = codeOsTypeDicDao.getCodeDicList();
|
||||
CacheUtils.put(OS_CODE, codeDicList);
|
||||
}
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getOsType());
|
||||
codeResult.setCode(codeDicList.get(i).getViewCode());
|
||||
|
||||
result.add(codeResult);
|
||||
// List<CodeOsTypeDic> codeDicList = (List<CodeOsTypeDic>) CacheUtils.get(OS_CODE);
|
||||
// if(StringUtil.isEmpty(codeDicList)){
|
||||
// codeDicList = codeOsTypeDicDao.getCodeDicList();
|
||||
// CacheUtils.put(OS_CODE, codeDicList);
|
||||
// }
|
||||
List<CodeOsTypeDic> codeDicList = codeOsTypeDicDao.getCodeDicList();
|
||||
if(codeDicList!=null&&codeDicList.size()>0){
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getOsType());
|
||||
codeResult.setCode(codeDicList.get(i).getViewCode());
|
||||
|
||||
result.add(codeResult);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
} else if (name.equals(PROTOCOL_CODE)) {
|
||||
List<CodeProtocolTypeDic> codeDicList = (List<CodeProtocolTypeDic>) CacheUtils.get(PROTOCOL_CODE);
|
||||
if(StringUtil.isEmpty(codeDicList)){
|
||||
codeDicList = codeProtocolTypeDicDao.getCodeDicList();
|
||||
CacheUtils.put(PROTOCOL_CODE, codeDicList);
|
||||
}
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getProtocolType());
|
||||
codeResult.setCode(codeDicList.get(i).getViewCode());
|
||||
|
||||
result.add(codeResult);
|
||||
// List<CodeProtocolTypeDic> codeDicList = (List<CodeProtocolTypeDic>) CacheUtils.get(PROTOCOL_CODE);
|
||||
// if(StringUtil.isEmpty(codeDicList)){
|
||||
// codeDicList = codeProtocolTypeDicDao.getCodeDicList();
|
||||
// CacheUtils.put(PROTOCOL_CODE, codeDicList);
|
||||
// }
|
||||
List<CodeProtocolTypeDic> codeDicList = codeProtocolTypeDicDao.getCodeDicList();
|
||||
if(codeDicList!=null&&codeDicList.size()>0){
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getProtocolType());
|
||||
codeResult.setCode(codeDicList.get(i).getViewCode());
|
||||
|
||||
result.add(codeResult);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
} else if (name.equals(SERVICE_CODE)) {
|
||||
List<CodeServiceTypeDic> codeDicList = (List<CodeServiceTypeDic>) CacheUtils.get(SERVICE_CODE);
|
||||
if(StringUtil.isEmpty(codeDicList)){
|
||||
codeDicList = codeServiceTypeDicDao.getCodeDicList();
|
||||
CacheUtils.put(SERVICE_CODE, codeDicList);
|
||||
}
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getServiceType());
|
||||
codeResult.setCode(codeDicList.get(i).getViewCode());
|
||||
|
||||
result.add(codeResult);
|
||||
// List<CodeServiceTypeDic> codeDicList = (List<CodeServiceTypeDic>) CacheUtils.get(SERVICE_CODE);
|
||||
// if(StringUtil.isEmpty(codeDicList)){
|
||||
// codeDicList = codeServiceTypeDicDao.getCodeDicList();
|
||||
// CacheUtils.put(SERVICE_CODE, codeDicList);
|
||||
// }
|
||||
List<CodeServiceTypeDic> codeDicList = codeServiceTypeDicDao.getCodeDicList();
|
||||
if(codeDicList!=null&&codeDicList.size()>0){
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getServiceType());
|
||||
codeResult.setCode(codeDicList.get(i).getViewCode());
|
||||
|
||||
result.add(codeResult);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
} else if (name.equals(WEB_CODE)) {
|
||||
List<CodeWebServiceDic> codeDicList = (List<CodeWebServiceDic>) CacheUtils.get(WEB_CODE);
|
||||
if(StringUtil.isEmpty(codeDicList)){
|
||||
codeDicList = codeWebServiceDicDao.getCodeDicList();
|
||||
CacheUtils.put(WEB_CODE, codeDicList);
|
||||
}
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getWebsite());
|
||||
codeResult.setCode(codeDicList.get(i).getViewCode());
|
||||
|
||||
result.add(codeResult);
|
||||
// List<CodeWebServiceDic> codeDicList = (List<CodeWebServiceDic>) CacheUtils.get(WEB_CODE);
|
||||
// if(StringUtil.isEmpty(codeDicList)){
|
||||
// codeDicList = codeWebServiceDicDao.getCodeDicList();
|
||||
// CacheUtils.put(WEB_CODE, codeDicList);
|
||||
// }
|
||||
List<CodeWebServiceDic> codeDicList = codeWebServiceDicDao.getCodeDicList();
|
||||
if(codeDicList!=null&&codeDicList.size()>0){
|
||||
for (int i = 0; i < codeDicList.size(); i++) {
|
||||
CodeResult codeResult = new CodeResult();
|
||||
codeResult.setItem(codeDicList.get(i).getWebsite());
|
||||
codeResult.setCode(codeDicList.get(i).getViewCode());
|
||||
|
||||
result.add(codeResult);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -389,6 +389,8 @@ public final class Constants {
|
||||
public static final String NTC_NTC_LWHH_REPORT=Configurations.getStringProperty("ntcLwhhReport","ntcLwhhReport");
|
||||
public static final String NTC_NTC_ENTRANCE_REPORT=Configurations.getStringProperty("ntcEntranceReport","ntcEntranceReport");
|
||||
public static final String NTC_IP_LOG = Configurations.getStringProperty("ntcIpLog","");
|
||||
public static final String NTC_BGP_LOG = Configurations.getStringProperty("ntcBgpLog","");
|
||||
public static final String NTC_P2P_LOG = Configurations.getStringProperty("ntcP2pLog","");
|
||||
public static final String NTC_HTTP_LOG = Configurations.getStringProperty("ntcHttpLog","");
|
||||
public static final String NTC_DNS_LOG = Configurations.getStringProperty("ntcDnsLog","");
|
||||
public static final String NTC_SSL_LOG = Configurations.getStringProperty("ntcSslLog","");
|
||||
@@ -482,6 +484,10 @@ public final class Constants {
|
||||
public static final String REDIRECT_RESPONSE_CODE_STARTWITH = Configurations.getStringProperty("redirect_response_code_startwith","30");
|
||||
public static final String REPLACE_ZONE_KEY = Configurations.getStringProperty("replace_zone_key","zone");
|
||||
public static final String REPLACE_SUBSTITUTE_KEY = Configurations.getStringProperty("replace_substitute_key","substitute");
|
||||
//P2P配置域
|
||||
public static final String P2P_HASH_BIN_REGION = Configurations.getStringProperty("p2p_hash_bin_region","NTC_P2P_HASH_BIN");
|
||||
public static final String P2P_KEYWORDS_REGION = Configurations.getStringProperty("p2p_keywords_region","NTC_P2P_KEYWORDS");
|
||||
public static final String NTC_SUBSCRIBE_ID_REGION = Configurations.getStringProperty("ntc_subscribe_id_region","NTC_SUBSCRIBE_ID");
|
||||
/**
|
||||
* 样例文件URL关键字
|
||||
*/
|
||||
@@ -560,6 +566,9 @@ public final class Constants {
|
||||
public static String HTTP_HEADER_DICT_MODULE=Configurations.getStringProperty("http_header_dict_module", "HTTP_HEADER_DISTRICT");
|
||||
//DNS自定义域参数
|
||||
public static String DNS_STRATEGY_USER_REGION_KEY=Configurations.getStringProperty("dns_strategy_user_region_key", "DNS_STRATEGY");
|
||||
//P2P自定义域参数
|
||||
public static String P2P_IP_TYPE_USER_REGION_KEY=Configurations.getStringProperty("p2p_ip_type_user_region_key", "P2P_IP_TYPE");
|
||||
public static String P2P_HASH_TYPE_USER_REGION_KEY=Configurations.getStringProperty("p2p_hash_type_user_region_key", "P2P_HASH_TYPE");
|
||||
|
||||
//大屏统计分析查询接口URL
|
||||
public static final String DASHBOARD_URL = Configurations.getStringProperty("dashboardUrl","dashboardUrl");
|
||||
|
||||
@@ -52,6 +52,7 @@ import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.excel.ExportExcel;
|
||||
import com.nis.web.service.ArchiveServcie;
|
||||
import com.nis.web.service.AreaService;
|
||||
@@ -637,11 +638,12 @@ public class BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
public void setLogAction(BaseLogEntity log) {
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
for (FunctionServiceDict dict : serviceList) {
|
||||
if (dict.getServiceId().intValue() == log.getService()) {
|
||||
log.setAction(dict.getAction());
|
||||
public void setLogAction(BaseLogEntity log,List<FunctionServiceDict> serviceList) {
|
||||
if(!StringUtil.isEmpty(serviceList)){
|
||||
for (FunctionServiceDict dict : serviceList) {
|
||||
if (dict.getServiceId().intValue() == log.getService()) {
|
||||
log.setAction(dict.getAction());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -727,14 +729,12 @@ public class BaseController {
|
||||
StringBuffer errInfo=new StringBuffer();
|
||||
// ip_type check start
|
||||
Integer ipType=value.getIpType();
|
||||
String ipTypeString=null;
|
||||
if(ipType==null){
|
||||
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("ip_type"))+";");
|
||||
}else{
|
||||
boolean has=false;
|
||||
for(SysDataDictionaryItem ipTypeItem:ipTypeList){
|
||||
if(ipType==Integer.parseInt(ipTypeItem.getItemCode())){
|
||||
ipTypeString=ipTypeItem.getItemValue();
|
||||
has=true;
|
||||
break;
|
||||
}
|
||||
@@ -746,14 +746,12 @@ public class BaseController {
|
||||
// ip_type check end
|
||||
// ip_pattern check start
|
||||
Integer ipPattern=value.getIpPattern();
|
||||
String ipPatternString=null;
|
||||
if(ipPattern==null){
|
||||
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("ip_pattern"))+";");
|
||||
}else{
|
||||
boolean has=false;
|
||||
for(SysDataDictionaryItem ipPatternItem:ipPatternList){
|
||||
if(ipPattern==Integer.parseInt(ipPatternItem.getItemCode())){
|
||||
ipPatternString=ipPatternItem.getItemValue();
|
||||
has=true;
|
||||
break;
|
||||
}
|
||||
@@ -767,9 +765,9 @@ public class BaseController {
|
||||
String srcIp=value.getSrcIpAddress();
|
||||
String _msg="";
|
||||
if("ipmulitiplex".equals(specialItem)) {
|
||||
_msg=checkIP(prop,prop.getProperty("IP"),srcIp,ipTypeString,ipPatternString);
|
||||
_msg=checkIP(prop,prop.getProperty("IP"),srcIp,ipType,ipPattern);
|
||||
}else {
|
||||
_msg=checkIP(prop,prop.getProperty("client_ip"),srcIp,ipTypeString,ipPatternString);
|
||||
_msg=checkIP(prop,prop.getProperty("client_ip"),srcIp,ipType,ipPattern);
|
||||
}
|
||||
if(StringUtils.isNotBlank(_msg)){
|
||||
errInfo.append(_msg);
|
||||
@@ -779,40 +777,40 @@ public class BaseController {
|
||||
String destIp=value.getDestIpAddress();
|
||||
if("ipmulitiplex".equals(specialItem)) {//set 默认值
|
||||
if(ipPattern!=null&&ipType!=null) {
|
||||
if("ip_subnet".equals(ipPatternString)) {
|
||||
if("ipv4".equals(ipTypeString)) {
|
||||
if(1==ipPattern.intValue()) {
|
||||
if(4==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE);
|
||||
}else if("ipv6".equals(ipTypeString)) {
|
||||
}else if(6==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV6_DEFAULT_IP_SUBNET_VALUE);
|
||||
}else if("4over6".equals(ipTypeString)) {
|
||||
}else if(46==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV6_DEFAULT_IP_SUBNET_VALUE);
|
||||
}else if("6over4".equals(ipTypeString)) {
|
||||
}else if(64==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE);
|
||||
}else if("all".equals(ipTypeString)) {
|
||||
}else if(10==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV4_DEFAULT_IP_SUBNET_VALUE);
|
||||
}
|
||||
}else if("ip_range".equals(ipPatternString)) {
|
||||
if("ipv4".equals(ipTypeString)) {
|
||||
}else if(2==ipPattern.intValue()) {
|
||||
if(4==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV4_DEFAULT_IP_RANGE_VALUE);
|
||||
}else if("ipv6".equals(ipTypeString)) {
|
||||
}else if(6==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV6_DEFAULT_IP_RANGE_VALUE);
|
||||
}else if("4over6".equals(ipTypeString)) {
|
||||
}else if(46==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV6_DEFAULT_IP_RANGE_VALUE);
|
||||
}else if("6over4".equals(ipTypeString)) {
|
||||
}else if(64==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV4_DEFAULT_IP_RANGE_VALUE);
|
||||
}else if("all".equals(ipTypeString)) {
|
||||
}else if(10==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV4_DEFAULT_IP_RANGE_VALUE);
|
||||
}
|
||||
}else if("ip".equals(ipPatternString)) {
|
||||
if("ipv4".equals(ipTypeString)) {
|
||||
}else if(3==ipPattern.intValue()) {
|
||||
if(4==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV4_DEFAULT_IP_VALUE);
|
||||
}else if("ipv6".equals(ipTypeString)) {
|
||||
}else if(6==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV6_DEFAULT_IP_VALUE);
|
||||
}else if("4over6".equals(ipTypeString)) {
|
||||
}else if(46==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV6_DEFAULT_IP_VALUE);
|
||||
}else if("6over4".equals(ipTypeString)) {
|
||||
}else if(64==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV4_DEFAULT_IP_VALUE);
|
||||
}else if("all".equals(ipTypeString)) {
|
||||
}else if(10==ipType.intValue()) {
|
||||
value.setDestIpAddress(Constants.IPV4_DEFAULT_IP_VALUE);
|
||||
}
|
||||
}
|
||||
@@ -822,13 +820,13 @@ public class BaseController {
|
||||
String info=String.format(prop.getProperty("are_the_same"),prop.getProperty("client_ip"),prop.getProperty("server_ip"));
|
||||
errInfo.append(info+";");
|
||||
}
|
||||
_msg=checkIP(prop,prop.getProperty("server_ip"),destIp,ipTypeString,ipPatternString);
|
||||
_msg=checkIP(prop,prop.getProperty("server_ip"),destIp,ipType,ipPattern);
|
||||
if(StringUtils.isNotBlank(_msg)){
|
||||
errInfo.append(_msg);
|
||||
}
|
||||
}
|
||||
if(!"ipmulitiplex".equals(specialItem)&&("4over6".equals(ipTypeString)||"6over4".equals(ipTypeString)||"all".equals(ipTypeString))) {
|
||||
_msg=checkIp(prop, prop.getProperty("client_ip"), srcIp, prop.getProperty("server_ip"), destIp, ipTypeString, ipPatternString);
|
||||
if(!"ipmulitiplex".equals(specialItem)&&(46==ipType.intValue()||64==ipType.intValue()||10==ipType.intValue())) {
|
||||
_msg=checkIp(prop, prop.getProperty("client_ip"), srcIp, prop.getProperty("server_ip"), destIp, ipType, ipPattern);
|
||||
if(StringUtils.isNotBlank(_msg)){
|
||||
errInfo.append(_msg);
|
||||
}
|
||||
@@ -836,14 +834,12 @@ public class BaseController {
|
||||
//server_ip check end
|
||||
//port_pattern check start
|
||||
Integer portPattern=value.getPortPattern();
|
||||
String portPatternString=null;
|
||||
if(portPattern==null){
|
||||
errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("port_pattern"))+";");
|
||||
}else{
|
||||
boolean has=false;
|
||||
for(SysDataDictionaryItem portPatternItem:portPatternList){
|
||||
if(portPattern==Integer.parseInt(portPatternItem.getItemCode())){
|
||||
portPatternString=portPatternItem.getItemValue();
|
||||
has=true;
|
||||
break;
|
||||
}
|
||||
@@ -856,9 +852,9 @@ public class BaseController {
|
||||
//src_port check start
|
||||
String srcPort=value.getSrcPort();
|
||||
if("ipmulitiplex".equals(specialItem)) {
|
||||
_msg=checkPort(prop,prop.getProperty("port"), srcPort, portPatternString);
|
||||
_msg=checkPort(prop,prop.getProperty("port"), srcPort, portPattern);
|
||||
}else {
|
||||
_msg=checkPort(prop,prop.getProperty("client_port"), srcPort, portPatternString);
|
||||
_msg=checkPort(prop,prop.getProperty("client_port"), srcPort, portPattern);
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(_msg)){
|
||||
@@ -869,14 +865,14 @@ public class BaseController {
|
||||
String destPort=value.getDestPort();
|
||||
if("ipmulitiplex".equals(specialItem)) {//set 默认值
|
||||
if(portPattern!=null) {
|
||||
if("port_mask".equals(portPatternString)) {
|
||||
if(2==portPattern.intValue()) {
|
||||
value.setDestPort(Constants.PORT_MASK_DEFAULT);
|
||||
}else if("port".equals(portPatternString)) {
|
||||
}else if(1==portPattern.intValue()) {
|
||||
value.setDestPort(Constants.PORT_DEFAULT);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
_msg=checkPort(prop,prop.getProperty("server_port"), destPort, portPatternString);
|
||||
_msg=checkPort(prop,prop.getProperty("server_port"), destPort, portPattern);
|
||||
}
|
||||
if(StringUtils.isNotBlank(_msg)){
|
||||
errInfo.append(_msg);
|
||||
@@ -1147,10 +1143,72 @@ public class BaseController {
|
||||
}
|
||||
return msg.toString();
|
||||
}
|
||||
public static String checkIp(Properties prop,String srcIpName,String srcIp,String destIpName,String destIp,String ipType,String ipPattern) {
|
||||
/**
|
||||
*
|
||||
* checkIP(IP格式验证)
|
||||
* (这里描述这个方法适用条件 – 可选)
|
||||
* @param ipName
|
||||
* @param ip
|
||||
* @param ipType
|
||||
* @param ipPattern
|
||||
* @return
|
||||
*String
|
||||
* @exception
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static String checkIP(Properties prop,String ipName,String ip,Integer ipType,Integer ipPattern){
|
||||
StringBuffer msg=new StringBuffer();
|
||||
if("4over6".equals(ipType)){
|
||||
if("ip_subnet".equals(ipPattern)){
|
||||
if(StringUtils.isBlank(ip)){
|
||||
msg.append(String.format(prop.getProperty("can_not_null"), ipName)+";");
|
||||
}else{
|
||||
if(4==ipType.intValue()){
|
||||
if(1==ipPattern.intValue()){
|
||||
Pattern pattern=Pattern.compile(Constants.IPV4_IP_SUBNET_REGEXP);
|
||||
Matcher matcher=pattern.matcher(ip);
|
||||
if(!matcher.matches()){//完全匹配
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), ipName)+";");
|
||||
}
|
||||
}else if(2==ipPattern.intValue()){
|
||||
Pattern pattern=Pattern.compile(Constants.IPV4_IP_RANGE_REGEXP);
|
||||
Matcher matcher=pattern.matcher(ip);
|
||||
if(!matcher.matches()){//完全匹配
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), ipName)+";");
|
||||
}
|
||||
}else if(3==ipPattern.intValue()){
|
||||
Pattern pattern=Pattern.compile(Constants.IPV4_IP_REGEXP);
|
||||
Matcher matcher=pattern.matcher(ip);
|
||||
if(!matcher.matches()){//完全匹配
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), ipName)+";");
|
||||
}
|
||||
}
|
||||
}else if(6==ipType.intValue()){
|
||||
if(1==ipPattern.intValue()){
|
||||
Pattern pattern=Pattern.compile(Constants.IPV6_IP_SUBNET_REGEXP);
|
||||
Matcher matcher=pattern.matcher(ip);
|
||||
if(!matcher.matches()){//完全匹配
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), ipName)+";");
|
||||
}
|
||||
}else if(2==ipPattern.intValue()){
|
||||
Pattern pattern=Pattern.compile(Constants.IPV6_IP_RANGE_REGEXP);
|
||||
Matcher matcher=pattern.matcher(ip);
|
||||
if(!matcher.matches()){//完全匹配
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), ipName)+";");
|
||||
}
|
||||
}else if(3==ipPattern.intValue()){
|
||||
Pattern pattern=Pattern.compile(Constants.IPV6_IP_REGEXP);
|
||||
Matcher matcher=pattern.matcher(ip);
|
||||
if(!matcher.matches()){//完全匹配
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), ipName)+";");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return msg.toString();
|
||||
}
|
||||
public static String checkIp(Properties prop,String srcIpName,String srcIp,String destIpName,String destIp,Integer ipType,Integer ipPattern) {
|
||||
StringBuffer msg=new StringBuffer();
|
||||
if(46==ipType.intValue()){
|
||||
if(1==ipPattern.intValue()){
|
||||
Pattern patternV4=Pattern.compile(Constants.IPV4_IP_SUBNET_REGEXP);
|
||||
Pattern patternV6=Pattern.compile(Constants.IPV6_IP_SUBNET_REGEXP);
|
||||
Matcher matcherV4=patternV4.matcher(srcIp);
|
||||
@@ -1161,7 +1219,7 @@ public class BaseController {
|
||||
if(!matcherV6.matches()){//完全匹配
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), destIpName)+";");
|
||||
}
|
||||
}else if("ip_range".equals(ipPattern)){
|
||||
}else if(2==ipPattern.intValue()){
|
||||
Pattern patternV4=Pattern.compile(Constants.IPV4_IP_RANGE_REGEXP);
|
||||
Pattern patternV6=Pattern.compile(Constants.IPV6_IP_RANGE_REGEXP);
|
||||
Matcher matcherV4=patternV4.matcher(srcIp);
|
||||
@@ -1172,7 +1230,7 @@ public class BaseController {
|
||||
if(!matcherV6.matches()){//完全匹配
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), destIpName)+";");
|
||||
}
|
||||
}else if("ip".equals(ipPattern)){
|
||||
}else if(3==ipPattern.intValue()){
|
||||
Pattern patternV4=Pattern.compile(Constants.IPV4_IP_REGEXP);
|
||||
Pattern patternV6=Pattern.compile(Constants.IPV6_IP_REGEXP);
|
||||
Matcher matcherV4=patternV4.matcher(srcIp);
|
||||
@@ -1184,8 +1242,8 @@ public class BaseController {
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), destIpName)+";");
|
||||
}
|
||||
}
|
||||
}else if("6over4".equals(ipType)) {
|
||||
if("ip_subnet".equals(ipPattern)){
|
||||
}else if(64==ipType.intValue()) {
|
||||
if(1==ipPattern.intValue()){
|
||||
Pattern patternV4=Pattern.compile(Constants.IPV4_IP_SUBNET_REGEXP);
|
||||
Pattern patternV6=Pattern.compile(Constants.IPV6_IP_SUBNET_REGEXP);
|
||||
Matcher matcherV4=patternV4.matcher(destIp);
|
||||
@@ -1196,7 +1254,7 @@ public class BaseController {
|
||||
if(!matcherV6.matches()){//完全匹配
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), srcIpName)+";");
|
||||
}
|
||||
}else if("ip_range".equals(ipPattern)){
|
||||
}else if(2==ipPattern.intValue()){
|
||||
Pattern patternV4=Pattern.compile(Constants.IPV4_IP_RANGE_REGEXP);
|
||||
Pattern patternV6=Pattern.compile(Constants.IPV6_IP_RANGE_REGEXP);
|
||||
Matcher matcherV4=patternV4.matcher(destIp);
|
||||
@@ -1207,7 +1265,7 @@ public class BaseController {
|
||||
if(!matcherV6.matches()){//完全匹配
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), srcIpName )+";");
|
||||
}
|
||||
}else if("ip".equals(ipPattern)){
|
||||
}else if(3==ipPattern.intValue()){
|
||||
Pattern patternV4=Pattern.compile(Constants.IPV4_IP_REGEXP);
|
||||
Pattern patternV6=Pattern.compile(Constants.IPV6_IP_REGEXP);
|
||||
Matcher matcherV4=patternV4.matcher(destIp);
|
||||
@@ -1219,8 +1277,8 @@ public class BaseController {
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), srcIpName)+";");
|
||||
}
|
||||
}
|
||||
}else if("all".equals(ipType)) {
|
||||
if("ip_subnet".equals(ipPattern)){
|
||||
}else if(10==ipType.intValue()) {
|
||||
if(1==ipPattern.intValue()){
|
||||
Pattern patternV4=Pattern.compile(Constants.IPV4_IP_SUBNET_REGEXP);
|
||||
Pattern patternV6=Pattern.compile(Constants.IPV6_IP_SUBNET_REGEXP);
|
||||
Matcher matcherSrcIpV4=patternV4.matcher(srcIp);
|
||||
@@ -1233,7 +1291,7 @@ public class BaseController {
|
||||
if(!matcherDestIpV4.matches()&&!matcherDestIpV6.matches()){//完全匹配
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), destIpName)+";");
|
||||
}
|
||||
}else if("ip_range".equals(ipPattern)){
|
||||
}else if(2==ipPattern.intValue()){
|
||||
Pattern patternV4=Pattern.compile(Constants.IPV4_IP_RANGE_REGEXP);
|
||||
Pattern patternV6=Pattern.compile(Constants.IPV6_IP_RANGE_REGEXP);
|
||||
Matcher matcherSrcIpV4=patternV4.matcher(srcIp);
|
||||
@@ -1246,7 +1304,7 @@ public class BaseController {
|
||||
if(!matcherDestIpV4.matches()&&!matcherDestIpV6.matches()){//完全匹配
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), destIpName)+";");
|
||||
}
|
||||
}else if("ip".equals(ipPattern)){
|
||||
}else if(3==ipPattern.intValue()){
|
||||
Pattern patternV4=Pattern.compile(Constants.IPV4_IP_REGEXP);
|
||||
Pattern patternV6=Pattern.compile(Constants.IPV6_IP_REGEXP);
|
||||
Matcher matcherSrcIpV4=patternV4.matcher(srcIp);
|
||||
@@ -1263,12 +1321,12 @@ public class BaseController {
|
||||
}
|
||||
return msg.toString();
|
||||
}
|
||||
public static String checkPort(Properties prop,String portName,String port,String portPattern){
|
||||
public static String checkPort(Properties prop,String portName,String port,Integer portPattern){
|
||||
StringBuffer msg=new StringBuffer();
|
||||
if(StringUtils.isBlank(port)){
|
||||
msg.append(String.format(prop.getProperty("can_not_null"), portName)+";");
|
||||
}else{
|
||||
if("port".equals(portPattern)){
|
||||
if(1==portPattern.intValue()){
|
||||
try{
|
||||
Integer portInt=Integer.parseInt(port);
|
||||
if(portInt<0||portInt>65535){
|
||||
@@ -1278,7 +1336,7 @@ public class BaseController {
|
||||
// TODO: handle exception
|
||||
msg.append(String.format(prop.getProperty("not_number"), portName)+";");
|
||||
}
|
||||
}else if("port_mask".equals(portPattern)){
|
||||
}else if(2==portPattern.intValue()){
|
||||
if(port.indexOf("/")==-1){
|
||||
msg.append(String.format(prop.getProperty("is_in_wrong_format"), portName)+";");
|
||||
}else{
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.nis.domain.configuration.AppDomainCfg;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
@@ -633,4 +634,114 @@ public class AppCfgController extends BaseController {
|
||||
appCfgService.updateAppByteCfgValid(isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/app/byteCfgList?functionId="+functionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* APP ssl证书特征配置 列表
|
||||
* @param model
|
||||
* @param cfg
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"sslCfgList"})
|
||||
public String sslCfgList(Model model,@ModelAttribute("cfg")AppSslCertCfg cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<AppSslCertCfg> searchPage=new Page<AppSslCertCfg>(request,response,"r");
|
||||
Page<AppSslCertCfg> page = appCfgService.findAppSslList(searchPage, cfg);
|
||||
for(AppSslCertCfg entity:page.getList()){
|
||||
SpecificServiceCfg app = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
||||
entity.setAppName(app.getSpecServiceName());
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model,cfg);
|
||||
return "/cfg/app/appSslCfgList";
|
||||
}
|
||||
/**
|
||||
* APP ssl证书特征配置表单(新增/修改)
|
||||
* @param model
|
||||
* @param ids
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"sslCfgForm"})
|
||||
@RequiresPermissions(value={"app:ssl:config"})
|
||||
public String sslCfgForm(Model model,String ids,AppSslCertCfg entity) {
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = appCfgService.getAppSslCfg(Long.parseLong(ids));
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
initFormCondition(model,entity);
|
||||
}
|
||||
model.addAttribute("_cfg", entity);
|
||||
return "/cfg/app/appSslCfgForm";
|
||||
}
|
||||
/**
|
||||
* APP ssl证书特征配置(新增/修改)提交
|
||||
* @param model
|
||||
* @param request
|
||||
* @param response
|
||||
* @param entity
|
||||
* @param redirectAttributes
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"saveAppSslCfg"})
|
||||
@RequiresPermissions(value={"app:ssl:config"})
|
||||
public String saveAppSslCfg(Model model,HttpServletRequest request,HttpServletResponse response,
|
||||
AppSslCertCfg entity,RedirectAttributes redirectAttributes) {
|
||||
try {
|
||||
SpecificServiceCfg specificService = specificServiceCfgService.getBySpecServiceId(entity.getSpecServiceId());
|
||||
if(specificService!=null){
|
||||
entity.setAppCode(specificService.getSpecServiceCode());
|
||||
}
|
||||
appCfgService.saveOrUpdateAppSslCfg(entity);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/app/sslCfgList?functionId="+entity.getFunctionId();
|
||||
}
|
||||
/**
|
||||
* APP ssl证书特征配置 审核
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids
|
||||
* @param functionId
|
||||
* @param redirectAttributes
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"auditAppSslCfg"})
|
||||
@RequiresPermissions(value={"app:ssl:confirm"})
|
||||
public String auditAppSslCfg(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||
AppSslCertCfg entity = new AppSslCertCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = appCfgService.getAppSslCfg(Long.parseLong(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
appCfgService.auditAppSslCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
logger.info("app SSL配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/app/sslCfgList?functionId="+functionId;
|
||||
}
|
||||
/**
|
||||
* APP ssl证书特征配置 删除
|
||||
* @param isValid
|
||||
* @param ids
|
||||
* @param functionId
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = {"updateAppSslCfgValid"})
|
||||
@RequiresPermissions(value={"app:ssl:config"})
|
||||
public String updateAppSslCfgValid(Integer isValid,String ids,Integer functionId) {
|
||||
appCfgService.updateAppSslCfgValid(isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/app/sslCfgList?functionId="+functionId;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -29,9 +29,13 @@ import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.FileDigestCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.P2pHashCfg;
|
||||
import com.nis.domain.configuration.P2pKeywordCfg;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.StringUtil;
|
||||
@@ -226,4 +230,154 @@ public class FileTransferCfgController extends BaseController{
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/fileTransfer/fileDigestList?functionId="+functionId;
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"p2pList"})
|
||||
public String p2pList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) {
|
||||
Page<CfgIndexInfo> searchPage=new Page<CfgIndexInfo>(request,response,"a");
|
||||
Page<CfgIndexInfo> page = fileTransferCfgService.getP2pList(searchPage, cfg);
|
||||
model.addAttribute("page", page);
|
||||
initPageCondition(model,cfg);
|
||||
return "/cfg/fileTransfer/p2pList";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"p2pForm"})
|
||||
@RequiresPermissions(value={"fileTransfer:p2p:config"})
|
||||
public String p2pForm(Model model,String ids,CfgIndexInfo entity) {
|
||||
// 跳转操作页面(根据ids判断是新增 or 修改)
|
||||
if(StringUtils.isNotBlank(ids)){
|
||||
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(ids));
|
||||
|
||||
// 添加配置域Key,用于修改页面区分各域配置
|
||||
P2pHashCfg hashCfg = new P2pHashCfg();
|
||||
hashCfg.setCfgType(Constants.P2P_HASH_BIN_REGION);
|
||||
entity.setP2pHash(hashCfg);
|
||||
P2pKeywordCfg keywordCfg = new P2pKeywordCfg();
|
||||
keywordCfg.setCfgType(Constants.P2P_KEYWORDS_REGION);
|
||||
entity.setP2pKeyword(keywordCfg);
|
||||
NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg();
|
||||
subscribeIdCfg.setCfgType(Constants.NTC_SUBSCRIBE_ID_REGION);
|
||||
entity.setNtcSubscribeIdCfg(subscribeIdCfg);
|
||||
|
||||
if(entity.getP2pHashList().size() == 0) {
|
||||
entity.getP2pHashList().add(hashCfg);
|
||||
}
|
||||
if(entity.getP2pKeywordList().size() == 0) {
|
||||
entity.getP2pKeywordList().add(keywordCfg);
|
||||
}
|
||||
if(entity.getNtcSubscribeIdCfgList().size() == 0) {
|
||||
entity.getNtcSubscribeIdCfgList().add(subscribeIdCfg);
|
||||
}
|
||||
|
||||
initUpdateFormCondition(model,entity);
|
||||
}else{
|
||||
// 添加配置域Key,用于新增页面区分各域配置
|
||||
P2pHashCfg hashCfg = new P2pHashCfg();
|
||||
hashCfg.setCfgType(Constants.P2P_HASH_BIN_REGION);
|
||||
entity.setP2pHash(hashCfg);
|
||||
P2pKeywordCfg keywordCfg = new P2pKeywordCfg();
|
||||
keywordCfg.setCfgType(Constants.P2P_KEYWORDS_REGION);
|
||||
entity.setP2pKeyword(keywordCfg);
|
||||
NtcSubscribeIdCfg subscribeIdCfg = new NtcSubscribeIdCfg();
|
||||
subscribeIdCfg.setCfgType(Constants.NTC_SUBSCRIBE_ID_REGION);
|
||||
entity.setNtcSubscribeIdCfg(subscribeIdCfg);
|
||||
|
||||
List<P2pHashCfg> hashList = new ArrayList<P2pHashCfg>();
|
||||
hashList.add(hashCfg);
|
||||
entity.setP2pHashList(hashList);
|
||||
List<P2pKeywordCfg> keywordList = new ArrayList<P2pKeywordCfg>();
|
||||
keywordList.add(keywordCfg);
|
||||
entity.setP2pKeywordList(keywordList);
|
||||
ArrayList<NtcSubscribeIdCfg> subscribeIdList = new ArrayList<NtcSubscribeIdCfg>();
|
||||
subscribeIdList.add(subscribeIdCfg);
|
||||
entity.setNtcSubscribeIdCfgList(subscribeIdList);
|
||||
|
||||
initFormCondition(model,entity);
|
||||
}
|
||||
|
||||
model.addAttribute("_cfg", entity);
|
||||
return "/cfg/fileTransfer/p2pForm";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"saveP2pCfg"})
|
||||
@RequiresPermissions(value={"fileTransfer:p2p:config"})
|
||||
public String saveP2pCfg(Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) {
|
||||
fileTransferCfgService.saveP2pCfg(entity);
|
||||
return "redirect:" + adminPath +"/ntc/fileTransfer/p2pList?functionId="+entity.getFunctionId();
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"updateP2pCfgValid"})
|
||||
@RequiresPermissions(value={"fileTransfer:p2p:config"})
|
||||
public String updateP2pCfgValid(Integer isValid,String ids,Integer functionId) {
|
||||
fileTransferCfgService.updateP2pCfgValid(isValid,ids,functionId);
|
||||
return "redirect:" + adminPath +"/ntc/fileTransfer/p2pList?functionId="+functionId;
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"ajaxP2pSubList"})
|
||||
public String ajaxP2pSubList(Model model,Long cfgId,Integer index) {
|
||||
CfgIndexInfo cfg = fileTransferCfgService.getP2pCfg(cfgId);
|
||||
List<String[]> tabList = new ArrayList();
|
||||
if(cfg.getIpPortList()!=null){
|
||||
String cfgType = null;
|
||||
for(IpPortCfg ip:cfg.getIpPortList()){
|
||||
if(!ip.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"1",ip.getCfgType()});
|
||||
cfgType = ip.getCfgType();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(cfg.getP2pHashList()!=null){
|
||||
String cfgType = null;
|
||||
for(BaseStringCfg hash:cfg.getP2pHashList()){
|
||||
if(!hash.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"2",hash.getCfgType()});
|
||||
cfgType = hash.getCfgType();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(cfg.getP2pKeywordList()!=null){
|
||||
String cfgType = null;
|
||||
for(BaseStringCfg keyword:cfg.getP2pKeywordList()){
|
||||
if(!keyword.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"2",keyword.getCfgType()});
|
||||
cfgType = keyword.getCfgType();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(cfg.getNtcSubscribeIdCfgList()!=null){
|
||||
String cfgType = null;
|
||||
for(BaseStringCfg subscribeId:cfg.getNtcSubscribeIdCfgList()){
|
||||
if(!subscribeId.getCfgType().equals(cfgType)){
|
||||
tabList.add(new String[]{"2",subscribeId.getCfgType()});
|
||||
cfgType = subscribeId.getCfgType();
|
||||
}
|
||||
}
|
||||
}
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
model.addAttribute("tabList", tabList);
|
||||
return "/cfg/fileTransfer/p2pSubList";
|
||||
}
|
||||
|
||||
@RequestMapping(value = {"auditP2pCfg"})
|
||||
@RequiresPermissions(value={"fileTransfer:p2p:confirm"})
|
||||
public String auditP2pCfg(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) {
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity = fileTransferCfgService.getP2pCfg(Long.parseLong(id));
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
fileTransferCfgService.auditP2pCfg(entity,isAudit);
|
||||
} catch (MaatConvertException e) {
|
||||
e.printStackTrace();
|
||||
logger.info("p2p配置下发失败:"+e.getMessage());
|
||||
addMessage(redirectAttributes, e.getMessage());
|
||||
}
|
||||
}
|
||||
return "redirect:" + adminPath +"/ntc/fileTransfer/p2pList?functionId="+functionId;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,11 +56,11 @@ public class IpController extends CommonController{
|
||||
model.addAttribute("dropAction",Constants.DROP_ACTION);
|
||||
model.addAttribute("urlPrefix","/ntc/iplist");
|
||||
model.addAttribute("requiresPermissionPrefix","iplist");
|
||||
if(specialFunctionId!=null && "ipsec".equals(specialFunctionId)) {
|
||||
return "/cfg/ipsec/ipForm";
|
||||
}else if(specialFunctionId!=null && "ipaddr".equals(specialFunctionId)) {
|
||||
return "/cfg/ipaddr/ipForm";
|
||||
}
|
||||
// if(specialFunctionId!=null && "ipsec".equals(specialFunctionId)) {
|
||||
// return "/cfg/ipsec/ipForm";
|
||||
// }else if(specialFunctionId!=null && "ipaddr".equals(specialFunctionId)) {
|
||||
// return "/cfg/ipaddr/ipForm";
|
||||
// }
|
||||
return "/cfg/common/ipForm";
|
||||
}
|
||||
@RequestMapping(value = {"saveOrUpdate"})
|
||||
|
||||
@@ -17,11 +17,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.DkBehaviorLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -50,6 +52,9 @@ public class DkBehaviorLogController extends BaseController{
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_DKBEHAVIOR_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
@@ -64,7 +69,7 @@ public class DkBehaviorLogController extends BaseController{
|
||||
List<DkBehaviorLog> list = page.getList();
|
||||
for (DkBehaviorLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询行为识别日志成功");
|
||||
|
||||
@@ -18,11 +18,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcAppLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -51,6 +53,9 @@ public class AppLogController extends BaseController{
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_APP_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
@@ -65,7 +70,7 @@ public class AppLogController extends BaseController{
|
||||
List<NtcAppLog> list = page.getList();
|
||||
for (NtcAppLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询App日志成功");
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.aspectj.util.FileUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcIpLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/log/ntc/other/bgpLogs")
|
||||
public class BgpLogController extends BaseController {
|
||||
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(@ModelAttribute("log") NtcIpLog log, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
try {
|
||||
PageLog<NtcIpLog> page = new PageLog<NtcIpLog>(request, response);
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_BGP_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
|
||||
|
||||
logger.info("查询结果:" + recv);
|
||||
if (StringUtils.isNotBlank(recv)) {
|
||||
Gson gson = new GsonBuilder().create();
|
||||
LogRecvData<NtcIpLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcIpLog>>(){}.getType());
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
page.setList(fromJson.getData().getList());
|
||||
List<NtcIpLog> list = page.getList();
|
||||
for (NtcIpLog l : list) {
|
||||
l.setFunctionId(log.getFunctionId());
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, e.getMessage());
|
||||
}
|
||||
|
||||
return "/log/ntc/bgpList";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,11 +24,13 @@ import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.google.protobuf.DescriptorProtos.FieldDescriptorProto.Type;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcDdosLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.sun.jna.platform.win32.OaIdl.DATE;
|
||||
@@ -58,6 +60,9 @@ public class DdosLogController extends BaseController{
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_DDOS_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
@@ -80,7 +85,7 @@ public class DdosLogController extends BaseController{
|
||||
List<NtcDdosLog> list = page.getList();
|
||||
for (NtcDdosLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询Ddos日志成功");
|
||||
|
||||
@@ -18,11 +18,13 @@ import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcDnsLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -42,6 +44,9 @@ public class DnsLogController extends BaseController {
|
||||
}
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_DNS_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
logger.info("查询结果:" + recv);
|
||||
@@ -55,7 +60,7 @@ public class DnsLogController extends BaseController {
|
||||
List<NtcDnsLog> list = page.getList();
|
||||
for (NtcDnsLog l : list) {
|
||||
l.setFunctionId(log.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
|
||||
@@ -18,12 +18,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcFtpLog;
|
||||
import com.nis.domain.log.NtcOpenVpnLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -52,6 +54,9 @@ public class FtpLogController extends BaseController{
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_FTP_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
@@ -67,7 +72,7 @@ public class FtpLogController extends BaseController{
|
||||
List<NtcFtpLog> list = page.getList();
|
||||
for (NtcFtpLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询Ftp日志成功");
|
||||
|
||||
@@ -17,11 +17,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcHttpLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -41,6 +43,9 @@ public class HttpLogController extends BaseController {
|
||||
}
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_HTTP_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
logger.info("查询结果:" + recv);
|
||||
@@ -54,7 +59,7 @@ public class HttpLogController extends BaseController {
|
||||
List<NtcHttpLog> list = page.getList();
|
||||
for (NtcHttpLog l : list) {
|
||||
l.setFunctionId(log.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
|
||||
@@ -21,12 +21,14 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcIpLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -43,6 +45,9 @@ public class IpLogController extends BaseController {
|
||||
params.put("pageNo", page.getPageNo());
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_IP_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
|
||||
@@ -56,7 +61,7 @@ public class IpLogController extends BaseController {
|
||||
List<NtcIpLog> list = page.getList();
|
||||
for (NtcIpLog l : list) {
|
||||
l.setFunctionId(log.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
@@ -77,6 +82,9 @@ public class IpLogController extends BaseController {
|
||||
params.put("pageNo", page.getPageNo());
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "http://10.0.6.121:8080/gwall/test/logTest";
|
||||
try {
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
@@ -90,7 +98,7 @@ public class IpLogController extends BaseController {
|
||||
List<NtcIpLog> list = page.getList();
|
||||
for (NtcIpLog l : list) {
|
||||
l.setFunctionId(log.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
|
||||
@@ -18,12 +18,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcIpsecLog;
|
||||
import com.nis.domain.log.NtcIpsecLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -52,6 +54,9 @@ public class IpsecLogController extends BaseController{
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_IPSEC_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
@@ -65,7 +70,7 @@ public class IpsecLogController extends BaseController{
|
||||
page.setList(list);
|
||||
for (NtcIpsecLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询Ipsec日志成功");
|
||||
|
||||
@@ -17,11 +17,13 @@ import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcL2tpLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -40,6 +42,9 @@ public class L2tpLogController extends BaseController {
|
||||
// 请求参数判断
|
||||
initLogSearchValue(ntcL2tpLog, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(ntcL2tpLog.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
try {
|
||||
// 请求接口
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_L2TP_LOG;
|
||||
@@ -52,7 +57,7 @@ public class L2tpLogController extends BaseController {
|
||||
List<NtcL2tpLog> list = fromPage.getList();
|
||||
for (NtcL2tpLog log : list) {
|
||||
log.setFunctionId(ntcL2tpLog.getFunctionId());
|
||||
setLogAction(log);
|
||||
setLogAction(log,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
|
||||
@@ -17,11 +17,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcMailLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -38,6 +40,9 @@ public class MailLogController extends BaseController {
|
||||
params.put("pageNo", page.getPageNo());
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_MAIL_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
|
||||
@@ -50,7 +55,7 @@ public class MailLogController extends BaseController {
|
||||
List<NtcMailLog> list = page.getList();
|
||||
for (NtcMailLog l : list) {
|
||||
l.setFunctionId(log.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
|
||||
@@ -17,11 +17,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.MmAvIpLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -51,6 +53,9 @@ public class MmAvIpLogController extends BaseController{
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_MMAVIP_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
@@ -65,7 +70,7 @@ public class MmAvIpLogController extends BaseController{
|
||||
List<MmAvIpLog> list = page.getList();
|
||||
for (MmAvIpLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询音视频IP日志成功");
|
||||
|
||||
@@ -17,11 +17,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.MmAvUrlLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -51,6 +53,9 @@ public class MmAvUrlLogController extends BaseController{
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_MMAVURL_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
@@ -65,7 +70,7 @@ public class MmAvUrlLogController extends BaseController{
|
||||
List<MmAvUrlLog> list = page.getList();
|
||||
for (MmAvUrlLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询音视频url日志成功");
|
||||
|
||||
@@ -15,11 +15,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.MmPicIpLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -38,6 +40,9 @@ public class MmPicIpLogController extends BaseController {
|
||||
// 请求参数判断
|
||||
initLogSearchValue(mmPicIpLog, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(mmPicIpLog.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
try {
|
||||
// 请求接口
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_MMPICIP_LOG;
|
||||
@@ -50,7 +55,7 @@ public class MmPicIpLogController extends BaseController {
|
||||
List<MmPicIpLog> list = fromPage.getList();
|
||||
for (MmPicIpLog log : list) {
|
||||
log.setFunctionId(mmPicIpLog.getFunctionId());
|
||||
setLogAction(log);
|
||||
setLogAction(log,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("音视频图片IP日志查询成功!");
|
||||
|
||||
@@ -15,11 +15,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.MmPicUrlLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -38,6 +40,9 @@ public class MmPicUrlController extends BaseController{
|
||||
// 请求参数判断
|
||||
initLogSearchValue(mmPicUrlLog, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(mmPicUrlLog.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
try {
|
||||
// 请求接口
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_MMPICURL_LOG;
|
||||
@@ -50,7 +55,7 @@ public class MmPicUrlController extends BaseController{
|
||||
List<MmPicUrlLog> list = fromPage.getList();
|
||||
for (MmPicUrlLog log : list) {
|
||||
log.setFunctionId(mmPicUrlLog.getFunctionId());
|
||||
setLogAction(log);
|
||||
setLogAction(log,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("音视频图片URL日志查询成功!");
|
||||
|
||||
@@ -15,11 +15,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.MmAvIpLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -38,6 +40,9 @@ public class MmPornAvSampleController extends BaseController {
|
||||
//查询值判断
|
||||
initLogSearchValue(entry, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL + Constants.NTC_MMPORNAUDIOSAMPLE_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url, params, request);
|
||||
@@ -52,7 +57,7 @@ public class MmPornAvSampleController extends BaseController {
|
||||
List<MmAvIpLog> list = page.getList();
|
||||
for (MmAvIpLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询音频色情样例日志成功");
|
||||
@@ -76,6 +81,9 @@ public class MmPornAvSampleController extends BaseController {
|
||||
//查询值判断
|
||||
initLogSearchValue(entry, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL + Constants.NTC_MMPORNVIDEOSAMPLE_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
@@ -90,7 +98,7 @@ public class MmPornAvSampleController extends BaseController {
|
||||
List<MmAvIpLog> list = page.getList();
|
||||
for (MmAvIpLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询视频色情样例日志成功");
|
||||
|
||||
@@ -15,11 +15,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.MmSampleAudioLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -38,6 +40,9 @@ public class MmSampleAudioController extends BaseController{
|
||||
// 请求参数判断
|
||||
initLogSearchValue(sampleAudioLog, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(sampleAudioLog.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
try {
|
||||
// 请求接口
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_MMSAMPLEAUDIO_LOG;
|
||||
@@ -50,7 +55,7 @@ public class MmSampleAudioController extends BaseController{
|
||||
List<MmSampleAudioLog> list = fromPage.getList();
|
||||
for (MmSampleAudioLog log : list) {
|
||||
log.setFunctionId(sampleAudioLog.getFunctionId());
|
||||
setLogAction(log);
|
||||
setLogAction(log,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("音频样例日志查询成功!");
|
||||
|
||||
@@ -15,11 +15,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.MmSamplePicLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -38,6 +40,9 @@ public class MmSamplePicController extends BaseController{
|
||||
// 请求参数判断
|
||||
initLogSearchValue(samplePicLog, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(samplePicLog.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
try {
|
||||
// 请求接口
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_MMSAMPLEPIC_LOG;
|
||||
@@ -50,7 +55,7 @@ public class MmSamplePicController extends BaseController{
|
||||
List<MmSamplePicLog> list = fromPage.getList();
|
||||
for (MmSamplePicLog log : list) {
|
||||
log.setFunctionId(samplePicLog.getFunctionId());
|
||||
setLogAction(log);
|
||||
setLogAction(log,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("图片样例日志查询成功!");
|
||||
|
||||
@@ -15,11 +15,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.MmSampleVideoLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -38,6 +40,9 @@ public class MmSampleVideoController extends BaseController{
|
||||
// 请求参数判断
|
||||
initLogSearchValue(sampleVideoLog, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(sampleVideoLog.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
try {
|
||||
// 请求接口
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_MMSAMPLEVIDEO_LOG;
|
||||
@@ -50,7 +55,7 @@ public class MmSampleVideoController extends BaseController{
|
||||
List<MmSampleVideoLog> list = fromPage.getList();
|
||||
for (MmSampleVideoLog log : list) {
|
||||
log.setFunctionId(sampleVideoLog.getFunctionId());
|
||||
setLogAction(log);
|
||||
setLogAction(log,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("视频样例日志查询成功!");
|
||||
|
||||
@@ -19,11 +19,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.MmVoipLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -42,6 +44,9 @@ public class MmSampleVoipLogController extends BaseController {
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL+Constants.NTC_MMSAMPLE_VOIP_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
//String path = request.getClass().getClassLoader().getResource("").getPath();
|
||||
@@ -57,7 +62,7 @@ public class MmSampleVoipLogController extends BaseController {
|
||||
List<MmVoipLog> list = page.getList();
|
||||
for (MmVoipLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询Voip样例日志成功");
|
||||
|
||||
@@ -17,11 +17,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.MmVoipLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -50,6 +52,9 @@ public class MmVoipAccountLogController extends BaseController{
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_MMVOIP_ACCOUNT_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
@@ -64,7 +69,7 @@ public class MmVoipAccountLogController extends BaseController{
|
||||
List<MmVoipLog> list = page.getList();
|
||||
for (MmVoipLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询mmVoipAccount日志成功");
|
||||
|
||||
@@ -17,11 +17,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.MmVoipLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -50,6 +52,9 @@ public class MmVoipIpLogController extends BaseController{
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_MMVOIP_IP_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
@@ -64,7 +69,7 @@ public class MmVoipIpLogController extends BaseController{
|
||||
List<MmVoipLog> list = page.getList();
|
||||
for (MmVoipLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询VoipIp日志成功");
|
||||
|
||||
@@ -17,11 +17,13 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.MmVoipLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -50,6 +52,9 @@ public class MmVoipLogController extends BaseController{
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_MMVOIP_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
@@ -64,7 +69,7 @@ public class MmVoipLogController extends BaseController{
|
||||
List<MmVoipLog> list = page.getList();
|
||||
for (MmVoipLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询Voip日志成功");
|
||||
|
||||
@@ -18,12 +18,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcOpenVpnLog;
|
||||
import com.nis.domain.log.NtcOpenVpnLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -52,6 +54,9 @@ public class OpenVpnLogController extends BaseController{
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_OPENVPN_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
@@ -66,7 +71,7 @@ public class OpenVpnLogController extends BaseController{
|
||||
List<NtcOpenVpnLog> list = page.getList();
|
||||
for (NtcOpenVpnLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询OpenVpn日志成功");
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcIpLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/log/ntc/p2pLogs")
|
||||
public class P2pLogController extends BaseController {
|
||||
|
||||
@RequestMapping(value = {"list", ""})
|
||||
public String list(@ModelAttribute("log") NtcIpLog log, Model model, HttpServletRequest request, HttpServletResponse response) {
|
||||
try {
|
||||
PageLog<NtcIpLog> page = new PageLog<NtcIpLog>(request, response);
|
||||
Map<String, Object> params = new HashMap<String, Object>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_P2P_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
logger.info("查询结果:" + recv);
|
||||
if (StringUtils.isNotBlank(recv)) {
|
||||
Gson gson = new GsonBuilder().create();
|
||||
LogRecvData<NtcIpLog> fromJson = gson.fromJson(recv, new TypeToken<LogRecvData<NtcIpLog>>(){}.getType());
|
||||
if (fromJson.getStatus().intValue() == 200) {
|
||||
page.setList(fromJson.getData().getList());
|
||||
List<NtcIpLog> list = page.getList();
|
||||
for (NtcIpLog l : list) {
|
||||
l.setFunctionId(log.getFunctionId());
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("查询失败", e);
|
||||
addMessageLog(model, e.getMessage());
|
||||
}
|
||||
|
||||
return "/log/ntc/p2pList";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,11 +17,13 @@ import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcPptpLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -40,6 +42,9 @@ public class PptpLogController extends BaseController {
|
||||
// 请求参数判断
|
||||
initLogSearchValue(ntcPptpLog, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(ntcPptpLog.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
try {
|
||||
// 请求接口
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_PPTP_LOG;
|
||||
@@ -52,7 +57,7 @@ public class PptpLogController extends BaseController {
|
||||
page.setList(list);
|
||||
for (NtcPptpLog log : list) {
|
||||
log.setFunctionId(ntcPptpLog.getFunctionId());
|
||||
setLogAction(log);
|
||||
setLogAction(log,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
|
||||
@@ -18,12 +18,14 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcSshLog;
|
||||
import com.nis.domain.log.NtcSshLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -52,6 +54,9 @@ public class SshLogController extends BaseController{
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_SSH_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params,request);
|
||||
@@ -66,7 +71,7 @@ public class SshLogController extends BaseController{
|
||||
List<NtcSshLog> list = page.getList();
|
||||
for (NtcSshLog l : list) {
|
||||
l.setFunctionId(entry.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
logger.info("查询Ssh日志成功");
|
||||
|
||||
@@ -17,11 +17,13 @@ import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonSyntaxException;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.NtcSslLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
@@ -43,6 +45,10 @@ public class SslLogController extends BaseController {
|
||||
if(StringUtils.isNotBlank(ntcSslLog.getSni())) {
|
||||
params.put("SearchSni", ntcSslLog.getSni());
|
||||
}
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(ntcSslLog.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
try {
|
||||
// 请求接口
|
||||
String url = Constants.LOG_BASE_URL + Constants.NTC_SSL_LOG;
|
||||
@@ -55,7 +61,7 @@ public class SslLogController extends BaseController {
|
||||
page.setList(list);
|
||||
for (NtcSslLog log : list) {
|
||||
log.setFunctionId(ntcSslLog.getFunctionId());
|
||||
setLogAction(log);
|
||||
setLogAction(log,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
|
||||
@@ -17,10 +17,12 @@ import org.springframework.web.servlet.support.RequestContext;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.PageLog;
|
||||
import com.nis.domain.log.PxyHttpLog;
|
||||
import com.nis.domain.maat.LogRecvData;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.httpclient.HttpClientUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
@@ -41,6 +43,9 @@ public class PxyHttpLogController extends BaseController {
|
||||
|
||||
initLogSearchValue(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
String url = Constants.LOG_BASE_URL + Constants.PXY_HTTP_LOG;
|
||||
String recv = HttpClientUtil.getMsg(url, params, request);
|
||||
logger.info("查询结果:" + recv);
|
||||
@@ -53,7 +58,7 @@ public class PxyHttpLogController extends BaseController {
|
||||
List<PxyHttpLog> list = page.getList();
|
||||
for (PxyHttpLog l : list) {
|
||||
l.setFunctionId(log.getFunctionId());
|
||||
setLogAction(l);
|
||||
setLogAction(l,serviceList);
|
||||
}
|
||||
model.addAttribute("page", page);
|
||||
}
|
||||
|
||||
@@ -11,10 +11,23 @@
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_maat" property="isMaat" jdbcType="INTEGER" />
|
||||
<result column="region_type" property="regionType" jdbcType="INTEGER" />
|
||||
<result column="config_multi_keywords" property="configMultiKeywords" jdbcType="VARCHAR" />
|
||||
<result column="config_hex" property="configHex" jdbcType="VARCHAR" />
|
||||
<result column="config_expr_type" property="configExprType" jdbcType="VARCHAR" />
|
||||
<result column="config_match_method" property="configMatchMethod" jdbcType="VARCHAR" />
|
||||
<result column="config_service_type" property="configServiceType" jdbcType="VARCHAR" />
|
||||
<result column="config_ip_port_show" property="configIpPortShow" jdbcType="VARCHAR" />
|
||||
<result column="config_ip_type" property="configIpType" jdbcType="VARCHAR" />
|
||||
<result column="config_ip_pattern" property="configIpPattern" jdbcType="VARCHAR" />
|
||||
<result column="config_port_pattern" property="configPortPattern" jdbcType="VARCHAR" />
|
||||
<result column="config_direction" property="configDirection" jdbcType="VARCHAR" />
|
||||
<result column="config_protocol" property="configProtocol" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List" >
|
||||
dict_id, function_id, config_region_value,config_region_code, config_district, config_desc, is_valid,is_maat,region_type
|
||||
,config_multi_keywords,config_hex,config_expr_type,config_match_method,config_service_type,config_ip_port_show,config_ip_type,
|
||||
config_ip_pattern,config_port_pattern,config_direction,config_protocol
|
||||
</sql>
|
||||
<select id="getList" resultMap="BaseResultMap" >
|
||||
select
|
||||
|
||||
@@ -11,10 +11,11 @@
|
||||
<result column="service_name" property="serviceName" jdbcType="VARCHAR" />
|
||||
<result column="service_desc" property="serviceDesc" jdbcType="VARCHAR" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="region_code" property="regionCode" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List" >
|
||||
dict_id, function_id, protocol_id, action,action_code, service_id, service_name,service_desc,is_valid
|
||||
dict_id, function_id, protocol_id, action,action_code, service_id, service_name,service_desc,is_valid,region_code
|
||||
</sql>
|
||||
<select id="getList" resultMap="BaseResultMap" >
|
||||
select
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.nis.domain.configuration.AppIdCfg.AppFeaturesIndex;
|
||||
import com.nis.domain.configuration.AppInnerRuleCfg;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.AppStringCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
@@ -64,7 +65,13 @@ public interface AppCfgDao {
|
||||
public List<AppInnerRuleCfg> findAppInnerRuleList(AppInnerRuleCfg entity) ;
|
||||
public AppInnerRuleCfg getAppInnerRuleCfg(Long cfgId) ;
|
||||
public int insertAppInnerRuleCfg(AppInnerRuleCfg entity);
|
||||
public int updateAppInnerRuleCfg(AppInnerRuleCfg entity);
|
||||
public int updateAppInnerRuleCfg(AppInnerRuleCfg entity);
|
||||
//app ssl证书特征增删改查
|
||||
public List<AppSslCertCfg> findAppSslList(AppSslCertCfg entity);
|
||||
public AppSslCertCfg getAppSslCfg(Long cfgId);
|
||||
public int insertAppSslCfg(AppSslCertCfg entity);
|
||||
public int updateAppSslCfg(AppSslCertCfg entity);
|
||||
|
||||
//审核配置
|
||||
public void auditCfg(BaseCfg entity);
|
||||
//修改配置状态
|
||||
|
||||
@@ -228,6 +228,37 @@
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="AppSslCfgMap" type="com.nis.domain.configuration.AppSslCertCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="spec_service_id" property="specServiceId" jdbcType="INTEGER" />
|
||||
<result column="app_code" property="appCode" jdbcType="INTEGER" />
|
||||
<result column="behav_code" property="behavCode" jdbcType="INTEGER" />
|
||||
<result column="district" property="district" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type" property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="ratelimit" property="ratelimit" jdbcType="INTEGER" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="AppPolicyCfg_Column" >
|
||||
r.CFG_ID, r.APP_CODE,r.BEHAV_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT,
|
||||
@@ -298,6 +329,13 @@
|
||||
a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable
|
||||
,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
<sql id="AppSslCfg_Column" >
|
||||
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,
|
||||
r.DISTRICT,r.CFG_KEYWORDS,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN
|
||||
</sql>
|
||||
<!-- <sql id="AppCfg_Column_List_with_id_alias" >
|
||||
<choose>
|
||||
<when test="page !=null and page.alias != null and page.alias != ''">
|
||||
@@ -367,7 +405,13 @@
|
||||
FROM app_inner_rule_cfg r
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<select id="getAppSslCfg" resultMap="AppSslCfgMap" parameterType="java.lang.Long" >
|
||||
SELECT
|
||||
<include refid="AppSslCfg_Column" />
|
||||
FROM app_ssl_cert_cfg r
|
||||
WHERE CFG_ID = #{cfgId,jdbcType=BIGINT}
|
||||
</select>
|
||||
|
||||
<select id="findAppPolicyList" resultMap="AppPolicyCfgMap">
|
||||
select
|
||||
<include refid="AppPolicyCfg_Column"/>
|
||||
@@ -1002,7 +1046,108 @@
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="findAppSslList" resultMap="AppSslCfgMap">
|
||||
select
|
||||
<include refid="AppSslCfg_Column"/>
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
from app_ssl_cert_cfg r
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
left join sys_user u on r.auditor_id=u.id
|
||||
left join request_info ri on r.request_id=ri.id
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
|
||||
<if test="functionId != null">
|
||||
AND r.function_id=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="specServiceId != null">
|
||||
AND r.spec_service_id=#{specServiceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
AND r.CFG_TYPE like concat(concat('%',#{cfgType,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="cfgKeywords != null and cfgKeywords != ''">
|
||||
AND r.CFG_KEYWORDS like concat(concat('%',#{cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="district != null and district != ''">
|
||||
AND r.DISTRICT =#{district,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND r.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null and creatorName != ''">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''">
|
||||
AND r.CREATE_TIME=#{createTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="editorName != null and editorName != ''">
|
||||
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''">
|
||||
AND r.EDIT_TIME=#{editTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="auditorName != null and auditorName != ''">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''">
|
||||
AND r.AUDIT_TIME=#{auditTime,jdbcType=TIMESTAMP}
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify != ''">
|
||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''">
|
||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable != ''">
|
||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<insert id="insertAppPolicyCfg" parameterType="com.nis.domain.configuration.AppPolicyCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
@@ -1103,6 +1248,22 @@
|
||||
#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertAppSslCfg" parameterType="com.nis.domain.configuration.AppSslCertCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into app_ssl_cert_cfg (
|
||||
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,
|
||||
DISTRICT,CFG_KEYWORDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN
|
||||
)values (
|
||||
<include refid="AppCommonCfg_Value_List" />,
|
||||
#{district,jdbcType=VARCHAR},#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- insert ip_port_cfg表信息 -->
|
||||
<insert id="insertAppPolicyIpCfg" parameterType="com.nis.domain.configuration.IpPortCfg" >
|
||||
@@ -1687,6 +1848,105 @@
|
||||
and function_id=#{functionId,jdbcType=INTEGER}
|
||||
</trim>
|
||||
</update>
|
||||
<update id="updateAppSslCfg" parameterType="com.nis.domain.configuration.AppSslCertCfg" >
|
||||
update app_ssl_cert_cfg
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="appCode != null">
|
||||
APP_CODE = #{appCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="behavCode != null">
|
||||
BEHAV_CODE = #{behavCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="specServiceId != null">
|
||||
SPEC_SERVICE_ID = #{specServiceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="creatorId != null" >
|
||||
creator_id = #{creatorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''" >
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
compile_id = #{compileId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="ratelimit != null">
|
||||
RATELIMIT=#{ratelimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null">
|
||||
CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
CFG_TYPE =#{cfgType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="district != null and district != ''">
|
||||
district=#{district,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgKeywords != null and cfgKeywords != ''">
|
||||
cfg_keywords=#{cfgKeywords,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="exprType != null">
|
||||
expr_type=#{exprType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
match_method=#{matchMethod,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
is_hexbin=#{isHexbin,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
<update id="auditCfg" parameterType="com.nis.domain.configuration.BaseCfg">
|
||||
update ${tableName} set is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
|
||||
@@ -9,23 +9,32 @@ import com.nis.domain.configuration.AvVoipIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
|
||||
@MyBatisDao
|
||||
public interface AvContentCfgDao {
|
||||
public List<CfgIndexInfo> findVoipList(CfgIndexInfo entity) ;
|
||||
public List<CfgIndexInfo> findAccountList(CfgIndexInfo entity) ;
|
||||
public List<AvVoipIpCfg> findVoipIpCfgList(CfgIndexInfo entity);
|
||||
public List<AvVoipAccountCfg> findVoipAccountCfgList(CfgIndexInfo entity);
|
||||
public List<NtcSubscribeIdCfg> findSubscribeIdCfgList(CfgIndexInfo entity);
|
||||
public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity);
|
||||
|
||||
public void insertCfgIndexInfo(CfgIndexInfo entity);
|
||||
public void insertAvVoipIp(CfgIndexInfo entity);
|
||||
public void insertAvVoipAccount(CfgIndexInfo entity);
|
||||
public void insertAvVoipAccountCfg(CfgIndexInfo entity);
|
||||
public void insertAvVoipKeywordCfg(CfgIndexInfo entity);
|
||||
|
||||
public void updateCfgIndexInfo(CfgIndexInfo entity);
|
||||
public void updateAvVoipIp(CfgIndexInfo entity);
|
||||
public void updateAvVoipAccount(CfgIndexInfo entity);
|
||||
public void updateAvVoipKeywordCfgt(CfgIndexInfo entity);
|
||||
|
||||
public void deleteAvVoipIp(CfgIndexInfo entity);
|
||||
public void deleteAvVoipAccount(CfgIndexInfo entity);
|
||||
public void deleteAvVoipKeywordCfg(CfgIndexInfo entity);
|
||||
public void deleteAvVoipAccountCfg(CfgIndexInfo entity);
|
||||
|
||||
public BaseIpCfg findIpCfgById(BaseIpCfg entity) ;
|
||||
public void insertIp(BaseIpCfg entity);
|
||||
@@ -38,4 +47,5 @@ public interface AvContentCfgDao {
|
||||
public void updateString(BaseStringCfg entity);
|
||||
public List<BaseStringCfg> findStringList(BaseStringCfg entity) ;
|
||||
public List<BaseStringCfg> getStringList(BaseStringCfg entity) ;
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="AvVoipIpCfgMap" type="com.nis.domain.configuration.AvVoipIpCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
@@ -157,7 +158,7 @@
|
||||
r.CFG_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.function_id
|
||||
r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.function_id,r.do_log
|
||||
</sql>
|
||||
<sql id="AvVoipIp_Column" >
|
||||
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.ip_pattern,r.port_pattern,r.src_port
|
||||
@@ -187,7 +188,7 @@
|
||||
r.audit_time,r.service_id,r.request_id,r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable,
|
||||
r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,r.cfg_region_code
|
||||
</sql>
|
||||
<!-- voip条件查询列表信息 -->
|
||||
<!-- voip IP条件查询列表信息 -->
|
||||
<select id="findVoipList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
SELECT
|
||||
<include refid="AvVoip_Column" />
|
||||
@@ -289,6 +290,121 @@
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="(ntcSubscribeIdCfg.cfgKeywords != null and ntcSubscribeIdCfg.cfgKeywords != '') ">
|
||||
AND r.compile_id in (select f.compile_id from ntc_subscribe_id_cfg f
|
||||
<where>
|
||||
<if test="ntcSubscribeIdCfg.cfgKeywords != null and ntcSubscribeIdCfg.cfgKeywords != ''">
|
||||
and f.cfg_keywords like concat(concat('%',#{ntcSubscribeIdCfg.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
and f.compile_id =#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY r.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<!-- voip Account条件查询列表信息 -->
|
||||
<select id="findAccountList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
SELECT
|
||||
<include refid="AvVoip_Column" />
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
FROM cfg_index_info r
|
||||
left join sys_user s on r.creator_id=s.id
|
||||
left join sys_user e on r.editor_id=e.id
|
||||
left join sys_user u on r.auditor_id=u.id
|
||||
left join request_info ri on r.request_id=ri.id
|
||||
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND r.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND r.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null and creatorName != ''">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<!-- <if test="search_create_time_start != null and search_create_time_start != ''">
|
||||
<![CDATA[AND r.CREATE_TIME >= #{search_create_time_start,jdbcType=TIMESTAMP}]]>
|
||||
</if>
|
||||
<if test="search_create_time_end != null and search_create_time_end != ''">
|
||||
<![CDATA[AND r.CREATE_TIME <= #{search_create_time_end,jdbcType=TIMESTAMP}]]>
|
||||
</if> -->
|
||||
<if test="editorName != null and editorName != ''">
|
||||
AND r.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<!-- <if test="search_edit_time_start != null and search_edit_time_start != ''">
|
||||
<![CDATA[AND r.EDIT_TIME >= #{search_edit_time_start,jdbcType=TIMESTAMP}]]>
|
||||
</if>
|
||||
<if test="search_edit_time_end != null and search_edit_time_end != ''">
|
||||
<![CDATA[AND r.EDIT_TIME <= #{search_edit_time_end,jdbcType=TIMESTAMP}]]>
|
||||
</if> -->
|
||||
<if test="auditorName != null and auditorName != ''">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<!-- <if test="search_audit_time_start != null and search_audit_time_start != ''">
|
||||
<![CDATA[AND r.AUDIT_TIME >= #{search_audit_time_start,jdbcType=TIMESTAMP}]]>
|
||||
</if>
|
||||
<if test="search_audit_time_end != null and search_audit_time_end != ''">
|
||||
<![CDATA[AND r.AUDIT_TIME <= #{search_audit_time_end,jdbcType=TIMESTAMP}]]>
|
||||
</if> -->
|
||||
<if test="serviceId != null">
|
||||
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify != ''">
|
||||
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''">
|
||||
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable != ''">
|
||||
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
||||
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND r.function_id=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="(voipAccount.cfgKeywords != null and voipAccount.cfgKeywords != '') ">
|
||||
AND r.compile_id in (select f.compile_id from av_voip_account_cfg f
|
||||
<where>
|
||||
@@ -301,6 +417,18 @@
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="(ntcSubscribeIdCfg.cfgKeywords != null and ntcSubscribeIdCfg.cfgKeywords != '') ">
|
||||
AND r.compile_id in (select f.compile_id from ntc_subscribe_id_cfg f
|
||||
<where>
|
||||
<if test="ntcSubscribeIdCfg.cfgKeywords != null and ntcSubscribeIdCfg.cfgKeywords != ''">
|
||||
and f.cfg_keywords like concat(concat('%',#{ntcSubscribeIdCfg.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
and f.compile_id =#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
@@ -352,6 +480,26 @@
|
||||
</choose>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<!-- 根据compileId获取avVoipAccountCfg信息 -->
|
||||
<select id="findSubscribeIdCfgList" resultMap="BaseStringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
select
|
||||
<include refid="BaseStringCfg_Column" />
|
||||
from ntc_subscribe_id_cfg r
|
||||
<where>
|
||||
<if test="compileId != null">
|
||||
and r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="isValid != null">
|
||||
and r.is_valid=#{isValid,jdbcType=INTEGER}
|
||||
</when>
|
||||
<otherwise>
|
||||
and r.is_valid != -1
|
||||
</otherwise>
|
||||
</choose>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<!-- 根据Id获取cfgIndexInfo信息 -->
|
||||
<select id="getCfgIndexInfo" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
@@ -398,7 +546,8 @@
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id
|
||||
function_id,
|
||||
do_log
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -418,7 +567,8 @@
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER}
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{doLog,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert AV_VOIP_IP_CFG表信息 -->
|
||||
@@ -490,7 +640,7 @@
|
||||
)
|
||||
</insert>
|
||||
<!-- insert AV_VOIP_ACCOUNT_CFG表信息 -->
|
||||
<insert id="insertAvVoipAccount" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
<insert id="insertAvVoipAccountCfg" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
insert into av_voip_account_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
@@ -545,6 +695,62 @@
|
||||
#{voipAccount.isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert AV_VOIP_ACCOUNT_CFG表信息 -->
|
||||
<insert id="insertAvVoipKeywordCfg" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
insert into ntc_subscribe_id_cfg (
|
||||
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,
|
||||
function_id,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{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},
|
||||
#{ntcSubscribeIdCfg.cfgKeywords,jdbcType=VARCHAR},
|
||||
#{ntcSubscribeIdCfg.cfgType,jdbcType=VARCHAR},
|
||||
#{ntcSubscribeIdCfg.cfgRegionCode,jdbcType=INTEGER},
|
||||
#{ntcSubscribeIdCfg.exprType,jdbcType=INTEGER},
|
||||
#{ntcSubscribeIdCfg.matchMethod,jdbcType=INTEGER},
|
||||
#{ntcSubscribeIdCfg.isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- update cfg_index_info表信息 -->
|
||||
<update id="updateCfgIndexInfo" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
update cfg_index_info
|
||||
@@ -601,6 +807,9 @@
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="doLog != null" >
|
||||
do_log = #{doLog,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
@@ -721,6 +930,94 @@
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<!-- update ntc_subscribe_id_cfg表信息 -->
|
||||
<update id="updateAvVoipKeywordCfgt" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
update ntc_subscribe_id_cfg
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
COMPILE_ID = #{compileId,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.cfgKeywords != null and ntcSubscribeIdCfg.cfgKeywords != ''" >
|
||||
cfg_keywords = #{ntcSubscribeIdCfg.cfgKeywords,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.cfgType != null and ntcSubscribeIdCfg.cfgType != ''" >
|
||||
cfg_type = #{ntcSubscribeIdCfg.cfgType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.cfgRegionCode != null " >
|
||||
cfg_region_code = #{ntcSubscribeIdCfg.cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.exprType != null " >
|
||||
expr_type = #{ntcSubscribeIdCfg.exprType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.matchMethod != null " >
|
||||
match_method = #{ntcSubscribeIdCfg.matchMethod,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.isHexbin != null " >
|
||||
is_hexbin = #{ntcSubscribeIdCfg.isHexbin,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
<if test="voipAccount != null and voipAccount.cfgId != null" >
|
||||
and cfg_id = #{ntcSubscribeIdCfg.cfgId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
and compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
and function_id = #{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<!-- update av_voip_account_cfg表信息 -->
|
||||
<update id="updateAvVoipAccount" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
update av_voip_account_cfg
|
||||
@@ -824,8 +1121,23 @@
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
<!-- 删除voip subscribe信息 -->
|
||||
<delete id="deleteAvVoipKeywordCfg" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
delete from ntc_subscribe_id_cfg
|
||||
<where>
|
||||
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.cfgId != null" >
|
||||
and cfg_id = #{ntcSubscribeIdCfg.cfgId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null" >
|
||||
and compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
and function_id = #{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
<!-- 删除voipIp信息 -->
|
||||
<delete id="deleteAvVoipAccount" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
<delete id="deleteAvVoipAccountCfg" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
delete from av_voip_account_cfg
|
||||
<where>
|
||||
<if test="voipAccount != null and voipAccount.cfgId != null" >
|
||||
|
||||
@@ -8,6 +8,9 @@ import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.FileDigestCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.P2pHashCfg;
|
||||
import com.nis.domain.configuration.P2pKeywordCfg;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@@ -35,4 +38,19 @@ public interface FileTransferCfgDao extends CrudDao<CfgIndexInfo> {
|
||||
public void auditCfg(BaseCfg entity);
|
||||
public FileDigestCfg getFileDigest(Long id);
|
||||
public void updateFileDigestCfg(FileDigestCfg entity);
|
||||
|
||||
// P2P域配置新增
|
||||
public void saveP2pHashCfg(BaseStringCfg cfg);
|
||||
public void saveP2pKeywordCfg(BaseStringCfg cfg);
|
||||
public void saveP2pSubscribeIdCfg(NtcSubscribeIdCfg cfg);
|
||||
// 获取P2P域配置信息
|
||||
public List<CfgIndexInfo> getP2pList(CfgIndexInfo entity);
|
||||
public List<P2pHashCfg> getP2pHashList(CfgIndexInfo entity);
|
||||
public List<P2pKeywordCfg> getP2pKeywordList(CfgIndexInfo entity);
|
||||
public List<NtcSubscribeIdCfg> getP2pSubscribeidList(CfgIndexInfo entity);
|
||||
// P2P修改配置操作时,先删除旧域配置信息
|
||||
public void deleteP2pIpCfg(CfgIndexInfo entity);
|
||||
public void deleteP2pHashCfg(CfgIndexInfo entity);
|
||||
public void deleteP2pKeywordCfg(CfgIndexInfo entity);
|
||||
public void deleteP2pSubscribeIdCfg(CfgIndexInfo entity);
|
||||
}
|
||||
|
||||
@@ -57,6 +57,11 @@
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
|
||||
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
|
||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="complexCfgMap" type="com.nis.domain.configuration.ComplexkeywordCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
@@ -144,6 +149,11 @@
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
|
||||
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
|
||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="ConfigIndex_Column" >
|
||||
a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
|
||||
@@ -157,13 +167,15 @@
|
||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||
a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable
|
||||
,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
,a.area_effective_ids,a.function_id,a.cfg_region_code,
|
||||
a.user_region1,a.user_region2,a.user_region3,a.user_region4,a.user_region5
|
||||
</sql>
|
||||
<sql id="StrCfg_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.cfg_keywords,a.cfg_type,
|
||||
a.action,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id,a.edit_time, a.auditor_id,
|
||||
a.audit_time,a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code,
|
||||
a.user_region1,a.user_region2,a.user_region3,a.user_region4,a.user_region5
|
||||
</sql>
|
||||
<sql id="ComplexCfg_Column" >
|
||||
a.cfg_id,a.cfg_desc,a.cfg_keywords,a.cfg_type,a.district,
|
||||
@@ -393,7 +405,12 @@
|
||||
dest_port,
|
||||
dest_ip_address,
|
||||
cfg_type,
|
||||
cfg_region_code
|
||||
cfg_region_code,
|
||||
user_region1,
|
||||
user_region2,
|
||||
user_region3,
|
||||
user_region4,
|
||||
user_region5
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
@@ -425,7 +442,12 @@
|
||||
#{destPort,jdbcType=VARCHAR},
|
||||
#{destIpAddress,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{userRegion1,jdbcType=VARCHAR},
|
||||
#{userRegion2,jdbcType=VARCHAR},
|
||||
#{userRegion3,jdbcType=VARCHAR},
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<update id="updateCfgIndex" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
@@ -575,6 +597,357 @@
|
||||
#{isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<select id="getP2pList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
SELECT
|
||||
<include refid="ConfigIndex_Column" />
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
</trim>
|
||||
FROM cfg_index_info a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
left join request_info ri on a.request_id=ri.id
|
||||
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
</if>
|
||||
<if test="cfgId != null">
|
||||
AND a.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
AND a.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
AND a.ACTION=#{action,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
AND a.IS_VALID=#{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isValid == null">
|
||||
AND a.IS_VALID != -1
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
AND a.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="creatorName != null and creatorName != ''">
|
||||
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="editorName != null and editorName != ''">
|
||||
AND EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="auditorName != null and auditorName != ''">
|
||||
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND a.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
AND a.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="classify != null and classify != ''">
|
||||
AND a.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''">
|
||||
AND a.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="lable != null and lable != ''">
|
||||
AND a.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
||||
AND a.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND a.function_id=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="ipPort!=null">
|
||||
AND a.compile_id in (select t.compile_id from ip_port_cfg t
|
||||
<where>
|
||||
and t.protocol_id=4
|
||||
<if test="ipPort.srcIpAddress != null and ipPort.srcIpAddress != ''">
|
||||
and t.src_ip_address =#{(ipPort.srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="ipPort.srcPort != null and ipPort.srcPort != ''">
|
||||
and t.src_port =#{ipPort.srcPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="ipPort.destIpAddress != null and ipPort.destIpAddress != ''">
|
||||
and t.dest_ip_address =#{(ipPort.destIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="ipPort.destPort != null and ipPort.destPort != ''">
|
||||
and t.dest_port =#{ipPort.destPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="p2pHash!=null">
|
||||
AND a.compile_id in (select f.compile_id from p2p_hash_cfg h
|
||||
<where>
|
||||
<if test="p2pHash.cfgKeywords != null and p2pHash.cfgKeywords != ''">
|
||||
and h.cfg_keywords like concat(concat('%',#{p2pHash.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="p2pKeyword!=null">
|
||||
AND a.compile_id in (select f.compile_id from p2p_keyword_cfg k
|
||||
<where>
|
||||
<if test="p2pKeyword.cfgKeywords != null and p2pKeyword.cfgKeywords != ''">
|
||||
and k.cfg_keywords like concat(concat('%',#{p2pKeyword.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<if test="ntcSubscribeIdCfg!=null">
|
||||
AND a.compile_id in (select f.compile_id from ntc_subscribe_id_cfg s
|
||||
<where>
|
||||
<if test="ntcSubscribeIdCfg.cfgKeywords != null and ntcSubscribeIdCfg.cfgKeywords != ''">
|
||||
and s.cfg_keywords like concat(concat('%',#{ntcSubscribeIdCfg.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
)
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${sqlMap.dsf}
|
||||
</trim>
|
||||
<choose>
|
||||
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
||||
ORDER BY ${page.orderBy}
|
||||
</when>
|
||||
<otherwise>
|
||||
ORDER BY a.CFG_ID desc
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<select id="getP2pHashList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM p2p_hash_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
and a.cfg_type =#{cfgType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getP2pKeywordList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM p2p_keyword_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
and a.cfg_type =#{cfgType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getP2pSubscribeidList" resultMap="stringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
||||
SELECT
|
||||
<include refid="StrCfg_Column" />
|
||||
FROM ntc_subscribe_id_cfg a where compile_id=#{compileId} and function_id=#{functionId}
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
and a.cfg_type =#{cfgType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- insert p2p_hash_cfg表信息 -->
|
||||
<insert id="saveP2pHashCfg" parameterType="com.nis.domain.configuration.P2pHashCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into p2p_hash_cfg (
|
||||
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,
|
||||
function_id,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin,
|
||||
user_region1,
|
||||
user_region2,
|
||||
user_region3,
|
||||
user_region4,
|
||||
user_region5
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{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},
|
||||
#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER},
|
||||
#{userRegion1,jdbcType=VARCHAR},
|
||||
#{userRegion2,jdbcType=VARCHAR},
|
||||
#{userRegion3,jdbcType=VARCHAR},
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- insert p2p_keyword_cfg表信息 -->
|
||||
<insert id="saveP2pKeywordCfg" parameterType="com.nis.domain.configuration.P2pKeywordCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into p2p_keyword_cfg (
|
||||
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,
|
||||
function_id,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{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},
|
||||
#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- insert p2p ntc_subscribe_id_cfg表信息 -->
|
||||
<insert id="saveP2pSubscribeIdCfg" parameterType="com.nis.domain.configuration.P2pKeywordCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into ntc_subscribe_id_cfg (
|
||||
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,
|
||||
function_id,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{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},
|
||||
#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- 文件摘要配置 -->
|
||||
<insert id="saveFileDigestCfg" parameterType="com.nis.domain.configuration.FileDigestCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
@@ -647,6 +1020,22 @@
|
||||
delete from file_digest_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
|
||||
<!-- 删除p2p ip子配置 -->
|
||||
<delete id="deleteP2pIpCfg" >
|
||||
delete from ip_port_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
<!-- 删除p2pHash配置 -->
|
||||
<delete id="deleteP2pHashCfg">
|
||||
delete from p2p_hash_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
<!-- 删除p2p关键字配置 -->
|
||||
<delete id="deleteP2pKeywordCfg">
|
||||
delete from p2p_keyword_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
<!-- 删除p2pSubscribeId配置 -->
|
||||
<delete id="deleteP2pSubscribeIdCfg">
|
||||
delete from ntc_subscribe_id_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
|
||||
|
||||
<!-- File Digest Cfg -->
|
||||
|
||||
@@ -7,6 +7,10 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import javax.management.RuntimeErrorException;
|
||||
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
import org.slf4j.Logger;
|
||||
@@ -388,7 +392,7 @@ public abstract class BaseService {
|
||||
* @return
|
||||
*/
|
||||
public static IpCfg ipConvert(IpCfg dstIp,BaseIpCfg srcIp){
|
||||
if(srcIp.getSrcIpAddress()!=null){
|
||||
if(srcIp.getSrcIpAddress()!=null){
|
||||
if(srcIp.getSrcIpAddress().indexOf("/")!=-1){
|
||||
if(srcIp.getIpType()==4 || srcIp.getIpType()==46){//46表示源ip为ipv4,目的ip为ipv6
|
||||
Integer srcMaskNum = Integer.parseInt(srcIp.getSrcIpAddress().split("/")[1]);
|
||||
@@ -403,6 +407,26 @@ public abstract class BaseService {
|
||||
IPv6Network strangeNetwork = IPv6Network.fromString(srcIp.getSrcIpAddress());
|
||||
dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]);
|
||||
dstIp.setSrcIpMask(strangeNetwork.getNetmask().asAddress().toString());
|
||||
}else {
|
||||
Pattern patternV4Subnet=Pattern.compile(Constants.IPV4_IP_SUBNET_REGEXP);
|
||||
Pattern patternV6Subnet=Pattern.compile(Constants.IPV6_IP_SUBNET_REGEXP);
|
||||
Matcher matchernV4Subnet=patternV4Subnet.matcher(srcIp.getSrcIpAddress());
|
||||
Matcher matcherV6Subnet=patternV6Subnet.matcher(srcIp.getSrcIpAddress());
|
||||
if(matchernV4Subnet.matches()) {
|
||||
Integer srcMaskNum = Integer.parseInt(srcIp.getSrcIpAddress().split("/")[1]);
|
||||
if(srcMaskNum==0){
|
||||
dstIp.setSrcIpMask("0.0.0.0");
|
||||
}else{
|
||||
dstIp.setSrcIpMask(IpUtil.convertMask(srcMaskNum));
|
||||
}
|
||||
dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]);
|
||||
}else if(matcherV6Subnet.matches()){
|
||||
IPv6Network strangeNetwork = IPv6Network.fromString(srcIp.getSrcIpAddress());
|
||||
dstIp.setSrcIp(srcIp.getSrcIpAddress().split("/")[0]);
|
||||
dstIp.setSrcIpMask(strangeNetwork.getNetmask().asAddress().toString());
|
||||
}else {
|
||||
throw new RuntimeException("Invalid IP/subnet mask format");
|
||||
}
|
||||
}
|
||||
|
||||
}else if(srcIp.getSrcIpAddress().indexOf("-")!=-1){
|
||||
@@ -415,6 +439,23 @@ public abstract class BaseService {
|
||||
IPv6Network network = IPv6Network.fromTwoAddresses(address1,address2);
|
||||
dstIp.setSrcIp(address1.toString());
|
||||
dstIp.setSrcIpMask(network.getNetmask().asAddress().toString());
|
||||
}else {
|
||||
Pattern patternV4Range=Pattern.compile(Constants.IPV4_IP_RANGE_REGEXP);
|
||||
Pattern patternV6Range=Pattern.compile(Constants.IPV6_IP_RANGE_REGEXP);
|
||||
Matcher matcherV4Range=patternV4Range.matcher(srcIp.getSrcIpAddress());
|
||||
Matcher matcherV6Range=patternV6Range.matcher(srcIp.getSrcIpAddress());
|
||||
if(matcherV4Range.matches()) {
|
||||
dstIp.setSrcIp(srcIp.getSrcIpAddress().split("-")[0]);
|
||||
dstIp.setSrcIpMask(IpUtil.getMask(srcIp.getSrcIpAddress().split("-")[0], srcIp.getSrcIpAddress().split("-")[1]));
|
||||
}else if(matcherV6Range.matches()) {
|
||||
IPv6Address address1 = IPv6Address.fromString(srcIp.getSrcIpAddress().split("-")[0]);
|
||||
IPv6Address address2 = IPv6Address.fromString(srcIp.getSrcIpAddress().split("-")[1]);
|
||||
IPv6Network network = IPv6Network.fromTwoAddresses(address1,address2);
|
||||
dstIp.setSrcIp(address1.toString());
|
||||
dstIp.setSrcIpMask(network.getNetmask().asAddress().toString());
|
||||
}else {
|
||||
throw new RuntimeException("Invalid IP range format");
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
@@ -424,6 +465,20 @@ public abstract class BaseService {
|
||||
}else if(srcIp.getIpType()==6|| srcIp.getIpType()==64){//64表示源ip为ipv6,目的ip为ipv4
|
||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
||||
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||
}else {//all
|
||||
Pattern patternV4=Pattern.compile(Constants.IPV4_IP_REGEXP);
|
||||
Pattern patternV6=Pattern.compile(Constants.IPV6_IP_REGEXP);
|
||||
Matcher matcherV4=patternV4.matcher(srcIp.getSrcIpAddress());
|
||||
Matcher matcherV6=patternV6.matcher(srcIp.getSrcIpAddress());
|
||||
if(matcherV4.matches()) {
|
||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
||||
dstIp.setSrcIpMask("255.255.255.255");
|
||||
}else if(matcherV6.matches()) {
|
||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
||||
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||
}else {
|
||||
throw new RuntimeException("Invalid IP format");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -434,6 +489,9 @@ public abstract class BaseService {
|
||||
}else if(srcIp.getIpType()==6|| srcIp.getIpType()==64){//64表示源ip为ipv6,目的ip为ipv4
|
||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
||||
dstIp.setSrcIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||
}else {//all
|
||||
dstIp.setSrcIp(srcIp.getSrcIpAddress());
|
||||
dstIp.setSrcIpMask("255.255.255.255");
|
||||
}
|
||||
}
|
||||
if(srcIp.getDestIpAddress()!=null){
|
||||
@@ -450,6 +508,26 @@ public abstract class BaseService {
|
||||
IPv6Network strangeNetwork = IPv6Network.fromString(srcIp.getDestIpAddress());
|
||||
dstIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]);
|
||||
dstIp.setDstIpMask(strangeNetwork.getNetmask().asAddress().toString());
|
||||
}else {
|
||||
Pattern patternV4Subnet=Pattern.compile(Constants.IPV4_IP_SUBNET_REGEXP);
|
||||
Pattern patternV6Subnet=Pattern.compile(Constants.IPV6_IP_SUBNET_REGEXP);
|
||||
Matcher matchernV4Subnet=patternV4Subnet.matcher(srcIp.getDestIpAddress());
|
||||
Matcher matcherV6Subnet=patternV6Subnet.matcher(srcIp.getDestIpAddress());
|
||||
if(matchernV4Subnet.matches()) {
|
||||
Integer dstMaskNum = Integer.parseInt(srcIp.getDestIpAddress().split("/")[1]);
|
||||
if(dstMaskNum==0){
|
||||
dstIp.setDstIpMask("0.0.0.0");
|
||||
}else{
|
||||
dstIp.setDstIpMask(IpUtil.convertMask(dstMaskNum));;
|
||||
}
|
||||
dstIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]);
|
||||
}else if(matcherV6Subnet.matches()){
|
||||
IPv6Network strangeNetwork = IPv6Network.fromString(srcIp.getDestIpAddress());
|
||||
dstIp.setDstIp(srcIp.getDestIpAddress().split("/")[0]);
|
||||
dstIp.setDstIpMask(strangeNetwork.getNetmask().asAddress().toString());
|
||||
}else {
|
||||
throw new RuntimeException("Invalid IP/subnet mask format");
|
||||
}
|
||||
}
|
||||
|
||||
}else if(srcIp.getDestIpAddress().indexOf("-")!=-1){
|
||||
@@ -462,6 +540,23 @@ public abstract class BaseService {
|
||||
IPv6Network network = IPv6Network.fromTwoAddresses(address1,address2);
|
||||
dstIp.setDstIp(address1.toString());
|
||||
dstIp.setDstIpMask(network.getNetmask().asAddress().toString());
|
||||
}else {
|
||||
Pattern patternV4Range=Pattern.compile(Constants.IPV4_IP_RANGE_REGEXP);
|
||||
Pattern patternV6Range=Pattern.compile(Constants.IPV6_IP_RANGE_REGEXP);
|
||||
Matcher matcherV4Range=patternV4Range.matcher(srcIp.getDestIpAddress());
|
||||
Matcher matcherV6Range=patternV6Range.matcher(srcIp.getDestIpAddress());
|
||||
if(matcherV4Range.matches()) {
|
||||
dstIp.setDstIp(srcIp.getDestIpAddress().split("-")[0]);
|
||||
dstIp.setDstIpMask(IpUtil.getMask(srcIp.getDestIpAddress().split("-")[0], srcIp.getDestIpAddress().split("-")[1]));
|
||||
}else if(matcherV6Range.matches()) {
|
||||
IPv6Address address1 = IPv6Address.fromString(srcIp.getDestIpAddress().split("-")[0]);
|
||||
IPv6Address address2 = IPv6Address.fromString(srcIp.getDestIpAddress().split("-")[1]);
|
||||
IPv6Network network = IPv6Network.fromTwoAddresses(address1,address2);
|
||||
dstIp.setDstIp(address1.toString());
|
||||
dstIp.setDstIpMask(network.getNetmask().asAddress().toString());
|
||||
}else {
|
||||
throw new RuntimeException("Invalid IP range format");
|
||||
}
|
||||
}
|
||||
|
||||
}else{
|
||||
@@ -471,6 +566,20 @@ public abstract class BaseService {
|
||||
}else if(srcIp.getIpType()==6|| srcIp.getIpType()==46){//46表示源ip为ipv4,目的ip为ipv6
|
||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
||||
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||
}else {//all
|
||||
Pattern patternV4=Pattern.compile(Constants.IPV4_IP_REGEXP);
|
||||
Pattern patternV6=Pattern.compile(Constants.IPV6_IP_REGEXP);
|
||||
Matcher matcherV4=patternV4.matcher(srcIp.getDestIpAddress());
|
||||
Matcher matcherV6=patternV6.matcher(srcIp.getDestIpAddress());
|
||||
if(matcherV4.matches()) {
|
||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
||||
dstIp.setDstIpMask("255.255.255.255");
|
||||
}else if(matcherV6.matches()) {
|
||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
||||
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||
}else {
|
||||
throw new RuntimeException("invalid ip format");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -481,6 +590,9 @@ public abstract class BaseService {
|
||||
}else if(srcIp.getIpType()==6|| srcIp.getIpType()==46){//46表示源ip为ipv4,目的ip为ipv6
|
||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
||||
dstIp.setDstIpMask("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
|
||||
}else {//all
|
||||
dstIp.setDstIp(srcIp.getDestIpAddress());
|
||||
dstIp.setDstIpMask("255.255.255.255");
|
||||
}
|
||||
}
|
||||
if(srcIp.getSrcPort()!=null){
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.nis.domain.configuration.AppDomainCfg;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
@@ -84,6 +85,13 @@ public class AppCfgService extends BaseService {
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
public Page<AppSslCertCfg> findAppSslList(Page<AppSslCertCfg> page, AppSslCertCfg entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<AppSslCertCfg> list = appCfgDao.findAppSslList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
public AppPolicyCfg getAppPolicyCfg(Long cfgId){
|
||||
AppPolicyCfg policy = appCfgDao.getAppPolicyCfg(cfgId);
|
||||
List<IpPortCfg> ipPortList = appCfgDao.getAppPolicyIpList(policy);
|
||||
@@ -102,6 +110,9 @@ public class AppCfgService extends BaseService {
|
||||
public AppByteCfg getAppByteCfg(Long cfgId){
|
||||
return appCfgDao.getAppByteCfg(cfgId);
|
||||
}
|
||||
public AppSslCertCfg getAppSslCfg(Long cfgId){
|
||||
return appCfgDao.getAppSslCfg(cfgId);
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdateAppPolicyCfg(AppPolicyCfg entity) throws Exception{
|
||||
//设置区域运营商信息
|
||||
@@ -398,7 +409,65 @@ public class AppCfgService extends BaseService {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdateAppSslCfg(AppSslCertCfg entity) throws Exception{
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
if(entity.getCfgId()==null){
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
List<Integer> idList = ConfigServiceUtil.getId(1, 1);
|
||||
if(idList!=null && idList.size()>0){
|
||||
compileId = idList.get(0);
|
||||
}
|
||||
entity.setCompileId(compileId);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
appCfgDao.insertAppSslCfg(entity);
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
cfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException(e.getMessage());
|
||||
}
|
||||
}else{
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
appCfgDao.updateAppSslCfg(entity);
|
||||
|
||||
//删除旧的区域IP,新增新的区域IP
|
||||
AreaIpCfg area = new AreaIpCfg();
|
||||
area.setCompileId(entity.getCompileId());
|
||||
area.setFunctionId(entity.getFunctionId());
|
||||
areaIpCfgDao.deleteAreaIpCfg(area);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
cfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgDesc","cfgRegionCode","cfgType"});
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void auditAppPolicyCfg(AppPolicyCfg entity,Integer isAudit){
|
||||
String configType=entity.getConfigType();
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
@@ -864,6 +933,87 @@ public class AppCfgService extends BaseService {
|
||||
logger.info("app字节配置取消配置响应信息:"+result.getMsg());
|
||||
}
|
||||
}
|
||||
public void auditAppSslCfg(AppSslCertCfg entity,Integer isAudit){
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
List<GroupCfg> groupRelationList = new ArrayList();
|
||||
List<IpCfg> ipRegionList = new ArrayList();
|
||||
List<StringCfg> strRegionList = new ArrayList();
|
||||
List<NumBoundaryCfg> numRegionList = new ArrayList();
|
||||
List<DigestCfg> digestRegionList = new ArrayList();
|
||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||
entity.setTableName(AppSslCertCfg.getTablename());
|
||||
appCfgDao.auditCfg(entity);
|
||||
|
||||
if(isAudit==1){
|
||||
List<AppSslCertCfg> list = new ArrayList();
|
||||
list.add(entity);
|
||||
Map<String,List> map = cfgConvert(strRegionList,list,3,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
//保存区域IP信息
|
||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||
AreaIpCfg cfg = new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(AreaIpCfg.getTablename());
|
||||
appCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
areaIpRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if(isAudit==1){
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, maatCfg);
|
||||
maatCfg.setAction(entity.getAction());
|
||||
maatCfg.setAuditTime(entity.getAuditTime());
|
||||
maatCfg.setIpRegionList(ipRegionList);
|
||||
maatCfg.setStrRegionList(strRegionList);
|
||||
maatCfg.setNumRegionList(numRegionList);
|
||||
maatCfg.setDigestRegionList(digestRegionList);
|
||||
maatCfg.setGroupRelationList(groupRelationList);
|
||||
maatCfg.setGroupNum(groupRelationList.size());
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
//设置APP自定义域
|
||||
String userRegion = "APP_ID="+entity.getAppCode();
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("app SSL配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
//ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
//logger.info("app SSL配置下发响应信息:"+result.getMsg());
|
||||
|
||||
}else if(isAudit==3){
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(entity.getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("app SSL配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
//ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||
//logger.info("app SSL配置取消配置响应信息:"+result.getMsg());
|
||||
}
|
||||
}
|
||||
public void updateAppPolicyCfgValid(Integer isValid,String ids,Integer functionId){
|
||||
AppPolicyCfg entity = new AppPolicyCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
@@ -983,4 +1133,26 @@ public class AppCfgService extends BaseService {
|
||||
}
|
||||
|
||||
}
|
||||
public void updateAppSslCfgValid(Integer isValid,String ids,Integer functionId){
|
||||
AppSslCertCfg entity = new AppSslCertCfg();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
entity.setTableName(AppSslCertCfg.getTablename());
|
||||
entity.setFunctionId(functionId);
|
||||
appCfgDao.updateCfgValid(entity);
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
||||
AreaIpCfg cfg = new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(AreaIpCfg.getTablename());
|
||||
appCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@ import com.nis.domain.configuration.AvVoipIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
@@ -35,6 +37,7 @@ import com.nis.util.StringUtil;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
||||
import com.nis.web.dao.configuration.AvContentCfgDao;
|
||||
import com.nis.web.dao.configuration.StringCfgDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
@@ -51,6 +54,8 @@ public class AvContentCfgService extends BaseService{
|
||||
protected AvContentCfgDao avContentCfgDao;
|
||||
@Autowired
|
||||
protected AreaIpCfgDao areaIpCfgDao;
|
||||
@Autowired
|
||||
protected StringCfgDao stringCfgDao;
|
||||
|
||||
|
||||
/********************************voip业务*********************************/
|
||||
@@ -67,6 +72,19 @@ public class AvContentCfgService extends BaseService{
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 查询account分页数据
|
||||
* @param page 分页对象
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public Page<CfgIndexInfo> findAccountPage(Page<CfgIndexInfo> page, CfgIndexInfo entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<CfgIndexInfo> list=avContentCfgDao.findAccountList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
/**
|
||||
* 根据索引表信息获取voipIpCfg信息
|
||||
* @param entity
|
||||
@@ -83,199 +101,242 @@ public class AvContentCfgService extends BaseService{
|
||||
public List<AvVoipAccountCfg> getVoipAccountCfgList(CfgIndexInfo entity) {
|
||||
return avContentCfgDao.findVoipAccountCfgList(entity);
|
||||
}
|
||||
/**
|
||||
* 公共订阅关键字SubscribeId
|
||||
* @param cfgIndexInfo
|
||||
* @return
|
||||
*/
|
||||
public List<NtcSubscribeIdCfg> getSubscribeIdCfgList(CfgIndexInfo entity) {
|
||||
return avContentCfgDao.findSubscribeIdCfgList(entity);
|
||||
}
|
||||
/**
|
||||
* 根据索引表信息获取voipAccountCfg信息
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity) {
|
||||
CfgIndexInfo cfg=avContentCfgDao.getCfgIndexInfo(entity);
|
||||
List<NtcSubscribeIdCfg> ntcSubscribeList=getSubscribeIdCfgList(entity);
|
||||
if(ntcSubscribeList ==null || ntcSubscribeList.size() <=0){
|
||||
ntcSubscribeList.add(new NtcSubscribeIdCfg());
|
||||
}
|
||||
List<AvVoipIpCfg> voipIps=getVoipIpCfgList(entity);
|
||||
if(voipIps ==null || voipIps.size() <=0){
|
||||
voipIps.add(new AvVoipIpCfg());
|
||||
}
|
||||
cfg.setNtcSubscribeIdCfgList(ntcSubscribeList);
|
||||
cfg.setVoipIps(voipIps);
|
||||
|
||||
return cfg;
|
||||
}
|
||||
public CfgIndexInfo getCfgIndexInfo2(CfgIndexInfo entity) {
|
||||
CfgIndexInfo cfg=avContentCfgDao.getCfgIndexInfo(entity);
|
||||
List<AvVoipAccountCfg> voipAccounts=new ArrayList<>();
|
||||
voipAccounts=getVoipAccountCfgList(entity);
|
||||
if(voipAccounts ==null || voipAccounts.size() <=0){
|
||||
voipAccounts.add(new AvVoipAccountCfg());
|
||||
}
|
||||
List<AvVoipIpCfg> voipIps=new ArrayList<>();
|
||||
voipIps=getVoipIpCfgList(entity);
|
||||
if(voipIps ==null || voipIps.size() <=0){
|
||||
voipIps.add(new AvVoipIpCfg());
|
||||
List<NtcSubscribeIdCfg> ntcSubscribeList=getSubscribeIdCfgList(entity);
|
||||
if(ntcSubscribeList ==null || ntcSubscribeList.size() <=0){
|
||||
ntcSubscribeList.add(new NtcSubscribeIdCfg());
|
||||
}
|
||||
|
||||
cfg.setVoipAccounts(voipAccounts);
|
||||
cfg.setVoipIps(voipIps);
|
||||
cfg.setNtcSubscribeIdCfgList(ntcSubscribeList);
|
||||
|
||||
return cfg;
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdateAvVoip(CfgIndexInfo entity,String voipIpIds,String voipAccountIds,String areaCfgIds){
|
||||
Date createTime=new Date();
|
||||
public void saveOrUpdateAvVoip(CfgIndexInfo entity){
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
entity.setIsValid(0);//无效
|
||||
entity.setIsAudit(0);//未审核
|
||||
if(entity.getCfgId()==null){
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
List<Integer> idList = ConfigServiceUtil.getId(1, 1);
|
||||
if(idList!=null && idList.size()>0){
|
||||
compileId = idList.get(0);
|
||||
}
|
||||
entity.setCompileId(compileId);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
avContentCfgDao.insertCfgIndexInfo(entity);
|
||||
if(entity.getVoipIps()!=null){
|
||||
for (AvVoipIpCfg voipIp : entity.getVoipIps()) {
|
||||
entity.setVoipIp(voipIp);
|
||||
avContentCfgDao.insertAvVoipIp(entity);
|
||||
}
|
||||
}
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
entity.setNtcSubscribeIdCfg(cfg);
|
||||
avContentCfgDao.insertAvVoipKeywordCfg(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
cfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
|
||||
}else{
|
||||
entity.setEditTime(new Date());
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||
//无效子配置后,再新增子配置
|
||||
avContentCfgDao.deleteAvVoipIp(entity);
|
||||
avContentCfgDao.deleteAvVoipKeywordCfg(entity);
|
||||
AreaIpCfg area = new AreaIpCfg();
|
||||
area.setCompileId(entity.getCompileId());
|
||||
area.setFunctionId(entity.getFunctionId());
|
||||
areaIpCfgDao.deleteAreaIpCfg(area);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
if(entity.getVoipIps()!=null&&entity.getVoipIps().size()>0){
|
||||
for (AvVoipIpCfg voipIp : entity.getVoipIps()) {
|
||||
entity.setVoipIp(voipIp);
|
||||
avContentCfgDao.insertAvVoipIp(entity);
|
||||
}
|
||||
}
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
entity.setNtcSubscribeIdCfg(cfg);
|
||||
avContentCfgDao.insertAvVoipKeywordCfg(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
cfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgDesc","cfgRegionCode","cfgType"});
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void saveOrUpdateAvVoipAccount(CfgIndexInfo entity){
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
//新增
|
||||
entity.setIsValid(0);//无效
|
||||
entity.setIsAudit(0);//未审核
|
||||
if(entity.getCfgId()==null){
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
//调用服务接口获取compileId
|
||||
List<Integer> compileIds = new ArrayList<Integer>();
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
compileIds = ConfigServiceUtil.getId(1,1);
|
||||
List<Integer> idList = ConfigServiceUtil.getId(1, 1);
|
||||
if(idList!=null && idList.size()>0){
|
||||
compileId = idList.get(0);
|
||||
}
|
||||
entity.setCompileId(compileId);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
avContentCfgDao.insertCfgIndexInfo(entity);
|
||||
if(entity.getVoipAccounts()!=null&&entity.getVoipAccounts().size()>0){
|
||||
for(AvVoipAccountCfg voipAccount : entity.getVoipAccounts()){
|
||||
entity.setVoipAccount(voipAccount);
|
||||
avContentCfgDao.insertAvVoipAccountCfg(entity);
|
||||
}
|
||||
}
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
entity.setNtcSubscribeIdCfg(cfg);
|
||||
avContentCfgDao.insertAvVoipKeywordCfg(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
cfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
if(compileIds != null && compileIds.size() >0 && compileIds.get(0) != 0){
|
||||
entity.setCompileId(compileIds.get(0));
|
||||
//保存avVoipIp
|
||||
if(entity.getVoipIps() != null && entity.getVoipIps().size() > 0){
|
||||
for (AvVoipIpCfg voipIp : entity.getVoipIps()) {
|
||||
entity.setVoipIp(voipIp);
|
||||
avContentCfgDao.insertAvVoipIp(entity);
|
||||
}
|
||||
}
|
||||
//保存avVoipAccount
|
||||
if(entity.getVoipAccounts() != null && entity.getVoipAccounts().size() > 0){
|
||||
for (AvVoipAccountCfg voipAccount : entity.getVoipAccounts()) {
|
||||
entity.setVoipAccount(voipAccount);
|
||||
avContentCfgDao.insertAvVoipAccount(entity);
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null&&entity.getAreaCfg().size()>0){
|
||||
for (AreaIpCfg areaIpCfg : entity.getAreaCfg()) {
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
areaIpCfgDao.saveAreaIpCfg(areaIpCfg);
|
||||
}
|
||||
}
|
||||
//保存cfgIndexInfo
|
||||
avContentCfgDao.insertCfgIndexInfo(entity);
|
||||
}else{
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>");
|
||||
}
|
||||
//修改
|
||||
|
||||
}else{
|
||||
Date editTime=new Date();
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
|
||||
voipIpIds=!StringUtil.isEmpty(voipIpIds)? voipIpIds+",":"";
|
||||
voipAccountIds=!StringUtil.isEmpty(voipAccountIds)? voipAccountIds+",":"";
|
||||
areaCfgIds=!StringUtil.isEmpty(areaCfgIds)? ","+areaCfgIds:"";
|
||||
|
||||
//判断voip信息为新增还是修改,清楚voipIpIds修改的voipId记录,剩下即为需要删除的voipId
|
||||
if(!StringUtil.isEmpty(entity.getVoipIps())){
|
||||
for (AvVoipIpCfg voipIp : entity.getVoipIps()) {
|
||||
if(!StringUtil.isEmpty(voipIp.getCfgId())){
|
||||
if(voipIpIds.contains(","+voipIp.getCfgId()+",")){
|
||||
voipIpIds=voipIpIds.replace(voipIp.getCfgId()+",", "");
|
||||
}
|
||||
//修改
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
entity.setVoipIp(voipIp);
|
||||
avContentCfgDao.updateAvVoipIp(entity);
|
||||
}else{
|
||||
//新增
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
entity.setVoipIp(voipIp);
|
||||
avContentCfgDao.insertAvVoipIp(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!StringUtil.isEmpty(entity.getVoipAccounts())){
|
||||
for (AvVoipAccountCfg voipAccount : entity.getVoipAccounts()) {
|
||||
if(!StringUtil.isEmpty(voipAccount.getCfgId())){
|
||||
if(voipAccountIds.contains(","+voipAccount.getCfgId()+",")){
|
||||
voipAccountIds=voipAccountIds.replace(voipAccount.getCfgId()+",", "");
|
||||
}
|
||||
//修改
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
entity.setVoipAccount(voipAccount);
|
||||
avContentCfgDao.updateAvVoipAccount(entity);
|
||||
}else{
|
||||
//新增
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
entity.setVoipAccount(voipAccount);
|
||||
avContentCfgDao.insertAvVoipAccount(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!StringUtil.isEmpty(entity.getAreaCfg())){
|
||||
for (AreaIpCfg areaIpCfg : entity.getAreaCfg()) {
|
||||
if(!StringUtil.isEmpty(areaIpCfg.getCfgId())){
|
||||
if(areaCfgIds.contains(","+areaIpCfg.getCfgId()+",")){
|
||||
areaCfgIds=areaCfgIds.replace(areaIpCfg.getCfgId()+",", "");
|
||||
}
|
||||
//修改
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType","cfgId"});
|
||||
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
|
||||
}else{
|
||||
//新增
|
||||
entity.setCreatorId(UserUtils.getUser().getId());
|
||||
entity.setCreateTime(createTime);
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode"
|
||||
,"cfgType"
|
||||
,"ipType"
|
||||
,"ipPattern"
|
||||
,"srcIpAddress"
|
||||
,"portPattern"
|
||||
,"srcPort"
|
||||
,"destPort"
|
||||
,"protocol"
|
||||
,"direction"
|
||||
,"protocolId"
|
||||
});
|
||||
areaIpCfgDao.saveAreaIpCfg(areaIpCfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
//delete 真是删除voipAccount信息
|
||||
if(!StringUtil.isEmpty(voipAccountIds.replaceAll(",", ""))){
|
||||
voipAccountIds=voipAccountIds.substring(1,voipAccountIds.length());
|
||||
for (String cfgId : voipAccountIds.split(",")) {
|
||||
CfgIndexInfo cfg=new CfgIndexInfo();
|
||||
AvVoipAccountCfg voipAccountCfg=new AvVoipAccountCfg();
|
||||
voipAccountCfg.setCfgId(Long.parseLong(cfgId));
|
||||
cfg.setVoipAccount(voipAccountCfg);
|
||||
avContentCfgDao.deleteAvVoipAccount(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
//delete 真是删除voipAccount信息
|
||||
if(!StringUtil.isEmpty(voipIpIds.replaceAll(",", ""))){
|
||||
voipIpIds=voipIpIds.substring(1,voipIpIds.length());
|
||||
for (String cfgId : voipIpIds.split(",")) {
|
||||
CfgIndexInfo cfg=new CfgIndexInfo();
|
||||
AvVoipIpCfg voipIpCfg=new AvVoipIpCfg();
|
||||
voipIpCfg.setCfgId(Long.parseLong(cfgId));
|
||||
cfg.setVoipIp(voipIpCfg);
|
||||
avContentCfgDao.deleteAvVoipIp(cfg);
|
||||
}
|
||||
}
|
||||
//delete 真是删除areaIpCfg信息
|
||||
if(!StringUtil.isEmpty(areaCfgIds.replaceAll(",", ""))){
|
||||
areaCfgIds=areaCfgIds.substring(1,areaCfgIds.length());
|
||||
for (String cfgId : areaCfgIds.split(",")) {
|
||||
CfgIndexInfo cfg=new CfgIndexInfo();
|
||||
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
||||
areaIpCfg.setCfgId(Long.parseLong(cfgId));
|
||||
areaIpCfgDao.deleteAreaIpCfgByCfgId(areaIpCfg);
|
||||
}
|
||||
}
|
||||
|
||||
//修改
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(editTime);
|
||||
entity.setEditTime(new Date());
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||
//无效子配置后,再新增子配置
|
||||
avContentCfgDao.deleteAvVoipKeywordCfg(entity);
|
||||
avContentCfgDao.deleteAvVoipAccountCfg(entity);
|
||||
AreaIpCfg area = new AreaIpCfg();
|
||||
area.setCompileId(entity.getCompileId());
|
||||
area.setFunctionId(entity.getFunctionId());
|
||||
areaIpCfgDao.deleteAreaIpCfg(area);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
if(entity.getVoipAccounts()!=null&&entity.getVoipAccounts().size()>0){
|
||||
for (AvVoipAccountCfg voipAccount : entity.getVoipAccounts()) {
|
||||
entity.setVoipAccount(voipAccount);
|
||||
avContentCfgDao.insertAvVoipAccountCfg(entity);
|
||||
}
|
||||
}
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
entity.setNtcSubscribeIdCfg(cfg);
|
||||
avContentCfgDao.insertAvVoipKeywordCfg(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
cfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgDesc","cfgRegionCode","cfgType"});
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids compileIds
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void updateAvVoipValid(Integer isAudit,Integer isValid,String compileIds,Integer functionId){
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = compileIds.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCompileId(Integer.parseInt(id));
|
||||
entity.setFunctionId(functionId);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
avContentCfgDao.updateAvVoipIp(entity);
|
||||
avContentCfgDao.updateAvVoipKeywordCfgt(entity);
|
||||
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, areaIpCfg);
|
||||
areaIpCfgDao.updateAreaIpCfgValid(areaIpCfg);
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -285,9 +346,9 @@ public class AvContentCfgService extends BaseService{
|
||||
* @param ids compileIds
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void updateAvVoipValid(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
public void updateAvVoipAccountValid(Integer isAudit,Integer isValid,String compileIds,Integer functionId){
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
String[] idArray = compileIds.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCompileId(Integer.parseInt(id));
|
||||
entity.setFunctionId(functionId);
|
||||
@@ -295,8 +356,8 @@ public class AvContentCfgService extends BaseService{
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
avContentCfgDao.updateAvVoipIp(entity);
|
||||
avContentCfgDao.updateAvVoipAccount(entity);
|
||||
avContentCfgDao.updateAvVoipKeywordCfgt(entity);
|
||||
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, areaIpCfg);
|
||||
@@ -316,7 +377,7 @@ public class AvContentCfgService extends BaseService{
|
||||
|
||||
List<CfgIndexInfo> list = new ArrayList();
|
||||
List<AvVoipIpCfg> voipIpList = new ArrayList();
|
||||
List<AvVoipAccountCfg> voipAccountList = new ArrayList();
|
||||
List <NtcSubscribeIdCfg> ntcList = new ArrayList();
|
||||
List<AreaIpCfg> areaIpCfgList = new ArrayList();
|
||||
|
||||
CfgIndexInfo searchCfg=new CfgIndexInfo();
|
||||
@@ -328,16 +389,16 @@ public class AvContentCfgService extends BaseService{
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(auditTime);
|
||||
|
||||
|
||||
avContentCfgDao.updateAvVoipIp(entity);
|
||||
avContentCfgDao.updateAvVoipAccount(entity);
|
||||
avContentCfgDao.updateAvVoipKeywordCfgt(entity);
|
||||
|
||||
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType","cfgId"});
|
||||
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
|
||||
|
||||
voipIpList=avContentCfgDao.findVoipIpCfgList(entity);
|
||||
voipAccountList=avContentCfgDao.findVoipAccountCfgList(entity);
|
||||
ntcList=avContentCfgDao.findSubscribeIdCfgList(entity);
|
||||
areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
@@ -357,8 +418,122 @@ public class AvContentCfgService extends BaseService{
|
||||
ipRegionList=ipMap.get("dstList");
|
||||
}
|
||||
|
||||
if(!StringUtil.isEmpty(voipAccountList)){
|
||||
Map<String,List> accountMap = cfgConvert(strRegionList,voipAccountList,2,entity,groupRelationList);
|
||||
if(!StringUtil.isEmpty(ntcList)){
|
||||
Map<String,List> ntcMap = cfgConvert(strRegionList,ntcList,2,entity,groupRelationList);
|
||||
groupRelationList=ntcMap.get("groupList");
|
||||
strRegionList=ntcMap.get("dstList");
|
||||
}
|
||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||
Map<String,List> areaMap = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList);
|
||||
groupRelationList=areaMap.get("groupList");
|
||||
areaIpRegionList=areaMap.get("dstList");
|
||||
}
|
||||
}
|
||||
|
||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if(isAudit==1){
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, maatCfg);
|
||||
maatCfg.setAction(entity.getAction());
|
||||
maatCfg.setAuditTime(auditTime);
|
||||
maatCfg.setIpRegionList(ipRegionList);
|
||||
maatCfg.setStrRegionList(strRegionList);
|
||||
maatCfg.setNumRegionList(numRegionList);
|
||||
maatCfg.setDigestRegionList(digestRegionList);
|
||||
maatCfg.setGroupRelationList(groupRelationList);
|
||||
maatCfg.setGroupNum(groupRelationList.size());
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(auditTime);
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("voip IP配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
logger.info("voip IP配置下发响应信息:"+result.getMsg());
|
||||
|
||||
}else if(isAudit==3){
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(entity.getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(auditTime);
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("voip IP配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||
logger.info("voip IP配置取消配置响应信息:"+result.getMsg());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/********************************voip业务*********************************/
|
||||
/**
|
||||
*
|
||||
* @param isAudit
|
||||
* @param isValid
|
||||
* @param ids 编译Id
|
||||
* @param functionId
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditAvVoipAccount(Integer isAudit,Integer isValid,Integer functionId,String compileId,Date auditTime){
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
|
||||
List<CfgIndexInfo> list = new ArrayList();
|
||||
List<AvVoipAccountCfg> accountList = new ArrayList();
|
||||
List <NtcSubscribeIdCfg> ntcList = new ArrayList();
|
||||
List<AreaIpCfg> areaIpCfgList = new ArrayList();
|
||||
|
||||
CfgIndexInfo searchCfg=new CfgIndexInfo();
|
||||
searchCfg.setCompileId(Integer.parseInt(compileId));
|
||||
|
||||
entity = avContentCfgDao.getCfgIndexInfo(searchCfg);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(auditTime);
|
||||
|
||||
avContentCfgDao.updateAvVoipAccount(entity);
|
||||
avContentCfgDao.updateAvVoipKeywordCfgt(entity);
|
||||
|
||||
avContentCfgDao.updateCfgIndexInfo(entity);
|
||||
AreaIpCfg areaIpCfg=new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, areaIpCfg,new String[]{"cfgRegionCode","cfgType","cfgId"});
|
||||
areaIpCfgDao.updateAreaIpCfg(areaIpCfg);
|
||||
|
||||
ntcList=avContentCfgDao.findSubscribeIdCfgList(entity);
|
||||
accountList=avContentCfgDao.findVoipAccountCfgList(entity);
|
||||
areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
List<GroupCfg> groupRelationList = new ArrayList();
|
||||
List<IpCfg> ipRegionList = new ArrayList();
|
||||
List<StringCfg> strRegionList = new ArrayList();
|
||||
List<NumBoundaryCfg> numRegionList = new ArrayList();
|
||||
List<DigestCfg> digestRegionList = new ArrayList();
|
||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||
|
||||
if(isAudit==1){
|
||||
|
||||
if(!StringUtil.isEmpty(ntcList)){
|
||||
Map<String,List> accountMap = cfgConvert(strRegionList,ntcList,2,entity,groupRelationList);
|
||||
groupRelationList=accountMap.get("groupList");
|
||||
strRegionList=accountMap.get("dstList");
|
||||
}
|
||||
if(!StringUtil.isEmpty(accountList)){
|
||||
Map<String,List> accountMap = cfgConvert(strRegionList,accountList,2,entity,groupRelationList);
|
||||
groupRelationList=accountMap.get("groupList");
|
||||
strRegionList=accountMap.get("dstList");
|
||||
}
|
||||
@@ -391,11 +566,12 @@ public class AvContentCfgService extends BaseService{
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("voip配置下发配置参数:"+json);
|
||||
logger.info("voip Account配置下发配置参数:"+json);
|
||||
System.err.println(json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
logger.info("voip配置下发响应信息:"+result.getMsg());
|
||||
|
||||
logger.info("voip Account配置下发响应信息:"+result.getMsg());
|
||||
|
||||
}else if(isAudit==3){
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(entity.getServiceId());
|
||||
@@ -408,10 +584,10 @@ public class AvContentCfgService extends BaseService{
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("voip配置下发配置参数:"+json);
|
||||
logger.info("voip Account配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||
logger.info("voip配置取消配置响应信息:"+result.getMsg());
|
||||
logger.info("voip Account配置取消配置响应信息:"+result.getMsg());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -22,6 +22,9 @@ import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.FileDigestCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.P2pHashCfg;
|
||||
import com.nis.domain.configuration.P2pKeywordCfg;
|
||||
import com.nis.domain.configuration.FtpKeywordCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
@@ -527,4 +530,354 @@ public class FileTransferCfgService extends CrudService<FileTransferCfgDao,CfgIn
|
||||
}
|
||||
}
|
||||
|
||||
public Page<CfgIndexInfo> getP2pList(Page<CfgIndexInfo> page, CfgIndexInfo entity){
|
||||
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||
entity.setPage(page);
|
||||
List<CfgIndexInfo> list = fileTransferCfgDao.getP2pList(entity);
|
||||
page.setList(list);
|
||||
return page;
|
||||
}
|
||||
|
||||
public CfgIndexInfo getP2pCfg(Long cfgId){
|
||||
// 查询各域配置信息
|
||||
CfgIndexInfo entity = fileTransferCfgDao.getCfgIndexInfo(cfgId);
|
||||
List<IpPortCfg> ipPortList = fileTransferCfgDao.getIpPortList(entity);
|
||||
List<P2pHashCfg> hashList = fileTransferCfgDao.getP2pHashList(entity);
|
||||
List<P2pKeywordCfg> keywordList = fileTransferCfgDao.getP2pKeywordList(entity);
|
||||
List<NtcSubscribeIdCfg> subscribeIdList = fileTransferCfgDao.getP2pSubscribeidList(entity);
|
||||
entity.setIpPortList(ipPortList);
|
||||
entity.setP2pHashList(hashList);
|
||||
entity.setP2pKeywordList(keywordList);
|
||||
entity.setNtcSubscribeIdCfgList(subscribeIdList);
|
||||
return entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存p2p配置
|
||||
* @param entity
|
||||
*/
|
||||
public void saveP2pCfg(CfgIndexInfo entity){
|
||||
// 设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
if(entity.getCfgId()==null){
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
List<Integer> idList = ConfigServiceUtil.getId(1, 1);
|
||||
if(idList!=null && idList.size()>0){
|
||||
compileId = idList.get(0);
|
||||
}
|
||||
entity.setCompileId(compileId);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
fileTransferCfgDao.saveCfgIndex(entity);
|
||||
// 保存IP域配置信息
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
cfg.setUserRegion2(null);
|
||||
fileTransferCfgDao.saveIpPortCfg(cfg);
|
||||
}
|
||||
}
|
||||
// 保存Hash类型域配置信息
|
||||
if(entity.getP2pHashList()!=null){
|
||||
for(BaseStringCfg cfg:entity.getP2pHashList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
cfg.setUserRegion1(cfg.getUserRegion2());
|
||||
cfg.setUserRegion2(null);
|
||||
fileTransferCfgDao.saveP2pHashCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 保存关键字域配置信息
|
||||
if(entity.getP2pKeywordList()!=null){
|
||||
for(P2pKeywordCfg cfg:entity.getP2pKeywordList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
fileTransferCfgDao.saveP2pKeywordCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 保存SubscribeId域配置信息
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
fileTransferCfgDao.saveP2pSubscribeIdCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
cfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
|
||||
}
|
||||
|
||||
}else{
|
||||
// 审核未通过状态的配置 修改后状态改为未审核
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
entity.setEditTime(new Date());
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
fileTransferCfgDao.updateCfgIndex(entity);
|
||||
// 删除无效子配置后,再新增子配置
|
||||
fileTransferCfgDao.deleteP2pIpCfg(entity);
|
||||
fileTransferCfgDao.deleteP2pHashCfg(entity);
|
||||
fileTransferCfgDao.deleteP2pKeywordCfg(entity);
|
||||
fileTransferCfgDao.deleteP2pSubscribeIdCfg(entity);
|
||||
AreaIpCfg area = new AreaIpCfg();
|
||||
area.setCompileId(entity.getCompileId());
|
||||
area.setFunctionId(entity.getFunctionId());
|
||||
areaIpCfgDao.deleteAreaIpCfg(area);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(IpPortCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
cfg.setUserRegion2(null);
|
||||
fileTransferCfgDao.saveIpPortCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getP2pHashList()!=null){
|
||||
for(BaseStringCfg cfg:entity.getP2pHashList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
cfg.setUserRegion1(cfg.getUserRegion2());
|
||||
cfg.setUserRegion2(null);
|
||||
fileTransferCfgDao.saveP2pHashCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity.getP2pKeywordList()!=null){
|
||||
for(P2pKeywordCfg cfg:entity.getP2pKeywordList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
fileTransferCfgDao.saveP2pKeywordCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null){
|
||||
for(NtcSubscribeIdCfg cfg:entity.getNtcSubscribeIdCfgList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
fileTransferCfgDao.saveP2pSubscribeIdCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null){
|
||||
for(AreaIpCfg cfg:entity.getAreaCfg()){
|
||||
cfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgDesc","cfgRegionCode","cfgType"});
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void updateP2pCfgValid(Integer isValid, String ids, Integer functionId) {
|
||||
CfgIndexInfo entity = new CfgIndexInfo();
|
||||
String[] idArray = ids.split(",");
|
||||
for(String id :idArray){
|
||||
entity.setCfgId(Long.parseLong(id));
|
||||
entity.setIsValid(isValid);
|
||||
entity.setEditorId(UserUtils.getUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
entity.setFunctionId(functionId);
|
||||
fileTransferCfgDao.updateCfgValid(entity);
|
||||
//查询子配置
|
||||
entity = this.getP2pCfg(Long.parseLong(id));
|
||||
if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){
|
||||
IpPortCfg cfg = new IpPortCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(IpPortCfg.getTablename());
|
||||
cfg.setUserRegion2(null);
|
||||
fileTransferCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
if(entity.getP2pHashList()!=null && entity.getP2pHashList().size()>0){
|
||||
P2pHashCfg cfg = new P2pHashCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(P2pHashCfg.getTablename());
|
||||
cfg.setUserRegion1(cfg.getUserRegion2());
|
||||
cfg.setUserRegion2(null);
|
||||
fileTransferCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
if(entity.getP2pKeywordList()!=null && entity.getP2pKeywordList().size()>0){
|
||||
P2pKeywordCfg cfg = new P2pKeywordCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(P2pKeywordCfg.getTablename());
|
||||
fileTransferCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||
fileTransferCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
//保存区域IP信息
|
||||
if(entity.getAreaCfg()!=null && entity.getAreaCfg().size()>0){
|
||||
AreaIpCfg cfg = new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(AreaIpCfg.getTablename());
|
||||
fileTransferCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void auditP2pCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
|
||||
//修改数据库审核状态信息
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
fileTransferCfgDao.auditCfg(entity);
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
List<GroupCfg> groupRelationList = new ArrayList();
|
||||
List<IpCfg> ipRegionList = new ArrayList();
|
||||
List<StringCfg> strRegionList = new ArrayList();
|
||||
List<NumBoundaryCfg> numRegionList = new ArrayList();
|
||||
List<DigestCfg> digestRegionList = new ArrayList();
|
||||
List<IpCfg> areaIpRegionList = new ArrayList();
|
||||
|
||||
//查询子配置并修改审核状态
|
||||
entity = this.getP2pCfg(entity.getCfgId());
|
||||
if(entity.getIpPortList()!=null && entity.getIpPortList().size()>0){
|
||||
IpPortCfg cfg = new IpPortCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(IpPortCfg.getTablename());
|
||||
fileTransferCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(ipRegionList,entity.getIpPortList(),1,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
ipRegionList=map.get("dstList");
|
||||
if(map.get("numRegionList")!=null){
|
||||
numRegionList.addAll(map.get("numRegionList"));
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity.getP2pHashList()!=null && entity.getP2pHashList().size()>0){
|
||||
P2pHashCfg cfg = new P2pHashCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(P2pHashCfg.getTablename());
|
||||
fileTransferCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(strRegionList,entity.getP2pHashList(),2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
if(entity.getP2pKeywordList()!=null && entity.getP2pKeywordList().size()>0){
|
||||
P2pKeywordCfg cfg = new P2pKeywordCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(P2pKeywordCfg.getTablename());
|
||||
fileTransferCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(strRegionList,entity.getP2pKeywordList(),2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
if(entity.getNtcSubscribeIdCfgList()!=null && entity.getNtcSubscribeIdCfgList().size()>0){
|
||||
NtcSubscribeIdCfg cfg = new NtcSubscribeIdCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(NtcSubscribeIdCfg.getTablename());
|
||||
fileTransferCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(strRegionList,entity.getNtcSubscribeIdCfgList(),2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//保存区域IP信息
|
||||
List<AreaIpCfg> areaIpCfgList=areaIpCfgDao.getByCompileId(entity.getCompileId());
|
||||
if(!StringUtil.isEmpty(areaIpCfgList)){
|
||||
AreaIpCfg cfg = new AreaIpCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
cfg.setTableName(AreaIpCfg.getTablename());
|
||||
fileTransferCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
Map<String,List> map = cfgConvert(areaIpRegionList,areaIpCfgList,1,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
areaIpRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
|
||||
//构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if(isAudit==1){
|
||||
maatCfg.initDefaultValue();
|
||||
BeanUtils.copyProperties(entity, maatCfg);
|
||||
maatCfg.setAction(entity.getAction());
|
||||
maatCfg.setAuditTime(entity.getAuditTime());
|
||||
maatCfg.setIpRegionList(ipRegionList);
|
||||
maatCfg.setStrRegionList(strRegionList);
|
||||
maatCfg.setNumRegionList(numRegionList);
|
||||
maatCfg.setDigestRegionList(digestRegionList);
|
||||
maatCfg.setGroupRelationList(groupRelationList);
|
||||
maatCfg.setGroupNum(groupRelationList.size());
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
maatCfg.setIsValid(entity.getIsValid());
|
||||
|
||||
//设置自定义域参数
|
||||
String userRegion = "";
|
||||
for (IpPortCfg ipPortCfg : entity.getIpPortList()) {
|
||||
if(!ipPortCfg.getUserRegion1().equals("")) {
|
||||
userRegion += Constants.P2P_IP_TYPE_USER_REGION_KEY+"="+ipPortCfg.getUserRegion1();
|
||||
}
|
||||
for (BaseStringCfg p2pHashCfg : entity.getP2pHashList()) {
|
||||
if(!p2pHashCfg.getUserRegion1().equals("")) {
|
||||
userRegion += Constants.USER_REGION_SPLIT+Constants.P2P_HASH_TYPE_USER_REGION_KEY+"="+p2pHashCfg.getUserRegion1();
|
||||
}else {
|
||||
userRegion += Constants.USER_REGION_SPLIT+Constants.P2P_HASH_TYPE_USER_REGION_KEY+"=";
|
||||
}
|
||||
}
|
||||
}
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("p2p配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.postMaatCfg(json);
|
||||
logger.info("p2p配置下发响应信息:"+result.getMsg());
|
||||
|
||||
}else if(isAudit==3){
|
||||
maatCfg.setCompileId(entity.getCompileId());
|
||||
maatCfg.setServiceId(entity.getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||
//调用服务接口取消配置
|
||||
String json=gsonToJson(maatBean);
|
||||
logger.info("p2p配置下发配置参数:"+json);
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result = ConfigServiceUtil.put(json,1);
|
||||
logger.info("p2p配置取消配置响应信息:"+result.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -774,8 +774,8 @@ res_group_num=Response Group Number
|
||||
policy_number_value_valid=The policy number can only be 0, or more than 100
|
||||
policy_number_value_unique=The policy number has already existed
|
||||
location=Location
|
||||
extra=Abroad
|
||||
intra=Territory
|
||||
extra=Outbound
|
||||
intra=Inbound
|
||||
#=============about Maintenance=========
|
||||
#=============some validation===========
|
||||
line=line %s
|
||||
@@ -1044,6 +1044,7 @@ tunnel_code=Tunnel Behavior No
|
||||
tunnel_name=Tunnel Behavior Name
|
||||
tunnel_desc=Tunnel Behavior Description
|
||||
call_external_procedures_failed=Call external procedures failedfile_strategy=\u6587\u4EF6\u7B56\u7565
|
||||
file_strategy=File Strategy
|
||||
file_desc=File Desc
|
||||
content_type=Content Type
|
||||
content_length=Content Length
|
||||
|
||||
@@ -314,7 +314,6 @@ config_describe=\u914D\u7F6E\u63CF\u8FF0
|
||||
match_area=\u5339\u914D\u533A\u57DF
|
||||
key_word=\u5173\u952E\u5B57
|
||||
block_type=\u7BA1\u63A7\u7C7B\u578B
|
||||
letter=\u6765\u51FD
|
||||
whether_area_block=\u533A\u57DF\u7BA1\u63A7\u8303\u56F4
|
||||
classification=\u5206\u7C7B
|
||||
label=\u6807\u7B7E
|
||||
@@ -422,7 +421,7 @@ name_existed=\u7528\u6237\u540D\u5DF2\u5B58\u5728
|
||||
parent_org=\u4E0A\u7EA7\u673A\u6784
|
||||
is_useable=\u662F\u5426\u53EF\u7528
|
||||
address=\u8054\u7CFB\u5730\u5740
|
||||
nochange=\u6682\u65E0\u4FEE\u6539\u8BB0\u5F55!
|
||||
nochange=\u6682\u65E0\u4FEE\u6539\u8BB0\u5F55\!
|
||||
module_name=\u6A21\u5757\u540D\u79F0
|
||||
dict_mark=\u5B57\u5178\u6807\u8BC6
|
||||
run_state=\u8FD0\u884C\u72B6\u6001
|
||||
@@ -709,7 +708,7 @@ pid=\u8282\u76EEID
|
||||
log_uri=\u5C01\u5835\u73B0\u573A\u7247\u6BB5\u8DEF\u5F84
|
||||
fd_type=\u5C01\u5835\u7C7B\u578B
|
||||
access_url=\u8282\u76EE\u8BBF\u95EE\u5730\u5740
|
||||
refer=\u5165\u53E3\u9875\u9762
|
||||
referer=\u5165\u53E3\u9875\u9762
|
||||
black_block_list=\u52A8\u6001\u9ED1\u540D\u5355
|
||||
static_cfg_block=\u9759\u6001\u914D\u7F6E
|
||||
first_hit=\u9996\u6B21\u5206\u6790\u547D\u4E2D
|
||||
@@ -737,9 +736,8 @@ default_group=\u7F3A\u7701\u7EC4
|
||||
policy_group_manage=\u7B56\u7565\u5206\u7EC4
|
||||
#===========policy_group_manage end =============
|
||||
#=============about manipulation=========
|
||||
ratelimit_config=\u9650\u6D41\u7BA1\u7406
|
||||
target_ip_protect=\u76EE\u6807IP\u9632\u62A4
|
||||
ratelimit_config=\u9650\u901F
|
||||
target_ip_protect=\u6297DDOS\u653B\u51FB
|
||||
ip_ratelimit=IP\u9650\u6D41
|
||||
domain_ratelimit=\u57DF\u540D\u9650\u6D41
|
||||
ratelimit=\u9650\u901F\u6BD4\u4F8B
|
||||
@@ -983,10 +981,9 @@ src_ip_report=\u5883\u5185\u6E90IP\u62A5\u8868
|
||||
dest_ip_report=\u76EE\u7684\u56FD\u5BB6IP\u62A5\u8868
|
||||
isp_report=\u8FD0\u8425\u5546\u5C40\u70B9\u62A5\u8868
|
||||
#=============about report===================
|
||||
ip_multiplex_policy=IP Reuse Policy
|
||||
target_ip_protect=Anti DDOS
|
||||
ip_multiplex_pool_config=IP Reuse Addr Pool
|
||||
letter=Official Letter
|
||||
ip_multiplex_policy=IP\u590D\u7528\u7B56\u7565
|
||||
ip_multiplex_pool_config=IP\u590D\u7528\u5730\u5740\u6C60
|
||||
letter=\u6765\u51FD
|
||||
show_more=\u5C55\u793A\u66F4\u591A
|
||||
#===============dashboard begin===================================
|
||||
dashboard=\u7EDF\u8BA1\u56FE\u8868
|
||||
@@ -1044,6 +1041,46 @@ tunnel_code=\u52A0\u5BC6\u96A7\u9053\u884C\u4E3A\u5E8F\u53F7
|
||||
tunnel_name=\u52A0\u5BC6\u96A7\u9053\u884C\u4E3A\u540D\u79F0
|
||||
tunnel_desc=\u52A0\u5BC6\u96A7\u9053\u884C\u4E3A\u63CF\u8FF0
|
||||
call_external_procedures_failed=\u8C03\u7528\u5916\u90E8\u7A0B\u5E8F\u51FA\u9519
|
||||
is_hex=\u662F\u5426\u5341\u516D\u8FDB\u5236
|
||||
is_case_insenstive=\u662F\u5426\u5927\u5C0F\u5199\u654F\u611F
|
||||
case_senstive=\u5927\u5C0F\u5199\u654F\u611F
|
||||
case_insenstive=\u5927\u5C0F\u5199\u4E0D\u654F\u611F
|
||||
hex=\u5341\u516D\u8FDB\u5236
|
||||
not_hex=\u975E\u5341\u516D\u8FDB\u5236
|
||||
|
||||
p2p_reject=P2P\u7BA1\u63A7
|
||||
NTC_P2P_IP=IP\u914D\u7F6E
|
||||
NTC_P2P_HASH_BIN=HASH\u914D\u7F6E
|
||||
NTC_P2P_KEYWORDS=\u5185\u5BB9\u5173\u952E\u5B57\u914D\u7F6E
|
||||
|
||||
s_asn=\u5BA2\u6237\u7AEFASN
|
||||
d_asn=\u670D\u52A1\u7AEFASN
|
||||
s_subscribe_id=\u5BA2\u6237\u7AEF\u7528\u6237\u540D
|
||||
d_subscribe_id=\u670D\u52A1\u7AEF\u7528\u6237\u540D
|
||||
scene_file=\u73B0\u573A\u65E5\u5FD7\u6587\u4EF6\u5730\u5740
|
||||
req_hdr_key=\u8BF7\u6C42\u5934\u8F6C\u50A8\u6587\u4EF6KEY
|
||||
req_body_key=\u8BF7\u6C42\u4F53\u8F6C\u50A8\u6587\u4EF6KEY
|
||||
res_hdr_key=\u5E94\u7B54\u5934\u8F6C\u50A8\u6587\u4EF6KEY
|
||||
res_body_key=\u5E94\u7B54\u4F53\u8F6C\u50A8\u6587\u4EF6KEY
|
||||
website=\u7F51\u7AD9\u57DF\u540D
|
||||
|
||||
p2p_ip_config_type=IP\u914D\u7F6E\u7C7B\u578B
|
||||
p2p_hash_type=HASH\u7C7B\u578B
|
||||
NTC_SUBSCRIBE_ID=\u8BA4\u8BC1\u6807\u8BC6\u914D\u7F6E
|
||||
|
||||
app_header_config=APP\u5C42\u5934\u7279\u5F81
|
||||
app_ssl_config=APP SSL\u8BC1\u4E66\u7279\u5F81
|
||||
ip_intercepter_replace=IP\u62E6\u622A\u66FF\u6362
|
||||
domain_intercepter_replace=\u57DF\u540D\u62E6\u622A\u66FF\u6362
|
||||
ip_intercepter_ratelimit=IP\u62E6\u622A\u9650\u901F
|
||||
domain_intercepter_ratelimit=\u57DF\u540D\u62E6\u622A\u9650\u901F
|
||||
app_built_in_features_config=APP\u5185\u7F6E\u7279\u5F81\u7EF4\u62A4
|
||||
PXY_INTERCEPT_PKT_BIN=\u62E6\u622A\u62A5\u6587
|
||||
certificate=\u8BC1\u4E66
|
||||
do_log=\u662F\u5426\u8BB0\u5F55\u65E5\u5FD7
|
||||
no_log=\u4E0D\u8BB0\u5F55
|
||||
all_log=\u8BB0\u5F55\u6240\u6709\u65E5\u5FD7
|
||||
framework_log=\u53EA\u8BB0\u5F55\u7ED3\u6784\u5316\u65E5\u5FD7
|
||||
file_strategy=\u6587\u4EF6\u7B56\u7565
|
||||
file_desc=\u6587\u4EF6\u63CF\u8FF0
|
||||
content_type=\u5185\u5BB9\u7C7B\u578B
|
||||
|
||||
@@ -236,6 +236,8 @@ ntcSrcipDomesticReport=ntcSrcipDomesticReport
|
||||
ntcDestipCountryReport=ntcDestipCountryReport
|
||||
ntcEntranceReport=ntcEntranceReport
|
||||
ntcIpLog=ntcIpLogs
|
||||
ntcBgpLog=ntcBgpLogs
|
||||
ntcP2pLog=ntcP2pLogs
|
||||
ntcHttpLog=ntcHttpLogs
|
||||
ntcDnsLog=ntcDnsLogs
|
||||
ntcSslLog=ntcSslLogs
|
||||
@@ -264,7 +266,7 @@ mmSamplePicLog=mmSamplePicLogs
|
||||
mmSampleVoipLog=mmSampleVoipLogs
|
||||
pxyHttpLog=pxyHttpLogs
|
||||
########################################
|
||||
#大屏图表展示服务接口
|
||||
#\u5927\u5c4f\u56fe\u8868\u5c55\u793a\u670d\u52a1\u63a5\u53e3
|
||||
dashboardUrl=http://10.0.6.242:8080/galaxy/service/log/v1/
|
||||
trafficIpActive=trafficIpActive
|
||||
trafficProtocol=trafficProtocol
|
||||
@@ -282,7 +284,7 @@ log_time_range=300000
|
||||
#use elasticsearch or not#
|
||||
isUseES=false
|
||||
|
||||
#httpclient 工具设置超时时间
|
||||
#httpclient \u5de5\u5177\u8bbe\u7f6e\u8d85\u65f6\u65f6\u95f4
|
||||
http_socket_timeout=300000
|
||||
http_connect_timeout=10000
|
||||
http_connect_request_timeout=50000
|
||||
@@ -295,7 +297,7 @@ jdbc.hive.AName=xa_dfbhit_hive
|
||||
jdbc.hive.BName=xa_z2_mesalog_hive
|
||||
|
||||
maxPageSize=100000
|
||||
#导出最大条数
|
||||
#\u5bfc\u51fa\u6700\u5927\u6761\u6570
|
||||
maxExportSize=100000
|
||||
#\u5141\u8bb8\u914d\u7f6e\u6700\u5927\u5c42\u7ea7
|
||||
maxLevelNo=4
|
||||
@@ -319,6 +321,8 @@ http_redirect_res_hdr_region=PXY_CTRL_HTTP_RES_HDR
|
||||
http_redirect_req_body_region=PXY_CTRL_HTTP_REQ_BODY
|
||||
http_redirect_res_body_region=PXY_CTRL_HTTP_RES_BODY
|
||||
http_redirect_ip_region=PXY_CTRL_IP
|
||||
p2p_hash_bin_region=NTC_P2P_HASH_BIN
|
||||
p2p_keywords_region=NTC_P2P_KEYWORDS
|
||||
voip_ip=av_voip_ip
|
||||
voip_account=av_voip_account
|
||||
ssl_sni_region=ssl_sni
|
||||
@@ -328,16 +332,16 @@ ssl_ip_region=ssl_ip
|
||||
bgp_ip_region=bgp_ip
|
||||
behav_id_region=BEHAV_ID
|
||||
rate_limit_region=RATE_LIMIT
|
||||
#存在与表达式的关键字特殊分隔符
|
||||
#\u5b58\u5728\u4e0e\u8868\u8fbe\u5f0f\u7684\u5173\u952e\u5b57\u7279\u6b8a\u5206\u9694\u7b26
|
||||
keyword_expr=***and***
|
||||
#时区
|
||||
#\u65f6\u533a
|
||||
time_zone=8
|
||||
#需要特殊处理的业务类型
|
||||
#\u9700\u8981\u7279\u6b8a\u5904\u7406\u7684\u4e1a\u52a1\u7c7b\u578b
|
||||
service_pxy_domain_intercept=513
|
||||
service_ip_mulitiplex=768
|
||||
service_ip_ratelimit=1057
|
||||
service_domain_ratelimit=1058
|
||||
#用户自定义域
|
||||
#\u7528\u6237\u81ea\u5b9a\u4e49\u57df
|
||||
userregion_rate_limit=RATE_LIMIT
|
||||
userregion_ir_strategy=IR_STRATEGY
|
||||
userregion_ir_type=IR_TYPE
|
||||
@@ -347,25 +351,25 @@ userregion_replace_type_key=zone
|
||||
userregion_replace_req_key_value=http_req_body
|
||||
userregion_replace_res_key_value=http_res_body
|
||||
userregion_replace_regex_key=regex
|
||||
#用户自定义域占位符
|
||||
#\u7528\u6237\u81ea\u5b9a\u4e49\u57df\u5360\u4f4d\u7b26
|
||||
user_region_placeholder=0
|
||||
#用户自定义域分隔符
|
||||
#\u7528\u6237\u81ea\u5b9a\u4e49\u57df\u5206\u9694\u7b26
|
||||
user_region_split=;
|
||||
#IP相关验证正则
|
||||
#IP\u76f8\u5173\u9a8c\u8bc1\u6b63\u5219
|
||||
ipv4_ip_subnet_regexp=^(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}/(3[0-2]|[1-2][0-9]|[0-9])$
|
||||
ipv6_ip_subnet_regexp=^\\s*((([0-9A-Fa-f]{1,4}\:){7}(([0-9A-Fa-f]{1,4})|\:))|(([0-9A-Fa-f]{1,4}\:){6}(\:|(\:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}\:){5}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){4}(\:[0-9A-Fa-f]{1,4}){0,1}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){3}(\:[0-9A-Fa-f]{1,4}){0,2}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){2}(\:[0-9A-Fa-f]{1,4}){0,3}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:)(\:[0-9A-Fa-f]{1,4}){0,4}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(\:(\:[0-9A-Fa-f]{1,4}){0,5}((\:)|((\:[0-9A-Fa-f]{1,4}){1,2}))))(%.+)?\\s*/(0|2|4|8|16|32|64|128)$
|
||||
ipv4_ip_range_regexp=^(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}-(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}$
|
||||
ipv6_ip_range_regexp=^\\s*((([0-9A-Fa-f]{1,4}\:){7}(([0-9A-Fa-f]{1,4})|\:))|(([0-9A-Fa-f]{1,4}\:){6}(\:|(\:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}\:){5}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){4}(\:[0-9A-Fa-f]{1,4}){0,1}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){3}(\:[0-9A-Fa-f]{1,4}){0,2}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){2}(\:[0-9A-Fa-f]{1,4}){0,3}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:)(\:[0-9A-Fa-f]{1,4}){0,4}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(\:(\:[0-9A-Fa-f]{1,4}){0,5}((\:)|((\:[0-9A-Fa-f]{1,4}){1,2}))))(%.+)?\\s*-\\s*((([0-9A-Fa-f]{1,4}\:){7}(([0-9A-Fa-f]{1,4})|\:))|(([0-9A-Fa-f]{1,4}\:){6}(\:|(\:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}\:){5}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){4}(\:[0-9A-Fa-f]{1,4}){0,1}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){3}(\:[0-9A-Fa-f]{1,4}){0,2}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){2}(\:[0-9A-Fa-f]{1,4}){0,3}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:)(\:[0-9A-Fa-f]{1,4}){0,4}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(\:(\:[0-9A-Fa-f]{1,4}){0,5}((\:)|((\:[0-9A-Fa-f]{1,4}){1,2}))))(%.+)?\\s*$
|
||||
ipv4_ip_regexp=^(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}$
|
||||
ipv6_ip_regexp=^\\s*((([0-9A-Fa-f]{1,4}\:){7}(([0-9A-Fa-f]{1,4})|\:))|(([0-9A-Fa-f]{1,4}\:){6}(\:|(\:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}\:){5}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){4}(\:[0-9A-Fa-f]{1,4}){0,1}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){3}(\:[0-9A-Fa-f]{1,4}){0,2}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){2}(\:[0-9A-Fa-f]{1,4}){0,3}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:)(\:[0-9A-Fa-f]{1,4}){0,4}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(\:(\:[0-9A-Fa-f]{1,4}){0,5}((\:)|((\:[0-9A-Fa-f]{1,4}){1,2}))))(%.+)?\\s*$
|
||||
#重定向业务自定义域相关参数
|
||||
#\u91cd\u5b9a\u5411\u4e1a\u52a1\u81ea\u5b9a\u4e49\u57df\u76f8\u5173\u53c2\u6570
|
||||
redirect_response_code_key=code
|
||||
redirect_url_key=url
|
||||
redirect_content_key=content
|
||||
redirect_response_code_startwith=30
|
||||
replace_zone_key=zone
|
||||
replace_substitute_key=substitute
|
||||
#样例文件上传的uri关键词
|
||||
#\u6837\u4f8b\u6587\u4ef6\u4e0a\u4f20\u7684uri\u5173\u952e\u8bcd
|
||||
sample_upload_url_keyword=/av
|
||||
digest_upload_url_keyword=/filetransfer
|
||||
|
||||
@@ -374,36 +378,36 @@ sample_total_file_max_size=12582912
|
||||
|
||||
#audio File Types
|
||||
audio_file_type=,mp4,flv,asf,wmv,avi,mpeg,mov,dat,m4v,m4p,m4b,webm,ogv,wav,mp3,
|
||||
#audio File Size 10M 10485760(single)
|
||||
#audio File Size 10M 10485760\uff08single\uff09
|
||||
audio_single_file_max_size=10485760
|
||||
#video File Types
|
||||
video_file_type=,mp4,flv,asf,wmv,avi,mpeg,mov,dat,m4v,m4p,m4b,webm,ogv,
|
||||
#video File Size 10M 10485760(single)
|
||||
#video File Size 10M 10485760\uff08single\uff09
|
||||
video_single_file_max_size=10485760
|
||||
#picture File Types
|
||||
picture_file_type=,bmp,jpg,tiff,raw,gif,
|
||||
#picture File Size 10M 10485760(single)
|
||||
#picture File Size 10M 10485760\uff08single\uff09
|
||||
picture_single_file_max_size=10485760
|
||||
#voip File Types
|
||||
voip_file_type=,mp3,mp4,flv,ivf,mp2v,jpg,
|
||||
#voip File Size 10M 10485760(single)
|
||||
#voip File Size 10M 10485760\uff08single\uff09
|
||||
voip_single_file_max_size=10485760
|
||||
|
||||
#digest File Types
|
||||
digest_file_type=,txt,doc,img,docx,pptx,xlsx,xls,ppt,
|
||||
#digest File Size 10M 10485760(single)
|
||||
#digest File Size 10M 10485760\uff08single\uff09
|
||||
digest_single_file_max_size=10485760
|
||||
#digest File Size 12M 12582912(total)
|
||||
#digest File Size 12M 12582912\uff08total\uff09
|
||||
digest_total_file_max_size=12582912
|
||||
#YSP文件保存路径
|
||||
#YSP\u6587\u4ef6\u4fdd\u5b58\u8def\u5f84
|
||||
#av_file_path=/home/ysp/
|
||||
av_file_path=D\:\\ysp\\
|
||||
#YSP文件特征类型
|
||||
#YSP\u6587\u4ef6\u7279\u5f81\u7c7b\u578b
|
||||
av_sample_audio_region=av_sample_audio
|
||||
av_sample_video_region=av_sample_video
|
||||
av_sample_picture_region=av_sample_picture
|
||||
av_sample_voip_region=av_sample_voip
|
||||
#样例文件生成程序
|
||||
#\u6837\u4f8b\u6587\u4ef6\u751f\u6210\u7a0b\u5e8f
|
||||
#audio_sample_create_proc=java -jar /home/sampleTest.jar
|
||||
#video_sample_create_proc=java -jar /home/sampleTest.jar
|
||||
#picture_sample_create_proc=java -jar /home/sampleTest.jar
|
||||
@@ -422,31 +426,34 @@ picture_sample_proc_param_is_quotation=false
|
||||
audio_sample_proc_param_is_translation=true
|
||||
video_sample_proc_param_is_translation=true
|
||||
picture_sample_proc_param_is_translation=true
|
||||
#http自定义域相关参数
|
||||
#http\u81ea\u5b9a\u4e49\u57df\u76f8\u5173\u53c2\u6570
|
||||
http_header_user_region_key=HTTP_HEADER
|
||||
http_header_dict_module=HTTP_HEADER_DISTRICT
|
||||
#dns自定义域参数key
|
||||
#dns\u81ea\u5b9a\u4e49\u57df\u53c2\u6570key
|
||||
dns_strategy_user_region_key=DNS_STRATEGY
|
||||
#特定服务类别
|
||||
#p2p\u81ea\u5b9a\u4e49\u57dfkey
|
||||
p2p_ip_type_user_region_key=P2P_IP_TYPE
|
||||
p2p_hash_type_user_region_key=P2P_HASH_TYPE
|
||||
#\u7279\u5b9a\u670d\u52a1\u7c7b\u522b
|
||||
specific_service_cfg_type_app=social_app
|
||||
specific_service_cfg_type_encrypted_tunnel_behavior=encrypted_tunnel_behavior
|
||||
specific_service_cfg_type_basic_protocol=basic_protocol
|
||||
#基础协议自定义域
|
||||
#\u57fa\u7840\u534f\u8bae\u81ea\u5b9a\u4e49\u57df
|
||||
proto_id_region=PROTO_ID
|
||||
#IP默认值
|
||||
#IP\u9ed8\u8ba4\u503c
|
||||
ipv4_default_ip_value=\:\:
|
||||
ipv4_default_ip_subnet_value=0.0.0.0/32
|
||||
ipv6_default_ip_subnet_value=::/64
|
||||
ipv4_default_ip_range_value=0.0.0.0-0.0.0.0
|
||||
ipv6_default_ip_range_value=::-::
|
||||
#端口默认值
|
||||
#\u7aef\u53e3\u9ed8\u8ba4\u503c
|
||||
port_default=0
|
||||
port_mask_default=0/65535
|
||||
#MAAT CFG 一些默认值
|
||||
#MAAT CFG \u4e00\u4e9b\u9ed8\u8ba4\u503c
|
||||
maat_cfg_dolog_default=1
|
||||
maat_cfg_dolog_doblacklist_default=1
|
||||
maat_cfg_dolog_configpercent_default=100
|
||||
maat_cfg_dolog_configoption_default=1
|
||||
#app,基础协议,特定服务的userregion分隔符
|
||||
#app\uff0c\u57fa\u7840\u534f\u8bae\uff0c\u7279\u5b9a\u670d\u52a1\u7684userregion\u5206\u9694\u7b26
|
||||
app_cfg_userregion_splitor=&
|
||||
app_id_region=APP_ID
|
||||
1
src/main/resources/sql/add_function_region_303.sql
Normal file
1
src/main/resources/sql/add_function_region_303.sql
Normal file
@@ -0,0 +1 @@
|
||||
INSERT INTO function_region_dict (function_id,config_region_code,config_region_value,config_desc,is_valid,is_maat,region_type) VALUES(303,1,'LIMIT_DOMAIN','域名限速',1,1,2)
|
||||
@@ -0,0 +1,7 @@
|
||||
ALTER TABLE function_region_dict ADD config_ip_port_show VARCHAR(10) NULL COMMENT '1,展示源IP/端口2;展示目目的IP/端口;使用逗号分隔';
|
||||
ALTER TABLE function_region_dict ADD config_ip_type VARCHAR(20) NULL COMMENT 'ip的类型,有4,6,46,64,10几种类型,使用逗号分隔';
|
||||
ALTER TABLE function_region_dict ADD config_ip_pattern VARCHAR(10) NULL COMMENT 'ip的格式 1:ip掩码;2:IP范围;3:IP;使用逗号分隔';
|
||||
ALTER TABLE function_region_dict ADD config_port_pattern VARCHAR(10) NULL COMMENT '端口的格式,1:port;2:port_mask;使用逗号分隔';
|
||||
ALTER TABLE function_region_dict ADD config_direction VARCHAR(10) NULL COMMENT 'IP方向0,双向;1,单向.使用逗号分隔';
|
||||
ALTER TABLE function_service_dict ADD region_code INT(11) NULL COMMENT 'function_region_dict 表中的config_region_code字段值';
|
||||
ALTER TABLE function_region_dict ADD config_protocol VARCHAR(20) NULL COMMENT '协议 0:任意;6:TCP;17:UDP;1:ICMP;50:ESP;51:AH';
|
||||
60
src/main/resources/sql/app_layer_header_cfg.sql
Normal file
60
src/main/resources/sql/app_layer_header_cfg.sql
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
Navicat MariaDB Data Transfer
|
||||
|
||||
Source Server : 10.0.6.249
|
||||
Source Server Version : 100214
|
||||
Source Host : 10.0.6.249:3306
|
||||
Source Database : gwall
|
||||
|
||||
Target Server Type : MariaDB
|
||||
Target Server Version : 100214
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 2018-08-20 20:40:02
|
||||
*/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for app_layer_header_cfg
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `app_layer_header_cfg`;
|
||||
CREATE TABLE `app_layer_header_cfg` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`district` varchar(128) NOT NULL,
|
||||
`cfg_keywords` varchar(1024) NOT NULL,
|
||||
`app_code` int(11) NOT NULL,
|
||||
`behav_code` int(11) DEFAULT NULL,
|
||||
`spec_service_id` varchar(255) NOT NULL COMMENT 'specific_service_cfg .spec_service_id',
|
||||
`cfg_desc` varchar(128) DEFAULT '',
|
||||
`action` int(11) NOT NULL COMMENT '1:阻æ–(reject)2:监测(monit)5:管控白åå•(Control whitelist)6:监测白åå•(monit whitelist)7:管控监测都白åå•(global whitelist)',
|
||||
`is_valid` int(11) NOT NULL COMMENT '0æ— æ•ˆï¼Œ1有效,-1åˆ é™¤\r\n1) æœªå®¡æ ¸æ—¶é…ç½®å¯åˆ 除\r\n2) å®¡æ ¸é€šè¿‡ï¼Œæ¤å—段置1\r\n3) å–æ¶ˆå®¡æ ¸é€šè¿‡ï¼Œæ¤å—段置0',
|
||||
`is_audit` int(11) NOT NULL COMMENT '0æœªå®¡æ ¸ï¼Œ1å®¡æ ¸é€šè¿‡ï¼Œ2å®¡æ ¸æœªé€šè¿‡ï¼Œ3å–æ¶ˆå®¡æ ¸é€šè¿‡\r\n1) å®¡æ ¸æœªé€šè¿‡ï¼Œé…ç½®å¯ä¿®æ”¹\r\n2) å®¡æ ¸é€šè¿‡ï¼Œé…ç½®ä¸å¯åˆ 除,åªèƒ½å–æ¶ˆå®¡æ ¸é€šè¿‡',
|
||||
`creator_id` int(11) NOT NULL COMMENT 'sys_user.id',
|
||||
`create_time` datetime NOT NULL,
|
||||
`editor_id` int(11) DEFAULT NULL COMMENT '来自sys_user.id',
|
||||
`edit_time` datetime DEFAULT NULL,
|
||||
`auditor_id` int(11) DEFAULT NULL COMMENT '来自sys_user.id',
|
||||
`audit_time` datetime DEFAULT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '业务id',
|
||||
`request_id` int(11) NOT NULL COMMENT '来自request_info.id',
|
||||
`compile_id` int(11) NOT NULL,
|
||||
`is_area_effective` int(11) NOT NULL DEFAULT 0,
|
||||
`classify` varchar(128) DEFAULT '',
|
||||
`attribute` varchar(128) DEFAULT '',
|
||||
`lable` varchar(128) DEFAULT '',
|
||||
`area_effective_ids` varchar(1024) DEFAULT '',
|
||||
`function_id` int(11) NOT NULL,
|
||||
`ratelimit` int(11) DEFAULT 0 COMMENT '限速比例',
|
||||
`cfg_type` varchar(64) NOT NULL DEFAULT '',
|
||||
`cfg_region_code` int(11) NOT NULL,
|
||||
`expr_type` int(11) NOT NULL DEFAULT 0 COMMENT '0:无表达式,1:与表达式',
|
||||
`match_method` int(11) NOT NULL DEFAULT 3 COMMENT 'expr_type:0时有意义,其它情况必须置0。0:子串匹配;1:右匹配;2:左匹配;3:完全匹配',
|
||||
`is_hexbin` int(11) NOT NULL DEFAULT 0 COMMENT '默认为0:大小写不敏感,且非HEX;1:HEX格式二进制;2:大小写敏感,且非HEX',
|
||||
`user_region1` varchar(1024) DEFAULT '' COMMENT '预留自定义域1',
|
||||
`user_region2` varchar(1024) DEFAULT '' COMMENT '预留自定义域2',
|
||||
`user_region3` varchar(1024) DEFAULT '' COMMENT '预留自定义域3',
|
||||
`user_region4` varchar(1024) DEFAULT '' COMMENT '预留自定义域4',
|
||||
`user_region5` varchar(1024) DEFAULT '' COMMENT '预留自定义域5',
|
||||
PRIMARY KEY (`cfg_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
60
src/main/resources/sql/app_ssl_cert_cfg.sql
Normal file
60
src/main/resources/sql/app_ssl_cert_cfg.sql
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
Navicat MariaDB Data Transfer
|
||||
|
||||
Source Server : 10.0.6.249
|
||||
Source Server Version : 100214
|
||||
Source Host : 10.0.6.249:3306
|
||||
Source Database : gwall
|
||||
|
||||
Target Server Type : MariaDB
|
||||
Target Server Version : 100214
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 2018-08-20 20:39:54
|
||||
*/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for app_ssl_cert_cfg
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `app_ssl_cert_cfg`;
|
||||
CREATE TABLE `app_ssl_cert_cfg` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`district` varchar(128) NOT NULL,
|
||||
`cfg_keywords` varchar(1024) NOT NULL,
|
||||
`app_code` int(11) NOT NULL,
|
||||
`behav_code` int(11) DEFAULT NULL,
|
||||
`spec_service_id` varchar(255) NOT NULL COMMENT 'specific_service_cfg .spec_service_id',
|
||||
`cfg_desc` varchar(128) DEFAULT '',
|
||||
`action` int(11) NOT NULL COMMENT '1:阻æ–(reject)2:监测(monit)5:管控白åå•(Control whitelist)6:监测白åå•(monit whitelist)7:管控监测都白åå•(global whitelist)',
|
||||
`is_valid` int(11) NOT NULL COMMENT '0æ— æ•ˆï¼Œ1有效,-1åˆ é™¤\r\n1) æœªå®¡æ ¸æ—¶é…ç½®å¯åˆ 除\r\n2) å®¡æ ¸é€šè¿‡ï¼Œæ¤å—段置1\r\n3) å–æ¶ˆå®¡æ ¸é€šè¿‡ï¼Œæ¤å—段置0',
|
||||
`is_audit` int(11) NOT NULL COMMENT '0æœªå®¡æ ¸ï¼Œ1å®¡æ ¸é€šè¿‡ï¼Œ2å®¡æ ¸æœªé€šè¿‡ï¼Œ3å–æ¶ˆå®¡æ ¸é€šè¿‡\r\n1) å®¡æ ¸æœªé€šè¿‡ï¼Œé…ç½®å¯ä¿®æ”¹\r\n2) å®¡æ ¸é€šè¿‡ï¼Œé…ç½®ä¸å¯åˆ 除,åªèƒ½å–æ¶ˆå®¡æ ¸é€šè¿‡',
|
||||
`creator_id` int(11) NOT NULL COMMENT 'sys_user.id',
|
||||
`create_time` datetime NOT NULL,
|
||||
`editor_id` int(11) DEFAULT NULL COMMENT '来自sys_user.id',
|
||||
`edit_time` datetime DEFAULT NULL,
|
||||
`auditor_id` int(11) DEFAULT NULL COMMENT '来自sys_user.id',
|
||||
`audit_time` datetime DEFAULT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '业务id',
|
||||
`request_id` int(11) NOT NULL COMMENT '来自request_info.id',
|
||||
`compile_id` int(11) NOT NULL,
|
||||
`is_area_effective` int(11) NOT NULL DEFAULT 0,
|
||||
`classify` varchar(128) DEFAULT '',
|
||||
`attribute` varchar(128) DEFAULT '',
|
||||
`lable` varchar(128) DEFAULT '',
|
||||
`area_effective_ids` varchar(1024) DEFAULT '',
|
||||
`function_id` int(11) NOT NULL,
|
||||
`ratelimit` int(11) DEFAULT 0 COMMENT '限速比例',
|
||||
`cfg_type` varchar(64) NOT NULL DEFAULT '',
|
||||
`cfg_region_code` int(11) NOT NULL,
|
||||
`expr_type` int(11) NOT NULL DEFAULT 0 COMMENT '0:无表达式,1:与表达式',
|
||||
`match_method` int(11) NOT NULL DEFAULT 3 COMMENT 'expr_type:0时有意义,其它情况必须置0。0:子串匹配;1:右匹配;2:左匹配;3:完全匹配',
|
||||
`is_hexbin` int(11) NOT NULL DEFAULT 0 COMMENT '默认为0:大小写不敏感,且非HEX;1:HEX格式二进制;2:大小写敏感,且非HEX',
|
||||
`user_region1` varchar(1024) DEFAULT '' COMMENT '预留自定义域1',
|
||||
`user_region2` varchar(1024) DEFAULT '' COMMENT '预留自定义域2',
|
||||
`user_region3` varchar(1024) DEFAULT '' COMMENT '预留自定义域3',
|
||||
`user_region4` varchar(1024) DEFAULT '' COMMENT '预留自定义域4',
|
||||
`user_region5` varchar(1024) DEFAULT '' COMMENT '预留自定义域5',
|
||||
PRIMARY KEY (`cfg_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
|
||||
12
src/main/resources/sql/function_region_dict_add_colunm.sql
Normal file
12
src/main/resources/sql/function_region_dict_add_colunm.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
alter table function_region_dict add config_multi_keywords varchar(2) COMMENT '是否可以多个关键字';
|
||||
alter table function_region_dict add config_hex varchar(20) COMMENT '十六进制 单选:0 非十六进制 大小不敏感 1 十六进制,大小写不敏感 2非十六进制 大小写敏感 默认为0';
|
||||
alter table function_region_dict add config_expr_type varchar(20) COMMENT '是否表达式 :单选 0 无表达式 1表达式 默认为0';
|
||||
alter table function_region_dict add config_match_method varchar(20) COMMENT '匹配方式 下拉 0:子串匹配;1:右匹配;2:左匹配;3:完全匹配 默认为0 expr_type:0时有意义,其它情况必须置0。';
|
||||
alter table function_region_dict add config_service_type varchar(50) COMMENT '域业务类型,domain,url,dns,
|
||||
|
||||
INSERT INTO function_region_dict (`function_id`, `config_region_code`, `config_region_value`, `config_district`, `config_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_maat`, `region_type`, `config_multi_keywords`, `config_hex`, `config_expr_type`, `config_match_method`) VALUES ('510', '3', 'NTC_P2P_KEYWORDS', '', 'p2p文件内容配置', '1', NULL, NULL, NULL, NULL, '1', '2', '1', '0,1,2', '0,1', '0,1,2,3');
|
||||
INSERT INTO function_region_dict (`function_id`, `config_region_code`, `config_region_value`, `config_district`, `config_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_maat`, `region_type`, `config_multi_keywords`, `config_hex`, `config_expr_type`, `config_match_method`) VALUES ('510', '2', 'NTC_SUBSCRIBE_ID', '', 'p2p subscribe配置', '1', NULL, NULL, NULL, NULL, '1', '2', '1', '0,1,2', '0,1', '0,1,2,3');
|
||||
INSERT INTO function_region_dict (`function_id`, `config_region_code`, `config_region_value`, `config_district`, `config_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_maat`, `region_type`, `config_multi_keywords`, `config_hex`, `config_expr_type`, `config_match_method`) VALUES ('510', '1', 'NTC_P2P_HASH_BIN', NULL, 'p2p hash配置', '1', NULL, NULL, NULL, NULL, '1', '2', '1', '1', '0,1', '0,1,2,3');
|
||||
INSERT INTO function_region_dict (`function_id`, `config_region_code`, `config_region_value`, `config_district`, `config_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_maat`, `region_type`, `config_multi_keywords`, `config_hex`, `config_expr_type`, `config_match_method`) VALUES ('510', '4', 'NTC_P2P_IP', NULL, 'p2p ip配置', '1', NULL, NULL, NULL, NULL, '1', '1', NULL, NULL, NULL, NULL);
|
||||
INSERT INTO function_region_dict (`config_service_type`, `config_multi_keywords`, `config_expr_type`, `config_hex`, `config_match_method`, `function_id`, `config_region_code`, `config_region_value`, `config_district`, `config_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_maat`, `region_type`) VALUES ('', '1', '0,1', '0,1,2', '0,1,2,3', '520', '1', 'APP_SSL_CERT', 'DV,OV,EV', 'APP SSL证书特征配置', '1', NULL, NULL, NULL, NULL, '1', '3');
|
||||
INSERT INTO function_region_dict (`config_service_type`, `config_multi_keywords`, `config_expr_type`, `config_hex`, `config_match_method`, `function_id`, `config_region_code`, `config_region_value`, `config_district`, `config_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `is_maat`, `region_type`) VALUES ('', '1', '0,1', '0,1,2', '0,1,2,3', '530', '1', 'APP_LAYER_HEADER', NULL, 'APP 报头特征配置', '1', NULL, NULL, NULL, NULL, '1', '3');
|
||||
@@ -0,0 +1,3 @@
|
||||
INSERT INTO function_service_dict (`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`) VALUES ('510', '0', '16', 'reject', '34', 'p2p_reject', NULL, '1', NULL, NULL, NULL, NULL);
|
||||
INSERT INTO function_service_dict (`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`) VALUES ('520', '0', '1', 'monit', '1029', 'app_ssl_cert_feature_monit', NULL, '1', NULL, NULL, NULL, NULL);
|
||||
INSERT INTO function_service_dict (`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`) VALUES ('530', '0', '1', 'monit', '1031', 'app_header_feature_monit', NULL, '1', NULL, NULL, NULL, NULL);
|
||||
55
src/main/resources/sql/p2p_hash_cfg.sql
Normal file
55
src/main/resources/sql/p2p_hash_cfg.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
Navicat MariaDB Data Transfer
|
||||
|
||||
Source Server : 10.0.6.249
|
||||
Source Server Version : 100214
|
||||
Source Host : 10.0.6.249:3306
|
||||
Source Database : gwall
|
||||
|
||||
Target Server Type : MariaDB
|
||||
Target Server Version : 100214
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 2018-08-18 21:11:12
|
||||
*/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for p2p_hash_cfg
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `p2p_hash_cfg`;
|
||||
CREATE TABLE `p2p_hash_cfg` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
|
||||
`cfg_desc` varchar(128) DEFAULT NULL,
|
||||
`cfg_keywords` varchar(64) NOT NULL,
|
||||
`action` int(11) NOT NULL COMMENT '1:阻断,2:监测, 5: FD 白名单,6:监测白名单,7: FD 监测都白名单,应与业务ID所代表的逻辑相匹配,8-灰名单',
|
||||
`is_valid` int(11) NOT NULL COMMENT '0无效,1有效,-1删除;1) 未审核时配置可删除;2) 审核通过,此字段置1;3) 取消审核通过,此字段置0',
|
||||
`is_audit` int(11) NOT NULL COMMENT '0未审核,1审核通过,2审核未通过,3取消审核通过;1) 审核未通过,配置可修改;2) 审核通过,配置不可删除,只能取消审核通过',
|
||||
`creator_id` int(11) NOT NULL COMMENT '取自sys_user.id',
|
||||
`create_time` datetime NOT NULL,
|
||||
`editor_id` int(11) DEFAULT NULL COMMENT '取自sys_user.id',
|
||||
`edit_time` datetime DEFAULT NULL,
|
||||
`auditor_id` int(11) DEFAULT NULL COMMENT '取自sys_user.id',
|
||||
`audit_time` datetime DEFAULT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '参考系统业务类型管理表',
|
||||
`request_id` int(11) NOT NULL COMMENT '取自request_info.id',
|
||||
`compile_id` int(11) NOT NULL COMMENT '取自服务接口返回的maat配置的编译id,配置初始入库时获取。',
|
||||
`is_area_effective` int(11) NOT NULL COMMENT '0否,1是',
|
||||
`classify` varchar(128) DEFAULT NULL COMMENT '分类id,多个用英文逗号分隔',
|
||||
`attribute` varchar(128) DEFAULT NULL COMMENT '性质id,多个用英文逗号分隔',
|
||||
`lable` varchar(128) DEFAULT NULL COMMENT '标签id,多个用英文逗号分隔',
|
||||
`expr_type` int(11) NOT NULL COMMENT '0:无表达式,1:与表达式',
|
||||
`match_method` int(11) NOT NULL COMMENT 'expr_type:0时有意义,其它情况必须置0。0:子串匹配;1:右匹配;2:左匹配;3:完全匹配',
|
||||
`is_hexbin` int(11) NOT NULL COMMENT '默认为0:大小写不敏感,且非HEX;1:HEX格式二进制;2:大小写敏感,且非HEX',
|
||||
`area_effective_ids` varchar(1024) DEFAULT NULL COMMENT '多个英文逗号分隔',
|
||||
`function_id` int(11) DEFAULT NULL,
|
||||
`cfg_region_code` int(11) DEFAULT NULL,
|
||||
`cfg_type` varchar(64) DEFAULT NULL,
|
||||
`user_region1` varchar(1024) DEFAULT '' COMMENT '预留自定义域1',
|
||||
`user_region2` varchar(1024) DEFAULT '' COMMENT '预留自定义域2',
|
||||
`user_region3` varchar(1024) DEFAULT '' COMMENT '预留自定义域3',
|
||||
`user_region4` varchar(1024) DEFAULT '' COMMENT '预留自定义域4',
|
||||
`user_region5` varchar(1024) DEFAULT '' COMMENT '预留自定义域5',
|
||||
PRIMARY KEY (`cfg_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
|
||||
55
src/main/resources/sql/p2p_keyword_cfg.sql
Normal file
55
src/main/resources/sql/p2p_keyword_cfg.sql
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
Navicat MariaDB Data Transfer
|
||||
|
||||
Source Server : 10.0.6.249
|
||||
Source Server Version : 100214
|
||||
Source Host : 10.0.6.249:3306
|
||||
Source Database : gwall
|
||||
|
||||
Target Server Type : MariaDB
|
||||
Target Server Version : 100214
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 2018-08-18 21:11:57
|
||||
*/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for p2p_keyword_cfg
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `p2p_keyword_cfg`;
|
||||
CREATE TABLE `p2p_keyword_cfg` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
|
||||
`cfg_desc` varchar(128) DEFAULT NULL,
|
||||
`cfg_keywords` varchar(64) NOT NULL,
|
||||
`action` int(11) NOT NULL COMMENT '1:阻断,2:监测, 5: FD 白名单,6:监测白名单,7: FD 监测都白名单,应与业务ID所代表的逻辑相匹配,8-灰名单',
|
||||
`is_valid` int(11) NOT NULL COMMENT '0无效,1有效,-1删除;1) 未审核时配置可删除;2) 审核通过,此字段置1;3) 取消审核通过,此字段置0',
|
||||
`is_audit` int(11) NOT NULL COMMENT '0未审核,1审核通过,2审核未通过,3取消审核通过;1) 审核未通过,配置可修改;2) 审核通过,配置不可删除,只能取消审核通过',
|
||||
`creator_id` int(11) NOT NULL COMMENT '取自sys_user.id',
|
||||
`create_time` datetime NOT NULL,
|
||||
`editor_id` int(11) DEFAULT NULL COMMENT '取自sys_user.id',
|
||||
`edit_time` datetime DEFAULT NULL,
|
||||
`auditor_id` int(11) DEFAULT NULL COMMENT '取自sys_user.id',
|
||||
`audit_time` datetime DEFAULT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '参考系统业务类型管理表',
|
||||
`request_id` int(11) NOT NULL COMMENT '取自request_info.id',
|
||||
`compile_id` int(11) NOT NULL COMMENT '取自服务接口返回的maat配置的编译id,配置初始入库时获取。',
|
||||
`is_area_effective` int(11) NOT NULL COMMENT '0否,1是',
|
||||
`classify` varchar(128) DEFAULT NULL COMMENT '分类id,多个用英文逗号分隔',
|
||||
`attribute` varchar(128) DEFAULT NULL COMMENT '性质id,多个用英文逗号分隔',
|
||||
`lable` varchar(128) DEFAULT NULL COMMENT '标签id,多个用英文逗号分隔',
|
||||
`expr_type` int(11) NOT NULL COMMENT '0:无表达式,1:与表达式',
|
||||
`match_method` int(11) NOT NULL COMMENT 'expr_type:0时有意义,其它情况必须置0。0:子串匹配;1:右匹配;2:左匹配;3:完全匹配',
|
||||
`is_hexbin` int(11) NOT NULL COMMENT '默认为0:大小写不敏感,且非HEX;1:HEX格式二进制;2:大小写敏感,且非HEX',
|
||||
`area_effective_ids` varchar(1024) DEFAULT NULL COMMENT '多个英文逗号分隔',
|
||||
`function_id` int(11) DEFAULT NULL,
|
||||
`cfg_region_code` int(11) DEFAULT NULL,
|
||||
`cfg_type` varchar(64) DEFAULT NULL,
|
||||
`user_region1` varchar(1024) DEFAULT '' COMMENT '预留自定义域1',
|
||||
`user_region2` varchar(1024) DEFAULT '' COMMENT '预留自定义域2',
|
||||
`user_region3` varchar(1024) DEFAULT '' COMMENT '预留自定义域3',
|
||||
`user_region4` varchar(1024) DEFAULT '' COMMENT '预留自定义域4',
|
||||
`user_region5` varchar(1024) DEFAULT '' COMMENT '预留自定义域5',
|
||||
PRIMARY KEY (`cfg_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
|
||||
@@ -0,0 +1 @@
|
||||
alter table task_info add do_log int(11) COMMENT 'do_log:0不需要1记录所有日志2只记录结构化日志。默认是2'
|
||||
17
src/main/resources/sql/update_function_region_dict_data.sql
Normal file
17
src/main/resources/sql/update_function_region_dict_data.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
#ip地址
|
||||
UPDATE function_service_dict SET region_code=1 WHERE function_id=5 AND ACTION IN(16,1);
|
||||
UPDATE function_service_dict SET region_code=2 WHERE function_id=5 AND ACTION IN(32,96);
|
||||
UPDATE function_region_dict SET config_ip_port_show='1,2' ,config_ip_type='4,6,46,64,10',config_ip_pattern='1,2,3',config_port_pattern='1,2',config_direction='0,1',config_protocol='0,6,17' WHERE dict_id=27;
|
||||
UPDATE function_region_dict SET config_service_type='ipaddr',config_ip_port_show='1,2' ,config_ip_type='4,6,46,64,10',config_ip_pattern='1,2,3',config_port_pattern='1,2',config_direction='0,1',config_protocol='0,6,17,1' WHERE dict_id=35;
|
||||
#ip限流
|
||||
UPDATE function_service_dict SET region_code=1 WHERE function_id=302 AND ACTION IN(64);
|
||||
UPDATE function_region_dict SET config_service_type='ratelimit',config_ip_port_show='1,2' ,config_ip_type='4,6,46,64,10',config_ip_pattern='1,2,3',config_port_pattern='1,2',config_direction='0,1',config_protocol='0,6,17' WHERE dict_id=67;
|
||||
#IP复用策略
|
||||
UPDATE function_service_dict SET region_code=1 WHERE function_id=300 AND ACTION IN(96);
|
||||
UPDATE function_region_dict SET config_service_type='ipmulitiplex',config_ip_port_show='1' ,config_ip_type='4,6',config_ip_pattern='1,2,3',config_port_pattern='1,2',config_direction='0,1',config_protocol='0,6,17' WHERE dict_id=68;
|
||||
#IP拦截
|
||||
UPDATE function_service_dict SET region_code=1 WHERE function_id=200 AND ACTION IN(1,128,64,80);
|
||||
UPDATE function_region_dict SET config_service_type='ratelimit',config_ip_port_show='1,2' ,config_ip_type='4,6,46,64,10',config_ip_pattern='1,2,3',config_port_pattern='1,2',config_direction='0,1',config_protocol='0,6,17' WHERE dict_id=53;
|
||||
#音视频IP
|
||||
UPDATE function_service_dict SET region_code=2 WHERE function_id=20 AND ACTION IN(1,16);
|
||||
UPDATE function_region_dict SET config_ip_port_show='1,2' ,config_ip_type='4,6,46,64,10',config_ip_pattern='1,2,3',config_port_pattern='1,2',config_direction='0,1',config_protocol='0,6,17' WHERE dict_id=17;
|
||||
@@ -2,4 +2,11 @@
|
||||
\u4FEE\u6539\u5B57\u5178LOG_STREAM_TYPE\uFF0C\u5C06\u6807\u8BC60\u30011\u30012\u6539\u4E3A1\u30012\u30013
|
||||
|
||||
2018-08-03
|
||||
\u589E\u52A0\u5B57\u5178ATTACK_TYPE\uFF0C\u4F9D\u636E\u534F\u8BAE\u7EDF\u8BA1\u5DF2\u6709\u7C7B\u578B \uFF1AUDP-Flood: 1069 \uFF0CSYN-Flood: 1070
|
||||
\u589E\u52A0\u5B57\u5178ATTACK_TYPE\uFF0C\u4F9D\u636E\u534F\u8BAE\u7EDF\u8BA1\u5DF2\u6709\u7C7B\u578B \uFF1AUDP-Flood: 1069 \uFF0CSYN-Flood: 1070
|
||||
|
||||
2018-08-20\uFF08do_log:0\u4E0D\u9700\u89811\u8BB0\u5F55\u6240\u6709\u65E5\u5FD72\u53EA\u8BB0\u5F55\u7ED3\u6784\u5316\u65E5\u5FD7\u3002\u9ED8\u8BA4\u662F2\uFF09
|
||||
\u65B0\u589E\u662F\u5426\u8BB0\u5F55\u65E5\u5FD7 DO_LOG
|
||||
\u6807\u8BC6 \u503C describe \u662F\u5426\u53EF\u7528 \u662F\u5426\u53EF\u7EF4\u62A4
|
||||
0 no_log \u4E0D\u8BB0\u5F55\u65E5\u5FD7 \u662F \u662F
|
||||
1 all_log \u8BB0\u5F55\u6240\u6709\u65E5\u5FD7 \u662F \u662F
|
||||
2 framework_log \u53EA\u8BB0\u5F55\u7ED3\u6784\u5316\u65E5\u5FD7
|
||||
@@ -2,7 +2,7 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
console.log("调用须知:调用本页面函数在common.js里,并且需要配置字典MAAT_SERVICE中的项")
|
||||
//console.log("调用须知:调用本页面函数在common.js里,并且需要配置字典MAAT_SERVICE中的项")
|
||||
});
|
||||
</script>
|
||||
<div class="modal fade" id="import_modal" tabindex="-1" role="dialog" aria-labelledby="mo" aria-hidden="true">
|
||||
|
||||
@@ -6,7 +6,7 @@ $(function(){
|
||||
});
|
||||
|
||||
</script>
|
||||
<div class="row">
|
||||
<div class="row areaInfo">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_area_block"/></label>
|
||||
|
||||
@@ -1,115 +1,256 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<h3 class="form-section"><spring:message code="block_config"/></h3>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode }">
|
||||
<input type="hidden" name="configMultiKeywords" value="${region.configRegionCode }">
|
||||
</head>
|
||||
<c:if test="${!empty region.configDistrict }">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="district" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="district"
|
||||
class="selectpicker show-tick form-control required district" onchange="changeDistrict($(this))">
|
||||
<c:forEach items="${fn:split(region.configDistrict,',')}"
|
||||
var="_district">
|
||||
<option value="${_district }"
|
||||
<c:if test="${_cfg.district==_district}">selected</c:if>>${_district }</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="hidden" name="districtShowName" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control" value="${_cfg.district}"/>
|
||||
</div>
|
||||
<div for="district"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
<div for="cfgDesc"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="key_word"/></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required" type="text" name="keywords" value="${_cfg.keywords}">
|
||||
</div>
|
||||
<div for="keywords"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="keywords" /></label>
|
||||
<!-- 此配置的关键词可以输入多个关键词 -->
|
||||
<c:if test="${region.configMultiKeywords eq 1}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required tags" type="text" id="tags_${tabName}"
|
||||
name="cfgKeywords"
|
||||
value="${_cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- 此配置的关键词不允许输入多个关键词 -->
|
||||
<c:if test="${(region.configMultiKeywords eq 0) or (empty region.configMultiKeywords)}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required invisibleChar" type="text"
|
||||
name="cfgKeywords"
|
||||
value="${_cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<div for="cfgKeywords"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="exprType" value="1" class="required"
|
||||
<c:if test="${_cfg.exprType==1}">checked</c:if>
|
||||
><spring:message code="and_expression"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="exprType" value="0" class="required"
|
||||
<c:if test="${_cfg.exprType==0}">checked</c:if>
|
||||
><spring:message code="null_expression"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="exprType"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="matchMethod" class="selectpicker select2 form-control required" >
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
|
||||
<option value="3" <c:if test="${_cfg.matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:if test="${!empty region.configExprType}">
|
||||
<c:forEach var="exprType" items="${fn:split(region.configExprType,',')}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq exprType}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprType }"
|
||||
class="required"
|
||||
<c:if test="${_cfg.exprType eq exprType || (empty _cfg.exprType && exprType eq 0)}">
|
||||
checked
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configExprType}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq 0}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprTypeC.itemCode }"
|
||||
class="required" checked >
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</div>
|
||||
<div for="exprType"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="matchMethod"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:if test="${!empty region.configMatchMethod}">
|
||||
<c:forEach var="matchMethod" items="${fn:split(region.configMatchMethod,',')}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq matchMethod}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
<c:if test="${_cfg.matchMethod eq matchMethod || (empty _cfg.matchMethod && matchMethod eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configMatchMethod}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq 0}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
selected
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="1" class="required"
|
||||
><spring:message code="hex"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required"
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="1" class="required"
|
||||
><spring:message code="case_senstive"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required"
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required" checked
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required"
|
||||
checked
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="whether_hexbinary" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="isHexbin"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<c:forEach var="isHexbin" items="${fn:split(region.configHex,',')}">
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq isHexbin}">
|
||||
<option value="${isHexbinC.itemCode}"
|
||||
<c:if test="${_cfg.isHexbin eq isHexbin || (empty _cfg.isHexbin && isHexbin eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq 0}">
|
||||
<option value="${isHexbinC.itemCode}" selected >
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div for="isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="isHexbin" class="selectpicker select2 form-control required">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${_cfg.isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
|
||||
<option value="1" <c:if test="${_cfg.isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
|
||||
<option value="2" <c:if test="${_cfg.isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for="isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_area_block"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="1" class="required"
|
||||
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
|
||||
<c:if test="${action==2}">disabled</c:if>
|
||||
><spring:message code="yes"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isAreaEffective" value="0" class="required"
|
||||
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
|
||||
<c:if test="${action==2}">disabled</c:if>
|
||||
><spring:message code="no"/>
|
||||
</label>
|
||||
<c:if test="${action==2}">
|
||||
<input class="form-control" type="hidden" name="isAreaEffective" value="${_cfg.isAreaEffective}">
|
||||
</c:if>
|
||||
</div>
|
||||
<div for="isAreaEffective"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="hidden areaType col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="area_control_type"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="areaType" value="1" class="required"><spring:message code="area"/> <spring:message code="isp"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="areaType" value="0" class="required"><spring:message code="area"/> ip
|
||||
</label>
|
||||
</div>
|
||||
<div for="areaType"></div>
|
||||
<input class="form-control" type="hidden" name="areaEffectiveIds" value="${_cfg.areaEffectiveIds}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--/row-->
|
||||
</html>
|
||||
<script type="text/javascript">
|
||||
function changeDistrict(obj){
|
||||
if("others"==obj.val()){
|
||||
obj.parent().siblings(".otherValue").prop("type","text");
|
||||
}else{
|
||||
obj.parent().siblings(".otherValue").prop("type","hidden");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -23,22 +23,6 @@
|
||||
<div for="ipType"></div>
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="${specialProtocol!=null and specialProtocol eq 'ipsec'}">
|
||||
<div class="col-md-6 ipsec">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="protocol" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('IPSEC_PROTOCOL')}" var="protocolC">
|
||||
<option value="${protocolC.itemCode}" <c:if test="${_cfg.protocol==protocolC.itemCode || (_cfg.protocol==null && protocolC.itemCode==0)}">selected</c:if>><spring:message code="${protocolC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="hidden" name="protocolId" value="0">
|
||||
</div>
|
||||
<div for="protocol"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
@@ -130,37 +114,20 @@
|
||||
<div class="row protocol">
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<c:choose>
|
||||
<c:when test="${specialProtocol!=null and specialProtocol eq 'tunnel'}">
|
||||
<c:forEach items="${fns:getDictList('TUNNEL_PROTOCOL')}" var="protocolC">
|
||||
<c:if test="${protocolC.itemValue eq 'default'}">
|
||||
<input type="hidden" name="protocol" value="${protocolC.itemCode}">
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<c:if test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="hidden" name="protocolId" value="${service.protocolId }">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:when>
|
||||
<c:when test="${specialProtocol!=null and specialProtocol eq 'ipsec'}"></c:when>
|
||||
<c:otherwise>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="protocol" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="protocolC">
|
||||
<option value="${protocolC.itemCode}" <c:if test="${_cfg.protocol==protocolC.itemCode || (_cfg.protocol==null && protocolC.itemCode==0)}">selected</c:if>><spring:message code="${protocolC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="hidden" name="protocolId" value="0">
|
||||
</div>
|
||||
<div for="protocol"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="protocol" class="selectpicker show-tick form-control required">
|
||||
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="protocolC">
|
||||
<option value="${protocolC.itemCode}" <c:if test="${_cfg.protocol==protocolC.itemCode || (_cfg.protocol==null && protocolC.itemCode==0)}">selected</c:if>><spring:message code="${protocolC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="hidden" name="protocolId" value="0">
|
||||
</div>
|
||||
<div for="protocol"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="direction"/></label>
|
||||
|
||||
@@ -15,21 +15,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="isHexbin" class="selectpicker select2 form-control required" >
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<option value="${isHexbinC.itemCode}" <c:if test="${_cfg.isHexbin==isHexbinC.itemCode || (_cfg.matchMethod==null && isHexbinC.itemCode==0)}">selected</c:if>><spring:message code="${isHexbinC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
|
||||
<div class="col-md-6">
|
||||
@@ -47,6 +32,8 @@
|
||||
<div for="exprType"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
|
||||
@@ -60,6 +47,60 @@
|
||||
<div for="matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="1" class="required"
|
||||
<c:if test="${_cfg.isHexbin eq 1}">checked</c:if>
|
||||
><spring:message code="hex"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required"
|
||||
<c:if test="${_cfg.isHexbin ne 1}">checked</c:if>
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="1" class="required"
|
||||
<c:if test="${_cfg.isHexbin==1}">checked</c:if>
|
||||
><spring:message code="case_senstive"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required"
|
||||
<c:if test="${_cfg.isHexbin ne 1}">checked</c:if>
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="isHexbin" class="selectpicker select2 form-control required" >
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<option value="${isHexbinC.itemCode}" <c:if test="${_cfg.isHexbin==isHexbinC.itemCode || (_cfg.matchMethod==null && isHexbinC.itemCode==0)}">selected</c:if>><spring:message code="${isHexbinC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -92,9 +92,7 @@
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js"></script>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<script>
|
||||
document.write('<script src="${pageContext.request.contextPath}/static/global/scripts/common.js?ran='+Math.random() + '" type="text/javascript">\<\/script\>');
|
||||
</script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/scripts/common.js" type="text/javascript"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/scripts/jquery.tagsinput.js" type="text/javascript"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/scripts/app.js" type="text/javascript"></script>
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<mapping path="/nis/report/ajax*" exclue="true"/>
|
||||
<mapping path="/nis/basicprotocol/ajax*" exclue="true"/>
|
||||
<mapping path="/nis/encryptedtunnelbehav/ajax*" exclue="true"/>
|
||||
<mapping path="/nis/ntc/av/ajax*" exclue="true"/>
|
||||
<!-- 对同一路径,启用多个装饰器 -->
|
||||
<mapping>
|
||||
<path>/articles/*</path>
|
||||
|
||||
@@ -174,6 +174,8 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
}
|
||||
if(url.indexOf("?isAudit") > 1){
|
||||
loading('<spring:message code="onloading"/>');
|
||||
}else if(url.indexOf("export") > 1){
|
||||
closeTip();
|
||||
}
|
||||
//$("#searchForm").submit();
|
||||
}
|
||||
@@ -236,12 +238,14 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
if(v=="ok"){
|
||||
$("#searchForm").attr("action",url);
|
||||
$("#searchForm").submit();
|
||||
closeTip();
|
||||
}
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
}else{
|
||||
$("#searchForm").attr("action",url);
|
||||
$("#searchForm").submit();
|
||||
closeTip();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,10 +26,9 @@
|
||||
<%@ attribute name="showParentName" type="java.lang.String" required="false" description="显示父类名称"%>
|
||||
<%@ attribute name="checkedPS" type="java.lang.String" required="false" description="复选框选中时是否关联父子节点,ps关联父子,p关联父,s关联子,都不关联为空"%>
|
||||
<%@ attribute name="unCheckedPS" type="java.lang.String" required="false" description="复选框取消选中时是否关联父子节点,ps关联父子,p关联父,s关联子,都不关联为空"%>
|
||||
<%@ attribute name="rootNodeName" type="java.lang.String" required="false" description="根节点显示的名称"%>
|
||||
<div class="input-group">
|
||||
<input id="${id}Id" name="${name}" class="${cssClass} singleClass" type="hidden" value="${value}" />
|
||||
<input id="${id}Name" name="${labelName}" ${allowInput?'':'readonly="readonly"'} type="text" value="<spring:message code='${labelValue}'/>" data-msg-required="${dataMsgRequired}" placeholder="${value}"
|
||||
<input id="${id}Name" name="${labelName}" ${allowInput?'':'readonly="readonly"'} type="text" value="<spring:message code='${empty value?"":labelValue}'/>" data-msg-required="${dataMsgRequired}" placeholder="${empty value?labelValue:value}"
|
||||
class="${cssClass}" style="${cssStyle} background-color:transparent"/>
|
||||
|
||||
<div class="input-group-btn">
|
||||
@@ -50,7 +49,7 @@
|
||||
ajaxData:{selectIds: $("#${id}Id").val()},buttons:{"<spring:message code='ok'/>":"ok", "<spring:message code='clear'/>":"clear","<spring:message code='close'/>":true}, submit:function(v, h, f){
|
||||
if (v == "ok"){
|
||||
var tree = h.find("iframe")[0].contentWindow.tree;//h.find("iframe").contents();
|
||||
var ids = [], names = [], nodes = [],types =[];
|
||||
var ids = [], names = [], nodes = [];
|
||||
if ("${checked}" == "true"){
|
||||
nodes = tree.getCheckedNodes(true);
|
||||
}else{
|
||||
@@ -101,23 +100,32 @@
|
||||
|
||||
}//</c:if><c:if test="${!showParentName}">
|
||||
names.push(nodes[i].name);
|
||||
if(nodes[i].type){
|
||||
types.push(nodes[i].type);
|
||||
}
|
||||
//if(nodes[i].type){
|
||||
// types.push(nodes[i].type);
|
||||
//}
|
||||
//</c:if><c:if test="${!checked}">
|
||||
break; // 如果为非复选框选择,则返回第一个选择 </c:if>
|
||||
}
|
||||
|
||||
if((nodes.length==1)&&(nodes[0].level == 0)&&('true'=='${notAllowSelectRoot}')){
|
||||
top.$.jBox.tip("<spring:message code='no_root'/>("+nodes[0].name+")<spring:message code='reselect'/>");
|
||||
return false;
|
||||
}
|
||||
$("#${id}Id").val(ids.join(",").replace(/u_/ig,""));
|
||||
//if(types.length>0){
|
||||
// $("#${id}Id").attr('cfgtype',types.join(","));
|
||||
//}
|
||||
$("#${id}Id").change();//手动触发change事件,使Id的值得变化可以被监听到
|
||||
$("#${id}Name").val(names.join(","));
|
||||
if(!$("#${id}Name").val()&&'${value}'){//如果值不存在,但是value却有值,将placeholder清空
|
||||
$("#${id}Name").attr("placeholder","");
|
||||
}
|
||||
}else if (v == "clear"){
|
||||
$("#${id}Id").val("");
|
||||
//$("#${id}Id").removeAttr('cfgtype');
|
||||
$("#${id}Id").change();//手动触发change事件,使Id的值得变化可以被监听到
|
||||
$("#${id}Name").val("");
|
||||
$("#${id}Name").attr("placeholder","");
|
||||
}
|
||||
if(typeof ${id}TreeselectCallBack == 'function'){
|
||||
${id}TreeselectCallBack(v, h, f);
|
||||
|
||||
@@ -74,20 +74,14 @@ $(function(){
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
|
||||
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
|
||||
<input type="hidden" id="isHexbin" name="isHexbin" value="1">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<c:set var="spec_service_id"><spring:message code="social_app"/></c:set>
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="social_app"/></label>
|
||||
<div class="col-md-6">
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${_cfg.specServiceId}"
|
||||
@@ -139,21 +133,6 @@ $(function(){
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="matchMethod"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<option value="${matchMethodC.itemCode}" <c:if test="${_cfg.matchMethod==matchMethodC.itemCode || (_cfg.matchMethod==null && matchMethodC.itemCode==0)}">selected</c:if>><spring:message code="${matchMethodC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
@@ -167,29 +146,201 @@ $(function(){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:if test="${!empty region.configExprType}">
|
||||
<c:forEach var="exprType" items="${fn:split(region.configExprType,',')}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq exprType}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprType }"
|
||||
class="required"
|
||||
<c:if test="${_cfg.exprType eq exprType || (empty _cfg.exprType && exprType eq 0)}">
|
||||
checked
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configExprType}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq 0}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprTypeC.itemCode }"
|
||||
class="required" checked >
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</div>
|
||||
<div for="exprType"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="matchMethod"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:if test="${!empty region.configMatchMethod}">
|
||||
<c:forEach var="matchMethod" items="${fn:split(region.configMatchMethod,',')}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq matchMethod}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
<c:if test="${_cfg.matchMethod eq matchMethod || (empty _cfg.matchMethod && matchMethod eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configMatchMethod}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq 0}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
selected
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="1" class="required"
|
||||
><spring:message code="hex"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required"
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="1" class="required"
|
||||
><spring:message code="case_senstive"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required"
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required" checked
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required"
|
||||
checked
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<spring:message code="whether_hexbinary" /></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline hidden"> <input type="radio"
|
||||
name="exprType" value="1"
|
||||
class="required"
|
||||
<c:if test="${_cfg.exprType==1}">checked</c:if>> <spring:message
|
||||
code="and_expression" />
|
||||
</label> <label class="radio-inline"> <input type="radio"
|
||||
name="exprType" value="0"
|
||||
class="required"
|
||||
<c:if test="${_cfg.exprType==0 || _cfg.exprType==null}">checked</c:if>>
|
||||
<spring:message code="null_expression" />
|
||||
</label>
|
||||
<select name="isHexbin"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<c:forEach var="isHexbin" items="${fn:split(region.configHex,',')}">
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq isHexbin}">
|
||||
<option value="${isHexbinC.itemCode}"
|
||||
<c:if test="${_cfg.isHexbin eq isHexbin || (empty _cfg.isHexbin && isHexbin eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq 0}">
|
||||
<option value="${isHexbinC.itemCode}" selected >
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="exprType"></div>
|
||||
<div for="isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<%-- <div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
@@ -75,17 +75,11 @@ $(function(){
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
|
||||
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<c:set var="spec_service_id"><spring:message code="social_app"/></c:set>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="social_app"/></label>
|
||||
<div class="col-md-6">
|
||||
@@ -151,6 +145,159 @@ $(function(){
|
||||
<div for="domain"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:if test="${!empty region.configExprType}">
|
||||
<c:forEach var="exprType" items="${fn:split(region.configExprType,',')}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq exprType}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprType }"
|
||||
class="required"
|
||||
<c:if test="${_cfg.exprType eq exprType || (empty _cfg.exprType && exprType eq 0)}">
|
||||
checked
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configExprType}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq 0}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprTypeC.itemCode }"
|
||||
class="required" checked >
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</div>
|
||||
<div for="exprType"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="matchMethod"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:if test="${!empty region.configMatchMethod}">
|
||||
<c:forEach var="matchMethod" items="${fn:split(region.configMatchMethod,',')}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq matchMethod}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
<c:if test="${_cfg.matchMethod eq matchMethod || (empty _cfg.matchMethod && matchMethod eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configMatchMethod}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq 0}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
selected
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="1" class="required"
|
||||
><spring:message code="hex"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required"
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="1" class="required"
|
||||
><spring:message code="case_senstive"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required"
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required" checked
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required"
|
||||
checked
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
@@ -158,53 +305,41 @@ $(function(){
|
||||
<div class="col-md-6">
|
||||
<select name="isHexbin"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<option value="${isHexbinC.itemCode}" <c:if test="${_cfg.isHexbin==isHexbinC.itemCode || (_cfg.isHexbin==null && isHexbinC.itemCode==0)}">selected</c:if>><spring:message code="${isHexbinC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<c:forEach var="isHexbin" items="${fn:split(region.configHex,',')}">
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq isHexbin}">
|
||||
<option value="${isHexbinC.itemCode}"
|
||||
<c:if test="${_cfg.isHexbin eq isHexbin || (empty _cfg.isHexbin && isHexbin eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq 0}">
|
||||
<option value="${isHexbinC.itemCode}" selected >
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline"> <input type="radio"
|
||||
name="exprType" value="1"
|
||||
class="required"
|
||||
<c:if test="${_cfg.exprType==1}">checked</c:if>> <spring:message
|
||||
code="and_expression" />
|
||||
</label> <label class="radio-inline"> <input type="radio"
|
||||
name="exprType" value="0"
|
||||
class="required"
|
||||
<c:if test="${_cfg.exprType==0 || _cfg.exprType==null}">checked</c:if>>
|
||||
<spring:message code="null_expression" />
|
||||
</label>
|
||||
</div>
|
||||
<div for="exprType"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="matchMethod"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<option value="${matchMethodC.itemCode}" <c:if test="${_cfg.matchMethod==matchMethodC.itemCode || (_cfg.matchMethod==null && matchMethodC.itemCode==0)}">selected</c:if>><spring:message code="${matchMethodC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<input name="isAreaEffective" type="hidden" value="0">
|
||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||
|
||||
@@ -90,17 +90,12 @@ $(function(){
|
||||
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
|
||||
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<c:set var="spec_service_id"><spring:message code="social_app"/></c:set>
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="social_app"/></label>
|
||||
<div class="col-md-6">
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${_cfg.specServiceId}"
|
||||
@@ -126,6 +121,10 @@ $(function(){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-6 hidden">
|
||||
@@ -154,80 +153,202 @@ $(function(){
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="district" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="district"
|
||||
class="selectpicker show-tick form-control required district" onchange="changeDistrict($(this))">
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<c:if test="${!empty region.configDistrict }">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="district" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="district"
|
||||
class="selectpicker show-tick form-control required district" onchange="changeDistrict($(this))">
|
||||
<c:forEach items="${fn:split(region.configDistrict,',')}"
|
||||
var="_district">
|
||||
<option value="${_district }"
|
||||
<c:if test="${_cfg.district==_district}">selected</c:if>>${_district }</option>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="hidden" name="districtShowName" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control" value="${_cfg.district}"/>
|
||||
</select>
|
||||
<input type="hidden" name="districtShowName" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control" value="${_cfg.district}"/>
|
||||
</div>
|
||||
<div for="district"></div>
|
||||
</div>
|
||||
<div for="district"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="keywords" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required tags" type="text" id="tags_1"
|
||||
name="cfgKeywords"
|
||||
value="${_cfg.cfgKeywords}">
|
||||
</div>
|
||||
<!-- 此配置的关键词可以输入多个关键词 -->
|
||||
<c:if test="${region.configMultiKeywords eq 1}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required tags" type="text" id="tags_${tabName}"
|
||||
name="cfgKeywords"
|
||||
value="${_cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- 此配置的关键词不允许输入多个关键词 -->
|
||||
<c:if test="${(region.configMultiKeywords eq 0) or (empty region.configMultiKeywords)}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required invisibleChar" type="text"
|
||||
name="cfgKeywords"
|
||||
value="${_cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<div for="cfgKeywords"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline"> <input type="radio"
|
||||
name="exprType" value="1"
|
||||
class="required"
|
||||
<c:if test="${_cfg.exprType==1}">checked</c:if>> <spring:message
|
||||
code="and_expression" />
|
||||
</label> <label class="radio-inline"> <input type="radio"
|
||||
name="exprType" value="0"
|
||||
class="required"
|
||||
<c:if test="${_cfg.exprType==0 || _cfg.exprType==null}">checked</c:if>>
|
||||
<spring:message code="null_expression" />
|
||||
</label>
|
||||
</div>
|
||||
<div for="exprType"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="matchMethod"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<option value="${matchMethodC.itemCode}" <c:if test="${_cfg.matchMethod==matchMethodC.itemCode || (_cfg.matchMethod==null && matchMethodC.itemCode==0)}">selected</c:if>><spring:message code="${matchMethodC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:if test="${!empty region.configExprType}">
|
||||
<c:forEach var="exprType" items="${fn:split(region.configExprType,',')}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq exprType}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprType }"
|
||||
class="required"
|
||||
<c:if test="${_cfg.exprType eq exprType || (empty _cfg.exprType && exprType eq 0)}">
|
||||
checked
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configExprType}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq 0}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprTypeC.itemCode }"
|
||||
class="required" checked >
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</div>
|
||||
<div for="exprType"></div>
|
||||
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="matchMethod"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:if test="${!empty region.configMatchMethod}">
|
||||
<c:forEach var="matchMethod" items="${fn:split(region.configMatchMethod,',')}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq matchMethod}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
<c:if test="${_cfg.matchMethod eq matchMethod || (empty _cfg.matchMethod && matchMethod eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configMatchMethod}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq 0}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
selected
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="1" class="required"
|
||||
><spring:message code="hex"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required"
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="1" class="required"
|
||||
><spring:message code="case_senstive"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required"
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required" checked
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required"
|
||||
checked
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
@@ -235,16 +356,42 @@ $(function(){
|
||||
<div class="col-md-6">
|
||||
<select name="isHexbin"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<option value="${isHexbinC.itemCode}" <c:if test="${_cfg.isHexbin==isHexbinC.itemCode || (_cfg.isHexbin==null && isHexbinC.itemCode==0)}">selected</c:if>><spring:message code="${isHexbinC.itemValue}"/></option>
|
||||
</c:forEach>
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<c:forEach var="isHexbin" items="${fn:split(region.configHex,',')}">
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq isHexbin}">
|
||||
<option value="${isHexbinC.itemCode}"
|
||||
<c:if test="${_cfg.isHexbin eq isHexbin || (empty _cfg.isHexbin && isHexbin eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq 0}">
|
||||
<option value="${isHexbinC.itemCode}" selected >
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<input name="isAreaEffective" type="hidden" value="0">
|
||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||
<input name="requestId" value="0" type="hidden">
|
||||
|
||||
@@ -67,6 +67,7 @@ $(function(){
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<c:set var="spec_service_id"><spring:message code="social_app"/></c:set>
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="social_app"/></label>
|
||||
<div class="col-md-6">
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${_cfg.specServiceId}"
|
||||
|
||||
@@ -195,13 +195,14 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<c:set var="spec_service_id"><spring:message code="social_app"/></c:set>
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="social_app"/></label>
|
||||
<div class="col-md-6">
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${_cfg.specServiceId}"
|
||||
labelName="parent.specServiceName"
|
||||
labelValue="${empty _cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(_cfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId=""
|
||||
cssClass="form-control required"/>
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId="0"
|
||||
notAllowSelectRoot="true" cssClass="form-control required"/>
|
||||
</div>
|
||||
<div for="parent.specServiceName"></div>
|
||||
</div>
|
||||
|
||||
421
src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp
Normal file
421
src/main/webapp/WEB-INF/views/cfg/app/appSslCfgForm.jsp
Normal file
@@ -0,0 +1,421 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
$(element).parents(".col-md-6").next("div").append(error);
|
||||
}else{
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form){
|
||||
var flag = true;
|
||||
$("input[name$='cfgKeywords']").each(function(){
|
||||
if($(this).val()==''){
|
||||
$(this).parents(".form-group").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$("#keywordError").text()+"</label>");
|
||||
flag = false;
|
||||
}
|
||||
})
|
||||
$("select[name$='isHexbin']").each(function(){
|
||||
var isHexbin=$(this).val();
|
||||
if(isHexbin == 1){
|
||||
var keywords=$("input[name$='"+$(this).attr("name").replace("isHexbin","cfgKeywords")+"']").val();
|
||||
if(!(/^([0-9|a-f|A-F]*)$/.test(keywords))){
|
||||
$(this).parents(".form-body").find(
|
||||
"div[for='"
|
||||
+ $(this).attr("name").replace("isHexbin","cfgKeywords")
|
||||
+ "']").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.hexCheck+"</label>");
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
if(flag){
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
$("#appCode").val($("#specServiceIdId").val());
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
|
||||
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
|
||||
<div class="page-content">
|
||||
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
||||
<c:if test="${dict.itemValue eq 'social_app'}"><c:set var="app" value="${dict.itemCode}"/></c:if>
|
||||
</c:forEach>
|
||||
<span id="keywordError" style="display:none"><spring:message code="required"></spring:message></span>
|
||||
<span id="tagsinputTip" style="display:none"><spring:message code="multiple_keywords_tip"></spring:message></span>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="app_ssl_config"></spring:message>
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}"><spring:message code="add"></spring:message></c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}"><spring:message code="edit"></spring:message></c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/app/saveAppSslCfg" method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
|
||||
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
|
||||
<!-- 配置域类型 -->
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<c:set var="spec_service_id"><spring:message code="social_app"/></c:set>
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="social_app"/></label>
|
||||
<div class="col-md-6">
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${_cfg.specServiceId}"
|
||||
labelName="parent.specServiceName"
|
||||
labelValue="${empty _cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(_cfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId=""
|
||||
cssClass="form-control required"/>
|
||||
</div>
|
||||
<div for="parent.specServiceName"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="config_describe" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text"
|
||||
name="cfgDesc"
|
||||
value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
<div for="cfgDesc"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="action"/></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<c:if test="${!empty region.configDistrict }">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="district" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="district"
|
||||
class="selectpicker show-tick form-control required district" onchange="changeDistrict($(this))">
|
||||
<c:forEach items="${fn:split(region.configDistrict,',')}"
|
||||
var="_district">
|
||||
<option value="${_district }"
|
||||
<c:if test="${_cfg.district==_district}">selected</c:if>>${_district }</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="hidden" name="districtShowName" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control" value="${_cfg.district}"/>
|
||||
</div>
|
||||
<div for="district"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="keywords" /></label>
|
||||
<!-- 此配置的关键词可以输入多个关键词 -->
|
||||
<c:if test="${region.configMultiKeywords eq 1}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required tags" type="text" id="tags_${tabName}"
|
||||
name="cfgKeywords"
|
||||
value="${_cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- 此配置的关键词不允许输入多个关键词 -->
|
||||
<c:if test="${(region.configMultiKeywords eq 0) or (empty region.configMultiKeywords)}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required invisibleChar" type="text"
|
||||
name="cfgKeywords"
|
||||
value="${_cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<div for="cfgKeywords"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:if test="${!empty region.configExprType}">
|
||||
<c:forEach var="exprType" items="${fn:split(region.configExprType,',')}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq exprType}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprType }"
|
||||
class="required"
|
||||
<c:if test="${_cfg.exprType eq exprType || (empty _cfg.exprType && exprType eq 0)}">
|
||||
checked
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configExprType}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq 0}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="exprType" value="${exprTypeC.itemCode }"
|
||||
class="required" checked >
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</div>
|
||||
<div for="exprType"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="matchMethod"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:if test="${!empty region.configMatchMethod}">
|
||||
<c:forEach var="matchMethod" items="${fn:split(region.configMatchMethod,',')}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq matchMethod}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
<c:if test="${_cfg.matchMethod eq matchMethod || (empty _cfg.matchMethod && matchMethod eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configMatchMethod}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq 0}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
selected
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="1" class="required"
|
||||
><spring:message code="hex"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required"
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="1" class="required"
|
||||
><spring:message code="case_senstive"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required"
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isHex" value="0" class="required" checked
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCaseSenstive" value="0" class="required"
|
||||
checked
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="whether_hexbinary" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="isHexbin"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<c:forEach var="isHexbin" items="${fn:split(region.configHex,',')}">
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq isHexbin}">
|
||||
<option value="${isHexbinC.itemCode}"
|
||||
<c:if test="${_cfg.isHexbin eq isHexbin || (empty _cfg.isHexbin && isHexbin eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq 0}">
|
||||
<option value="${isHexbinC.itemCode}" selected >
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<input name="isAreaEffective" type="hidden" value="0">
|
||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||
<input name="requestId" value="0" type="hidden">
|
||||
<%-- <%@include file="/WEB-INF/include/form/basicInfo.jsp" %> --%>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
|
||||
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"> </div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
431
src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp
Normal file
431
src/main/webapp/WEB-INF/views/cfg/app/appSslCfgList.jsp
Normal file
@@ -0,0 +1,431 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(".tooltips").tooltip();
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.cfgKeywords}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
$("#seltype").change(function(){
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
|
||||
});
|
||||
//筛选功能初始化
|
||||
filterActionInit();
|
||||
$("#isAudit").change(function(){
|
||||
page();
|
||||
});
|
||||
//reset
|
||||
$("#resetBtn").on("click",function(){
|
||||
$("select.selectpicker").each(function(){
|
||||
$(this).selectpicker('val',$(this).find('option:first').val());
|
||||
$(this).find("option").attr("selected",false);
|
||||
$(this).find("option:first").attr("selected",true);
|
||||
});
|
||||
$(".Wdate").attr("value",'');
|
||||
$("#level").attr("value",'');
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="page-content">
|
||||
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
||||
<c:if test="${dict.itemValue eq 'social_app'}"><c:set var="app" value="${dict.itemCode}"/></c:if>
|
||||
</c:forEach>
|
||||
<div class="theme-panel hidden-xs hidden-sm">
|
||||
<shiro:hasPermission name="app:http:config">
|
||||
<button type="button" class="btn btn-primary"
|
||||
onClick="javascript:window.location='${ctx}/app/sslCfgForm?functionId=${cfg.functionId}'">
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="add"></spring:message></button>
|
||||
</shiro:hasPermission>
|
||||
</div>
|
||||
|
||||
<h3 class="page-title">
|
||||
<spring:message code="app_ssl_config"></spring:message>
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-body">
|
||||
<div class="row" >
|
||||
<sys:message content="${message}"/>
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/app/sslCfgList?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
callback="page();" />
|
||||
<!-- 筛选按钮展开状态-->
|
||||
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<c:set var="state"><spring:message code='state'/></c:set>
|
||||
<form:select path="isAudit" class="selectpicker select2 input-small">
|
||||
<form:option value=""><spring:message code="all_states"/></form:option>
|
||||
<form:option value="0"><spring:message code="created"></spring:message></form:option>
|
||||
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
|
||||
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
|
||||
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
<div class="pull-left">
|
||||
<c:set var="spec_service_id"><spring:message code="social_app"/></c:set>
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${specificServiceCfg.parent.specServiceId}"
|
||||
labelName="parent.specServiceName"
|
||||
labelValue="${empty cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(cfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId=""
|
||||
cssClass="form-control input-small"/>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
<div class="input-group-btn">
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="cfgKeywords"><spring:message code="keywords"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
</div>
|
||||
|
||||
<input id="intype" class="form-control input-medium" type="text" value="">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
|
||||
<button type="button" class="btn btn-default" id="resetBtn"> <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
|
||||
<button type="button" class="btn btn-default" id="filter-btn"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<shiro:hasPermission name="app:ssl:config">
|
||||
<sys:delRow url="${ctx}/app/sslCfgForm" id="contentTable" label="update"></sys:delRow>
|
||||
<sys:delRow url="${ctx}/app/updateAppSslCfgValid?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
<shiro:hasPermission name="app:ssl:confirm">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<li><sys:delRow url="${ctx}/app/auditAppSslCfg?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/app/auditAppSslCfg?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
|
||||
<li><sys:delRow url="${ctx}/app/auditAppSslCfg?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
</shiro:hasPermission>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /搜索内容与操作按钮栏 -->
|
||||
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row hidden">
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='request_number'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${requestInfos}" var="requestInfo" >
|
||||
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='type'/></label>
|
||||
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${fls}" var="fl" >
|
||||
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='attribute'/></label>
|
||||
<c:set var="select"><spring:message code='select'/></c:set>
|
||||
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${xzs}" var="xz" >
|
||||
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='label'/></label>
|
||||
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<form:option value=""><spring:message code="select"/></form:option>
|
||||
<c:forEach items="${lables}" var="lable" >
|
||||
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
|
||||
</c:forEach>
|
||||
</form:select>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="config_time"/>:</label>
|
||||
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="edit_time"/>:</label>
|
||||
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="audit_time"/>:</label>
|
||||
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
|
||||
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- /筛选搜索内容栏 结束-->
|
||||
</form:form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
|
||||
<th class="cfgDesc"><spring:message code="config_describe"/></th>
|
||||
<th><spring:message code="social_app"/></th>
|
||||
<th><spring:message code="district"/></th>
|
||||
<th><spring:message code="keywords"/></th>
|
||||
<th><spring:message code="whether_hexbinary"/></th>
|
||||
<th><spring:message code="expression_type"/></th>
|
||||
<th><spring:message code="match_method"/></th>
|
||||
<%-- <th><spring:message code="block_type"/></th>
|
||||
<th><spring:message code="whether_area_block"/></th>
|
||||
<th><spring:message code="letter"/></th>
|
||||
<th><spring:message code="classification"/></th>
|
||||
<th><spring:message code="attribute"/></th>
|
||||
<th><spring:message code="label"/></th> --%>
|
||||
<th><spring:message code="valid_identifier"/></th>
|
||||
<th><spring:message code="is_audit"/></th>
|
||||
<th><spring:message code="log_total"/></th>
|
||||
<th><spring:message code="creator"/></th>
|
||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||
<th><spring:message code="editor"/></th>
|
||||
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
|
||||
<th><spring:message code="auditor"/></th>
|
||||
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="i-checks child-checks" id="${cfg.cfgId}" value="${cfg.isAudit}">
|
||||
</td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
<td>${cfg.appName }</td>
|
||||
<td>${cfg.district }</td>
|
||||
<td>
|
||||
<a href="javascript:;" data-original-title="${fn:replace(cfg.cfgKeywords, '***and***', ' ')}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(fn:replace(cfg.cfgKeywords, "***and***", " "),20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${cfg.isHexbin==isHexbinC.itemCode }"><spring:message code="${isHexbinC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${cfg.exprType==1}"><spring:message code="and_expression"/></c:if>
|
||||
<c:if test="${cfg.exprType==0}"><spring:message code="null_expression"/></c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${cfg.matchMethod==matchMethodC.itemCode }"><spring:message code="${matchMethodC.itemValue}"/></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<%-- <td>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${dict.itemCode eq cfg.action }">
|
||||
<spring:message code="${dict.itemValue }"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${cfg.isAreaEffective==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isAreaEffective==1}">
|
||||
<a href="javascript:viewAreaInfo('${ctx}','${cfg.areaEffectiveIds }','${cfg.compileId }')" >
|
||||
<spring:message code="yes"/>
|
||||
</a>
|
||||
</c:if>
|
||||
</td>
|
||||
<td>${cfg.requestName }</td>
|
||||
<td>
|
||||
<c:set var="classify"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.classify,',')}" var="classifyId" varStatus="status">
|
||||
<c:forEach items="${fls}" var="fl">
|
||||
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="classify" value="${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${classify}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(classify,20)}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="attribute"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.attribute,',')}" var="attributeId" varStatus="status">
|
||||
<c:forEach items="${xzs}" var="xz">
|
||||
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="attribute" value="${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${attribute}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(attribute,20)}
|
||||
</a>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<c:set var="lableInfo"></c:set>
|
||||
<c:forEach items="${fn:split(cfg.lable,',')}" var="lableId" varStatus="status">
|
||||
<c:forEach items="${lables}" var="lable">
|
||||
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
|
||||
<c:if test="${status.index+1 eq 1}">
|
||||
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
<c:if test="${status.index+1 ne 1}">
|
||||
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
|
||||
</c:if>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<a href="javascript:;" data-original-title="${lableInfo}"
|
||||
class="tooltips" data-flag="false" data-html="true" data-placement="top">
|
||||
${fns:abbr(lableInfo,20)}
|
||||
</a>
|
||||
</td> --%>
|
||||
<td>
|
||||
<c:if test="${cfg.isValid==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${cfg.isValid==1}"><spring:message code="yes"/></c:if>
|
||||
<c:if test="${cfg.isValid==-1}"><spring:message code="deleted"/></c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
|
||||
<c:when test="${cfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
|
||||
</c:choose>
|
||||
</td>
|
||||
<td functionId="${cfg.functionId}" compileId="${cfg.compileId}" action="${cfg.action}"><div class="loading-total"></div></td>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.auditorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page" style="margin-top:40px">${page}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,13 +5,7 @@
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("#cancel").on("click",function(){
|
||||
window.history.back();
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
initCommIpVal();
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
$("#protocolId").val($(".action:checked").attr("protocolId"));
|
||||
$("#cfgFrom").validate({
|
||||
@@ -56,8 +50,18 @@ $(function(){
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
<input type="hidden" name="${cfgName}.configServiceType" value="${region.configServiceType}">
|
||||
<input type="hidden" id="cfgType${region.configRegionCode}" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" id="cfgRegionCode${region.configRegionCode}"
|
||||
isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
ipPortShow="${region.configIpPortShow}"
|
||||
ipType="${region.configIpType}"
|
||||
ipPattern="${region.configIpPattern}"
|
||||
portPattern="${region.configPortPattern}"
|
||||
direction="${region.configDirection}"
|
||||
protocol="${region.configProtocol}"
|
||||
value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
@@ -82,6 +86,7 @@ $(function(){
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode}"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
|
||||
@@ -92,13 +92,6 @@ $(function(){
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<div class="form-body">
|
||||
<!-- desc and action -->
|
||||
<div class="row">
|
||||
@@ -137,7 +130,12 @@ $(function(){
|
||||
</div>
|
||||
</div>
|
||||
<!-- desc and action -->
|
||||
<%@include file="/WEB-INF/include/form/stringInfo.jsp" %>
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<%@include file="/WEB-INF/include/form/complexInfo.jsp" %>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp" %>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</div>
|
||||
|
||||
@@ -62,6 +62,7 @@
|
||||
<spring:message code="${regionValue}"></spring:message>
|
||||
<small><spring:message code="date_list"/></small>
|
||||
</h3>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet">
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user