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());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user