(1)avCfgService暂时继承BaseService
(2)BaseCfg字段调整,加入functionId字段,去掉maatTable字段 (3)删除SystemService相关代码 (4)字符串,增强字符串配置加入字段cfgType (5)邮件,ssl,Ftp pojo调整,删除多余的,新增keywordCfg (6)spring-mvc.xml注释redisDao
This commit is contained in:
@@ -6,7 +6,7 @@ import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
@Deprecated
|
||||
public class SystemServiceInfo extends BaseEntity<SystemServiceInfo> {
|
||||
|
||||
private static final long serialVersionUID = -8919580011013718190L;
|
||||
|
||||
@@ -11,8 +11,6 @@ package com.nis.domain.configuration;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
@@ -33,9 +31,6 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
* 编译id
|
||||
*/
|
||||
protected Integer compileId ;
|
||||
@Expose
|
||||
@SerializedName("maatTable")
|
||||
protected String maatTable;
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -112,10 +107,6 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
* 来函
|
||||
*/
|
||||
protected String requestName;
|
||||
/**
|
||||
* 编译id
|
||||
*/
|
||||
// protected Integer compileId;
|
||||
/**
|
||||
* 是否区域gk
|
||||
*/
|
||||
@@ -144,9 +135,6 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
* 标签
|
||||
*/
|
||||
protected String lableName;
|
||||
// protected Integer exprType =0;
|
||||
// protected Integer matchMethod =0;
|
||||
// protected Integer isHexbin =0;
|
||||
/**
|
||||
* 区域生效id
|
||||
*/
|
||||
@@ -160,6 +148,22 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
protected Date search_edit_time_end;
|
||||
protected Date search_audit_time_start;
|
||||
protected Date search_audit_time_end;
|
||||
protected Integer functionId;
|
||||
|
||||
/**
|
||||
* functionId
|
||||
* @return functionId
|
||||
*/
|
||||
|
||||
public Integer getFunctionId() {
|
||||
return functionId;
|
||||
}
|
||||
/**
|
||||
* @param functionId the functionId to set
|
||||
*/
|
||||
public void setFunctionId(Integer functionId) {
|
||||
this.functionId = functionId;
|
||||
}
|
||||
/**
|
||||
* cfgId
|
||||
* @return cfgId
|
||||
@@ -542,20 +546,6 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
public void setRequestName(String requestName) {
|
||||
this.requestName = requestName;
|
||||
}
|
||||
/**
|
||||
* maatTable
|
||||
* @return maatTable
|
||||
*/
|
||||
|
||||
public String getMaatTable() {
|
||||
return maatTable;
|
||||
}
|
||||
/**
|
||||
* @param maatTable the maatTable to set
|
||||
*/
|
||||
public void setMaatTable(String maatTable) {
|
||||
this.maatTable = maatTable;
|
||||
}
|
||||
/**
|
||||
* search_create_time_start
|
||||
* @return search_create_time_start
|
||||
|
||||
@@ -34,6 +34,16 @@ public class BaseStringCfg extends BaseCfg<BaseStringCfg> {
|
||||
@SerializedName("keywords")
|
||||
protected String cfgKeywords;
|
||||
protected String cfgKeywordsShowName;
|
||||
protected String cfgType;
|
||||
|
||||
/**
|
||||
* cfgType
|
||||
* @return cfgType
|
||||
*/
|
||||
|
||||
public String getCfgType() {
|
||||
return cfgType;
|
||||
}
|
||||
/**
|
||||
* cfgKeywords
|
||||
* @return cfgKeywords
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
@@ -60,6 +58,22 @@ public class ComplexkeywordCfg extends BaseCfg<ComplexkeywordCfg>{
|
||||
@Expose
|
||||
@SerializedName("isHexbin")
|
||||
protected Integer isHexbin ;
|
||||
protected String cfgType;
|
||||
|
||||
/**
|
||||
* cfgType
|
||||
* @return cfgType
|
||||
*/
|
||||
|
||||
public String getCfgType() {
|
||||
return cfgType;
|
||||
}
|
||||
/**
|
||||
* @param cfgType the cfgType to set
|
||||
*/
|
||||
public void setCfgType(String cfgType) {
|
||||
this.cfgType = cfgType;
|
||||
}
|
||||
/**
|
||||
* district
|
||||
* @return district
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
*@Title: FtpFileContentConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月6日 上午8:27:21
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: FtpFileContentConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月6日 上午8:27:21
|
||||
* @version V1.0
|
||||
*/
|
||||
public class FtpFileContentCfg extends BaseStringCfg {
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = 7996351716704137873L;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.BaseStringCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.matchMethod=0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
*@Title: FtpFileNameConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月6日 上午8:24:13
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: FtpFileNameConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月6日 上午8:24:13
|
||||
* @version V1.0
|
||||
*/
|
||||
public class FtpFileNameCfg extends BaseStringCfg {
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -3947991086808399842L;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.BaseStringCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.matchMethod=0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
*@Title: FtpIpConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月6日 上午8:29:26
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: FtpIpConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月6日 上午8:29:26
|
||||
* @version V1.0
|
||||
*/
|
||||
public class FtpIpCfg extends BaseIpCfg {
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -7878447087396996553L;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.BaseIpCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.protocolId=7;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,13 +9,13 @@
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: FtpAddrConfig.java
|
||||
* @ClassName: FtpKeywordCfg.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月6日 上午8:18:55
|
||||
* @version V1.0
|
||||
*/
|
||||
public class FtpAddrCfg extends BaseStringCfg{
|
||||
public class FtpKeywordCfg extends BaseStringCfg{
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
*@Title: HttpIpConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午5:52:35
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: HttpIpConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午5:52:35
|
||||
* @version V1.0
|
||||
*/
|
||||
public class HttpIpCfg extends BaseIpCfg {
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -4652367183432063965L;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.BaseIpCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.protocolId=4;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
*@Title: MailAttachNameConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午6:25:21
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: MailAttachNameConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午6:25:21
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MailAttachNameCfg extends ComplexkeywordCfg {
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = 9067647371707152226L;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="AttachName";
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/**
|
||||
*@Title: MailContentConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午6:23:41
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: MailContentConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午6:23:41
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MailContentCfg extends ComplexkeywordCfg{
|
||||
public static final String tableName="mail_content_cfg";
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -4257845942210782532L;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="Content";
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/**
|
||||
*@Title: MailFromConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午5:58:45
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: MailFromConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午5:58:45
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MailFromCfg extends ComplexkeywordCfg {
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = 7605303118334439422L;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="From";
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
*@Title: MailIpConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午6:42:07
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: MailIpConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午6:42:07
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MailIpCfg extends BaseIpCfg {
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = 2358673955555645618L;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.BaseIpCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.protocolId=5;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,7 +15,7 @@ package com.nis.domain.configuration;
|
||||
* @date 2018年2月5日 下午6:40:26
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MailAttachContentCfg extends ComplexkeywordCfg {
|
||||
public class MailKeywordCfg extends ComplexkeywordCfg {
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
@@ -30,7 +30,6 @@ public class MailAttachContentCfg extends ComplexkeywordCfg {
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="AttachContent";
|
||||
this.exprType=0;
|
||||
this.matchMethod=0;
|
||||
this.isHexbin=0;
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
*@Title: MailSubjectConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午6:22:21
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: MailSubjectConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午6:22:21
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MailSubjectCfg extends ComplexkeywordCfg {
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -547690498444330212L;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="Subject";
|
||||
this.exprType=0;
|
||||
this.matchMethod=3;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
/**
|
||||
*@Title: MailToConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月5日 下午6:00:11
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: MailToConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月5日 下午6:00:11
|
||||
* @version V1.0
|
||||
*/
|
||||
public class MailToCfg extends ComplexkeywordCfg {
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -7755270610917876826L;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="To";
|
||||
this.exprType=0;
|
||||
this.matchMethod=3;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
*@Title: SslIpConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月6日 上午9:10:46
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: SslIpConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月6日 上午9:10:46
|
||||
* @version V1.0
|
||||
*/
|
||||
public class SslIpCfg extends BaseIpCfg {
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -1334085146634344608L;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.BaseIpCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.protocolId=9;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,7 +15,7 @@ package com.nis.domain.configuration;
|
||||
* @date 2018年2月6日 上午8:59:51
|
||||
* @version V1.0
|
||||
*/
|
||||
public class SslCertCfg extends ComplexkeywordCfg{
|
||||
public class SslKeywordCfg extends ComplexkeywordCfg{
|
||||
public static final String tableName="ssl_cert_cfg";
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
@@ -32,7 +32,6 @@ public class SslCertCfg extends ComplexkeywordCfg{
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="CERT";
|
||||
this.exprType=0;
|
||||
this.matchMethod=3;
|
||||
this.isHexbin=0;
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
*@Title: SslSniConfig.java
|
||||
*@Package com.nis.domain.restful
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年2月6日 上午9:02:44
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
/**
|
||||
* @ClassName: SslSniConfig.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年2月6日 上午9:02:44
|
||||
* @version V1.0
|
||||
*/
|
||||
public class SslSniCfg extends ComplexkeywordCfg {
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = -6648964841408445457L;
|
||||
/* (non-Javadoc)
|
||||
* @see com.nis.domain.configuration.ComplexkeywordCfg#initDefaultValue()
|
||||
*/
|
||||
@Override
|
||||
public void initDefaultValue() {
|
||||
// TODO Auto-generated method stub
|
||||
super.initDefaultValue();
|
||||
this.district="SNI";
|
||||
this.exprType=0;
|
||||
this.matchMethod=3;
|
||||
this.isHexbin=0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -59,7 +59,6 @@ import com.nis.web.service.configuration.WebCfgService;
|
||||
import com.nis.web.service.specific.SpecificServiceCfgService;
|
||||
import com.nis.web.service.specific.SpecificServiceHostCfgService;
|
||||
import com.nis.web.service.systemService.ServiceConfigInfoService;
|
||||
import com.nis.web.service.systemService.SystemServiceService;
|
||||
|
||||
public class BaseController {
|
||||
|
||||
@@ -117,8 +116,6 @@ public class BaseController {
|
||||
@Autowired
|
||||
protected AppCfgService appCfgService;
|
||||
|
||||
@Autowired
|
||||
protected SystemServiceService systemServiceService;
|
||||
|
||||
@Autowired
|
||||
protected ServiceDictInfoService serviceDictInfoService;
|
||||
|
||||
@@ -209,10 +209,8 @@ public class ComplexStringCfgController extends BaseController{
|
||||
for(ComplexkeywordCfg bean:beans){
|
||||
ComplexkeywordCfg auditBean=new ComplexkeywordCfg();
|
||||
auditBean.setTableName(tableName);
|
||||
auditBean.setMaatTable(maatTable);
|
||||
auditBean.setCfgId(bean.getCfgId());
|
||||
bean.setTableName(tableName);
|
||||
bean.setMaatTable(maatTable);
|
||||
int audit=bean.getIsAudit().intValue();
|
||||
if(audit==Constants.AUDIT_YES&&isAudit!=Constants.AUDIT_NOT_YES){
|
||||
logger.error("审核通过的配置只能取消审核通过!");
|
||||
@@ -234,7 +232,6 @@ public class ComplexStringCfgController extends BaseController{
|
||||
}
|
||||
List<AreaIpCfg> areaCfg=ipCfgService.getAreaCfgByCompileId(bean.getCompileId());
|
||||
for(AreaIpCfg c:areaCfg){
|
||||
c.setMaatTable(AreaIpCfg.getMaattable());
|
||||
c.setTableName(AreaIpCfg.getTablename());
|
||||
c.setAuditorId(c.getCurrentUser().getId());
|
||||
c.setAuditTime(date);
|
||||
|
||||
@@ -246,10 +246,8 @@ public class IpCfgController extends BaseController{
|
||||
for(BaseIpCfg bean:beans){
|
||||
BaseIpCfg auditBean=new BaseIpCfg();
|
||||
auditBean.setTableName(tableName);
|
||||
auditBean.setMaatTable(maatTable);
|
||||
auditBean.setCfgId(bean.getCfgId());
|
||||
bean.setTableName(tableName);
|
||||
bean.setMaatTable(maatTable);
|
||||
int audit=bean.getIsAudit().intValue();
|
||||
if(audit==Constants.AUDIT_YES&&isAudit!=Constants.AUDIT_NOT_YES){
|
||||
logger.error("审核通过的配置只能取消审核通过!");
|
||||
@@ -271,7 +269,6 @@ public class IpCfgController extends BaseController{
|
||||
}
|
||||
List<AreaIpCfg> areaCfg=ipCfgService.getAreaCfgByCompileId(bean.getCompileId());
|
||||
for(AreaIpCfg c:areaCfg){
|
||||
c.setMaatTable(AreaIpCfg.getMaattable());
|
||||
c.setTableName(AreaIpCfg.getTablename());
|
||||
c.setAuditorId(c.getCurrentUser().getId());
|
||||
c.setAuditTime(date);
|
||||
|
||||
@@ -953,7 +953,6 @@ public class MultipleCfgController extends BaseController{
|
||||
//根据表名,编译ID查询唯一结果
|
||||
BaseIpCfg _resultCfg=ipCfgService.get(searchCfg);
|
||||
if(_resultCfg!=null){
|
||||
_resultCfg.setMaatTable(info.getMaatTable());
|
||||
searchCfg.setAuditorId(searchCfg.getCurrentUser().getId());
|
||||
searchCfg.setAuditTime(date);
|
||||
searchCfg.setCfgId(_resultCfg.getCfgId());
|
||||
@@ -986,7 +985,6 @@ public class MultipleCfgController extends BaseController{
|
||||
//根据表名,编译ID查询唯一结果
|
||||
BaseStringCfg _resultCfg=stringCfgService.get(searchCfg);
|
||||
if(_resultCfg!=null){
|
||||
_resultCfg.setMaatTable(info.getMaatTable());
|
||||
searchCfg.setAuditorId(searchCfg.getCurrentUser().getId());
|
||||
searchCfg.setAuditTime(date);
|
||||
searchCfg.setCfgId(_resultCfg.getCfgId());
|
||||
@@ -1019,7 +1017,6 @@ public class MultipleCfgController extends BaseController{
|
||||
//根据表名,编译ID查询唯一结果
|
||||
NumBoundaryCfg _resultCfg=numCfgService.get(searchCfg);
|
||||
if(_resultCfg!=null){
|
||||
_resultCfg.setMaatTable(info.getMaatTable());
|
||||
searchCfg.setAuditorId(searchCfg.getCurrentUser().getId());
|
||||
searchCfg.setAuditTime(date);
|
||||
searchCfg.setCfgId(_resultCfg.getCfgId());
|
||||
@@ -1052,7 +1049,6 @@ public class MultipleCfgController extends BaseController{
|
||||
//根据表名,编译ID查询唯一结果
|
||||
ComplexkeywordCfg _resultCfg=complexStringCfgService.get(searchCfg);
|
||||
if(_resultCfg!=null){
|
||||
_resultCfg.setMaatTable(info.getMaatTable());
|
||||
searchCfg.setAuditorId(searchCfg.getCurrentUser().getId());
|
||||
searchCfg.setAuditTime(date);
|
||||
searchCfg.setCfgId(_resultCfg.getCfgId());
|
||||
@@ -1084,7 +1080,6 @@ public class MultipleCfgController extends BaseController{
|
||||
List<AreaIpCfg> areaCfgs=ipCfgService.getAreaCfgByCompileId(compileId);
|
||||
for(AreaIpCfg areaCfg:areaCfgs){
|
||||
areaCfg.setTableName(AreaIpCfg.getTablename());
|
||||
areaCfg.setMaatTable(AreaIpCfg.getMaattable());
|
||||
areaCfg.setAuditorId(areaCfg.getCurrentUser().getId());
|
||||
areaCfg.setAuditTime(date);
|
||||
areaCfg.setIsAudit(isAudit);
|
||||
|
||||
@@ -156,11 +156,9 @@ public class NumCfgController extends BaseController{
|
||||
if(cfg.getIsAudit()==Constants.AUDIT_NOT_YES){//取消审核通过,设置有效标志为0
|
||||
cfg.setIsValid(Constants.VALID_NO);
|
||||
bean.setIsValid(Constants.VALID_NO);
|
||||
bean.setMaatTable(serviceConfigInfo.getMaatTable());
|
||||
}else if(cfg.getIsAudit()==Constants.AUDIT_YES){//审核通过,设置有效标志为1
|
||||
cfg.setIsValid(Constants.VALID_YES);
|
||||
bean.setIsValid(Constants.VALID_YES);
|
||||
bean.setMaatTable(serviceConfigInfo.getMaatTable());
|
||||
}
|
||||
int result=numCfgService.auditNumCfg(bean,cfg);
|
||||
if(result!=0){
|
||||
|
||||
@@ -227,10 +227,8 @@ public class StringCfgController extends BaseController{
|
||||
for(BaseStringCfg bean:beans){
|
||||
BaseStringCfg auditBean=new BaseStringCfg();
|
||||
auditBean.setTableName(tableName);
|
||||
auditBean.setMaatTable(maatTable);
|
||||
auditBean.setCfgId(bean.getCfgId());
|
||||
bean.setTableName(tableName);
|
||||
bean.setMaatTable(maatTable);
|
||||
int audit=bean.getIsAudit().intValue();
|
||||
if(audit==Constants.AUDIT_YES&&isAudit!=Constants.AUDIT_NOT_YES){
|
||||
logger.error("审核通过的配置只能取消审核通过!");
|
||||
@@ -252,7 +250,6 @@ public class StringCfgController extends BaseController{
|
||||
}
|
||||
List<AreaIpCfg> areaCfg=ipCfgService.getAreaCfgByCompileId(bean.getCompileId());
|
||||
for(AreaIpCfg c:areaCfg){
|
||||
c.setMaatTable(AreaIpCfg.getMaattable());
|
||||
c.setTableName(AreaIpCfg.getTablename());
|
||||
c.setAuditorId(c.getCurrentUser().getId());
|
||||
c.setAuditTime(date);
|
||||
|
||||
@@ -1,196 +0,0 @@
|
||||
package com.nis.web.controller.systemService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
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 org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.ServiceConfigInfo;
|
||||
import com.nis.domain.SystemServiceInfo;
|
||||
import com.nis.util.Collections3;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/systemService")
|
||||
public class SystemServiceController extends BaseController {
|
||||
|
||||
@ModelAttribute
|
||||
public SystemServiceInfo get(Long id) {
|
||||
if (!StringUtil.isEmpty(id)){
|
||||
return systemServiceService.get(id);
|
||||
}else{
|
||||
return new SystemServiceInfo();
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresPermissions("system:service:view")
|
||||
@RequestMapping(value = "list")
|
||||
public String list(Model model, SystemServiceInfo systemServiceInfo, HttpServletRequest request, HttpServletResponse response) {
|
||||
systemServiceInfo.setIsValid(1);
|
||||
Page<SystemServiceInfo> page = systemServiceService.findPage(new Page<SystemServiceInfo>(request, response, 30), systemServiceInfo);
|
||||
model.addAttribute("page", page);
|
||||
return "/systemService/list";
|
||||
}
|
||||
|
||||
@RequiresPermissions("system:service:edit")
|
||||
@RequestMapping(value = "systemServiceform")
|
||||
public String detail(Model model, SystemServiceInfo systemServiceInfo) {
|
||||
return "/systemService/form";
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存(新增、修改)
|
||||
*/
|
||||
@RequiresPermissions("system:service:edit")
|
||||
@RequestMapping(value = "save")
|
||||
public String save(Model model, SystemServiceInfo systemServiceInfo, HttpServletRequest request, RedirectAttributes redirectAttributes) {
|
||||
Date now = new Date();
|
||||
|
||||
//新增
|
||||
if (systemServiceInfo.getId() == null) {
|
||||
systemServiceInfo.setCreateTime(now);
|
||||
systemServiceInfo.setCreator(UserUtils.getUser());
|
||||
systemServiceInfo.setIsValid(1);
|
||||
systemServiceInfo.setIsInitianlize(0);
|
||||
}
|
||||
//更新
|
||||
else {
|
||||
//初始数据不允许非admin修改
|
||||
if (!UserUtils.getUser().getLoginId().equals("admin") && systemServiceInfo.getIsInitianlize().intValue() == 1) {
|
||||
return "/error/403";
|
||||
}
|
||||
systemServiceInfo.setEditTime(now);
|
||||
systemServiceInfo.setEditor(UserUtils.getUser());
|
||||
}
|
||||
|
||||
//接收serviceConfigInfo
|
||||
String[] reqSciIds = request.getParameterValues("sciId");
|
||||
String[] sciIsValids = request.getParameterValues("sciIsValid");
|
||||
String[] reqTableNames = request.getParameterValues("tableName");
|
||||
String[] reqTableTypes = request.getParameterValues("tableType");
|
||||
String[] reqTableDescs = request.getParameterValues("tableDesc");
|
||||
String[] reqMaatTables = request.getParameterValues("maatTable");
|
||||
|
||||
//新增的serviceConfigInfo
|
||||
List<ServiceConfigInfo> insertServiceConfigInfoList = new ArrayList<ServiceConfigInfo>();
|
||||
//更新的serviceConfigInfo
|
||||
List<ServiceConfigInfo> updateServiceConfigInfoList = new ArrayList<ServiceConfigInfo>();
|
||||
|
||||
if (reqSciIds != null && reqSciIds.length > 0) {
|
||||
for (int i = 0; i < reqSciIds.length; i++) {
|
||||
ServiceConfigInfo sci = new ServiceConfigInfo();
|
||||
sci.setId(Long.valueOf(reqSciIds[i]));
|
||||
sci.setTableName(reqTableNames[i]);
|
||||
sci.setIsValid(Integer.valueOf(sciIsValids[i]));
|
||||
sci.setTableType(Integer.valueOf(reqTableTypes[i]));
|
||||
sci.setTableDesc(reqTableDescs[i]);
|
||||
sci.setMaatTable(reqMaatTables[i]);
|
||||
sci.setServiceId(systemServiceInfo.getServiceId());
|
||||
|
||||
if (sci.getId() == 0) {
|
||||
sci.setIsInitianlize(0);
|
||||
insertServiceConfigInfoList.add(sci);
|
||||
} else {
|
||||
updateServiceConfigInfoList.add(sci);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
try {
|
||||
systemServiceService.save(systemServiceInfo, insertServiceConfigInfoList, updateServiceConfigInfoList);
|
||||
addMessage(redirectAttributes, "save_success");
|
||||
} catch (Exception e) {
|
||||
addMessage(redirectAttributes, "save_failed");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath + "/systemService/list";
|
||||
}
|
||||
|
||||
@RequiresPermissions("system:service:edit")
|
||||
@RequestMapping(value = "delete")
|
||||
public String delete(Model model, SystemServiceInfo systemServiceInfo, HttpServletRequest request, HttpServletResponse response) {
|
||||
//增加后台校验,当数据是初始数据时不允许删除
|
||||
if(systemServiceInfo.getIsInitianlize().intValue() == 1) {
|
||||
return "/error/403";
|
||||
}
|
||||
|
||||
systemServiceService.deleteService(systemServiceInfo);
|
||||
try {
|
||||
systemServiceInfo.setIsValid(1);
|
||||
Page<SystemServiceInfo> page = systemServiceService.findPage(new Page<SystemServiceInfo>(request, response, 1), systemServiceInfo);
|
||||
model.addAttribute("page", page);
|
||||
addMessage(model, "delete_success");
|
||||
} catch (Exception e) {
|
||||
addMessage(model, "delete_failed");
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "/systemService/list";
|
||||
}
|
||||
|
||||
/**
|
||||
* serviceId校验
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "serviceIdValidate")
|
||||
public String serviceIdValidate(String serviceId, Long id) {
|
||||
List<SystemServiceInfo> list = systemServiceService.getSystemServiceByServiceId(serviceId);
|
||||
if (Collections3.isEmpty(list)) {
|
||||
return "true";
|
||||
} else {
|
||||
if (id != null) {
|
||||
for (SystemServiceInfo info : list) {
|
||||
if (info.getId().longValue() == id.longValue()) {
|
||||
return "true";
|
||||
}
|
||||
}
|
||||
return "false";
|
||||
} else {
|
||||
return "false";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过serviceId前缀获取可用的serviceId
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(value = "newServiceId")
|
||||
public Integer getNewServiceId(Integer serviceIdPre) {
|
||||
if (serviceIdPre != null) {
|
||||
SystemServiceInfo ssi = new SystemServiceInfo();
|
||||
ssi.setServiceIdPre(serviceIdPre);
|
||||
ssi.setIsValid(null);
|
||||
//查找并排序,取得最小的可用serviceId
|
||||
List<SystemServiceInfo> list = systemServiceService.findList(ssi);
|
||||
if (!Collections3.isEmpty(list)) {
|
||||
Collections.sort(list, new Comparator<SystemServiceInfo>() {
|
||||
@Override
|
||||
public int compare(SystemServiceInfo arg0, SystemServiceInfo arg1) {
|
||||
return arg1.getServiceId().compareTo(arg0.getServiceId());
|
||||
}
|
||||
});
|
||||
return list.get(0).getServiceId() + 1;
|
||||
} else {
|
||||
return serviceIdPre * 100;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="district" property="district" jdbcType="VARCHAR" />
|
||||
<result column="keywords" property="keywords" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" 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" />
|
||||
@@ -26,6 +27,7 @@
|
||||
<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="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="ComplexStringMapWithUser" type="com.nis.domain.configuration.ComplexkeywordCfg" extends="ComplexStringMap">
|
||||
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="BaseIpMapWithUser" type="com.nis.domain.configuration.BaseIpCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
@@ -62,6 +63,7 @@
|
||||
<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="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
@@ -70,19 +72,6 @@
|
||||
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
|
||||
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="FtpIpMap" type="com.nis.domain.configuration.FtpIpCfg" extends="BaseIpMap" />
|
||||
<resultMap id="HttpIpMap" type="com.nis.domain.configuration.HttpIpCfg" extends="BaseIpMap" />
|
||||
<resultMap id="L2tpIpMap" type="com.nis.domain.configuration.L2tpIpCfg" extends="BaseIpMap" />
|
||||
<resultMap id="MailIpMap" type="com.nis.domain.configuration.MailIpCfg" extends="BaseIpMap" />
|
||||
<resultMap id="MmsIpMap" type="com.nis.domain.configuration.MmsIpCfg" extends="BaseIpMap" />
|
||||
<resultMap id="OpenvpnIpMap" type="com.nis.domain.configuration.OpenvpnIpCfg" extends="BaseIpMap" />
|
||||
<resultMap id="PptpIpMap" type="com.nis.domain.configuration.PptpIpCfg" extends="BaseIpMap" />
|
||||
<resultMap id="RtmpIpMap" type="com.nis.domain.configuration.RtmpIpCfg" extends="BaseIpMap" />
|
||||
<resultMap id="RtpIpMap" type="com.nis.domain.configuration.RtpIpCfg" extends="BaseIpMap" />
|
||||
<resultMap id="RtspIpMap" type="com.nis.domain.configuration.RtspIpCfg" extends="BaseIpMap" />
|
||||
<resultMap id="SipIpMap" type="com.nis.domain.configuration.SipIpCfg" extends="BaseIpMap" />
|
||||
<resultMap id="SshIpMap" type="com.nis.domain.configuration.SshIpCfg" extends="BaseIpMap" />
|
||||
<resultMap id="SslIpMap" type="com.nis.domain.configuration.SslIpCfg" extends="BaseIpMap" />
|
||||
|
||||
<sql id="BaseIpCfg_Column_List_with_id" >
|
||||
CFG_ID, CFG_DESC, IP_TYPE, SRC_IP, SRC_IP_MASK, SRC_PORT,
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" 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" />
|
||||
@@ -25,11 +26,13 @@
|
||||
<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="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="BaseStringMapWithUser" type="com.nis.domain.configuration.BaseStringCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" 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" />
|
||||
@@ -47,6 +50,7 @@
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<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="expr_type" property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.nis.web.dao.systemService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.SystemServiceInfo;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
@MyBatisDao
|
||||
public interface SystemServiceInfoDao extends CrudDao<SystemServiceInfo> {
|
||||
|
||||
List<SystemServiceInfo> getSystemServiceByServiceId(String serviceId);
|
||||
}
|
||||
@@ -1,144 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.systemService.SystemServiceInfoDao">
|
||||
|
||||
<resultMap id="systemServiceInfoMap" type="com.nis.domain.SystemServiceInfo">
|
||||
<id column="id" property="id"/>
|
||||
<result column="service_id" property="serviceId"/>
|
||||
<result column="service_name" property="serviceName"/>
|
||||
<result column="service_desc" property="serviceDesc"/>
|
||||
<result column="action" property="action"/>
|
||||
<result column="is_valid" property="isValid"/>
|
||||
<result column="service_type" property="serviceType"/>
|
||||
<result column="creator_id" property="creator.id"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="editor_id" property="editor.id"/>
|
||||
<result column="edit_time" property="editTime"/>
|
||||
<collection property="serviceConfigInfoList" column="{service_id=service_id}" select="findSysServiceConfigInfo"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="findList" resultMap="systemServiceInfoMap" parameterType="systemServiceInfo">
|
||||
select
|
||||
ssi.id,
|
||||
ssi.service_id,
|
||||
ssi.service_name,
|
||||
ssi.service_desc,
|
||||
ssi.action,
|
||||
ssi.is_valid,
|
||||
ssi.service_type,
|
||||
ssi.creator_id as "creator.id",
|
||||
suc.login_id as "creator.loginId",
|
||||
suc.name as "creator.name",
|
||||
ssi.create_time,
|
||||
ssi.editor_id as "editor.id",
|
||||
sue.login_id as "editor.login_id",
|
||||
sue.name as "editor.name",
|
||||
ssi.edit_time,
|
||||
ssi.is_initianlize
|
||||
from system_service_info ssi
|
||||
left join sys_user suc on suc.id=ssi.creator_id
|
||||
left join sys_user sue on sue.id=ssi.editor_id
|
||||
where 1=1
|
||||
<if test="serviceName != null and serviceName != ''">
|
||||
and ssi.service_name like CONCAT('%', #{serviceName}, '%')
|
||||
</if>
|
||||
<if test="serviceId != null and serviceId != ''">
|
||||
and ssi.service_id like CONCAT('%', #{serviceId}, '%')
|
||||
</if>
|
||||
<if test="action != null">
|
||||
and ssi.action=#{action}
|
||||
</if>
|
||||
<if test="serviceType != null">
|
||||
and ssi.service_type=#{serviceType}
|
||||
</if>
|
||||
<if test="serviceIdPre != null">
|
||||
and ssi.service_id like concat(#{serviceIdPre}, '%')
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
and ssi.is_valid=#{isValid}
|
||||
</if>
|
||||
order by ssi.service_id asc
|
||||
</select>
|
||||
|
||||
<select id="get" resultMap="systemServiceInfoMap">
|
||||
select
|
||||
ssi.id,
|
||||
ssi.service_id,
|
||||
ssi.service_name,
|
||||
ssi.service_desc,
|
||||
ssi.action,
|
||||
ssi.is_valid,
|
||||
ssi.service_type,
|
||||
ssi.creator_id as "creator.id",
|
||||
suc.login_id as "creator.login_id",
|
||||
suc.name as "creator.name",
|
||||
ssi.create_time,
|
||||
ssi.editor_id as "editor.id",
|
||||
sue.login_id as "editor.login_id",
|
||||
sue.name as "editor.name",
|
||||
ssi.edit_time,
|
||||
ssi.is_initianlize
|
||||
from system_service_info ssi
|
||||
left join sys_user suc on suc.id=ssi.creator_id
|
||||
left join sys_user sue on sue.id=ssi.editor_id
|
||||
where ssi.id=#{id}
|
||||
</select>
|
||||
|
||||
<select id="findSysServiceConfigInfo" resultType="serviceConfigInfo">
|
||||
select
|
||||
id,
|
||||
table_name,
|
||||
table_desc,
|
||||
table_type,
|
||||
maat_table,
|
||||
service_id,
|
||||
is_valid,
|
||||
is_initianlize
|
||||
from
|
||||
service_config_info
|
||||
where
|
||||
service_id=#{service_id} and is_valid=1
|
||||
</select>
|
||||
|
||||
<select id="getSystemServiceByServiceId" resultType="systemServiceInfo">
|
||||
select
|
||||
id, is_valid
|
||||
from
|
||||
system_service_info
|
||||
where
|
||||
service_id=#{serviceId}
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into system_service_info (
|
||||
service_id, service_name, service_desc, action, is_valid, service_type,
|
||||
creator_id, create_time, is_initianlize
|
||||
) values(
|
||||
#{serviceId}, #{serviceName}, #{serviceDesc}, #{action}, #{isValid}, #{serviceType},
|
||||
#{creator.id}, #{createTime}, #{isInitianlize}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
update
|
||||
system_service_info
|
||||
set
|
||||
service_id=#{serviceId},
|
||||
service_name=#{serviceName},
|
||||
service_desc=#{serviceDesc},
|
||||
action=#{action},
|
||||
service_type=#{serviceType},
|
||||
editor_id=#{editor.id},
|
||||
edit_time=#{editTime}
|
||||
where id=#{id}
|
||||
</update>
|
||||
|
||||
<update id="delete">
|
||||
update
|
||||
system_service_info
|
||||
set
|
||||
is_valid=0
|
||||
where id=#{id}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -337,23 +337,22 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
|
||||
if(c.getCompileId()==null||c.getCompileId()==0){
|
||||
throw new RuntimeException("转换出错,未获取到正确的compileId");
|
||||
}
|
||||
if(StringUtils.isBlank(c.getMaatTable())){
|
||||
throw new RuntimeException("转换出错,未获取到正确的maatTalbe");
|
||||
}
|
||||
// if(StringUtils.isBlank(c.getMaatTable())){
|
||||
// throw new RuntimeException("转换出错,未获取到正确的maatTalbe");
|
||||
// }
|
||||
//针对含有多个maatTable的表
|
||||
if(c.getMaatTable().contains(",")){
|
||||
for(String maatTable:c.getMaatTable().split(",")){
|
||||
UnAuditBean bean=new UnAuditBean();
|
||||
bean.setCompileId(c.getCompileId());
|
||||
bean.setMaatTable(maatTable);
|
||||
toMaatUnAuditBean.getServiceCfg().add(bean);
|
||||
}
|
||||
}else{
|
||||
UnAuditBean bean=new UnAuditBean();
|
||||
bean.setCompileId(c.getCompileId());
|
||||
bean.setMaatTable(c.getMaatTable());
|
||||
toMaatUnAuditBean.getServiceCfg().add(bean);
|
||||
}
|
||||
// if(c.getMaatTable().contains(",")){
|
||||
// for(String maatTable:c.getMaatTable().split(",")){
|
||||
// UnAuditBean bean=new UnAuditBean();
|
||||
// bean.setCompileId(c.getCompileId());
|
||||
// bean.setMaatTable(maatTable);
|
||||
// toMaatUnAuditBean.getServiceCfg().add(bean);
|
||||
// }
|
||||
// }else{
|
||||
// UnAuditBean bean=new UnAuditBean();
|
||||
// bean.setCompileId(c.getCompileId());
|
||||
// toMaatUnAuditBean.getServiceCfg().add(bean);
|
||||
// }
|
||||
|
||||
}
|
||||
beans.add(toMaatUnAuditBean);
|
||||
@@ -373,102 +372,102 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
|
||||
if(c instanceof BaseIpCfg){
|
||||
compileId=compileId==0?c.getCompileId():compileId;
|
||||
int protocolId= ((BaseIpCfg) c).getProtocolId().intValue();
|
||||
String maatTable=c.getMaatTable();
|
||||
if(maatTable.contains(",")){
|
||||
if(protocolId!=0){
|
||||
for(String _maatTable:maatTable.split(",")){
|
||||
if(_maatTable.toLowerCase().indexOf("ip")>-1){
|
||||
BaseIpCfg ipCfg=(BaseIpCfg)c.clone();
|
||||
ipCfg.setMaatTable(_maatTable);
|
||||
if(maatCfg.getIpCfg()==null){
|
||||
List<BaseIpCfg> list=new ArrayList<>();
|
||||
list.add(ipCfg);
|
||||
maatCfg.setIpCfg(list);
|
||||
}else{
|
||||
List<BaseIpCfg> list=maatCfg.getIpCfg();
|
||||
list.add(ipCfg);
|
||||
}
|
||||
}else{
|
||||
NumBoundaryCfg numCfg=new NumBoundaryCfg();
|
||||
numCfg.initDefaultValue();
|
||||
numCfg.setLowBounadry((long)protocolId);
|
||||
numCfg.setUpBoundary((long)protocolId);
|
||||
numCfg.setMaatTable(_maatTable);
|
||||
if(maatCfg.getNumCfg()==null){
|
||||
List<NumBoundaryCfg> numlist=new ArrayList<>();
|
||||
numlist.add(numCfg);
|
||||
maatCfg.setNumCfg(numlist);
|
||||
}else{
|
||||
List<NumBoundaryCfg> numlist=maatCfg.getNumCfg();
|
||||
numlist.add(numCfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
throw new RuntimeException("protocolId等于0,却对应两个maat_table "+maatTable);
|
||||
}
|
||||
}else{
|
||||
if(maatCfg.getIpCfg()==null){
|
||||
List<BaseIpCfg> list=new ArrayList<>();
|
||||
list.add((BaseIpCfg)c);
|
||||
maatCfg.setIpCfg(list);
|
||||
}else{
|
||||
List<BaseIpCfg> list=maatCfg.getIpCfg();
|
||||
list.add((BaseIpCfg)c);
|
||||
}
|
||||
}
|
||||
// String maatTable=c.getMaatTable();
|
||||
// if(maatTable.contains(",")){
|
||||
// if(protocolId!=0){
|
||||
// for(String _maatTable:maatTable.split(",")){
|
||||
// if(_maatTable.toLowerCase().indexOf("ip")>-1){
|
||||
// BaseIpCfg ipCfg=(BaseIpCfg)c.clone();
|
||||
// ipCfg.setMaatTable(_maatTable);
|
||||
// if(maatCfg.getIpCfg()==null){
|
||||
// List<BaseIpCfg> list=new ArrayList<>();
|
||||
// list.add(ipCfg);
|
||||
// maatCfg.setIpCfg(list);
|
||||
// }else{
|
||||
// List<BaseIpCfg> list=maatCfg.getIpCfg();
|
||||
// list.add(ipCfg);
|
||||
// }
|
||||
// }else{
|
||||
// NumBoundaryCfg numCfg=new NumBoundaryCfg();
|
||||
// numCfg.initDefaultValue();
|
||||
// numCfg.setLowBounadry((long)protocolId);
|
||||
// numCfg.setUpBoundary((long)protocolId);
|
||||
// numCfg.setMaatTable(_maatTable);
|
||||
// if(maatCfg.getNumCfg()==null){
|
||||
// List<NumBoundaryCfg> numlist=new ArrayList<>();
|
||||
// numlist.add(numCfg);
|
||||
// maatCfg.setNumCfg(numlist);
|
||||
// }else{
|
||||
// List<NumBoundaryCfg> numlist=maatCfg.getNumCfg();
|
||||
// numlist.add(numCfg);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
// throw new RuntimeException("protocolId等于0,却对应两个maat_table "+maatTable);
|
||||
// }
|
||||
// }else{
|
||||
// if(maatCfg.getIpCfg()==null){
|
||||
// List<BaseIpCfg> list=new ArrayList<>();
|
||||
// list.add((BaseIpCfg)c);
|
||||
// maatCfg.setIpCfg(list);
|
||||
// }else{
|
||||
// List<BaseIpCfg> list=maatCfg.getIpCfg();
|
||||
// list.add((BaseIpCfg)c);
|
||||
// }
|
||||
// }
|
||||
}else if(c instanceof BaseStringCfg){
|
||||
compileId=compileId==0?c.getCompileId():compileId;
|
||||
String maatTable=c.getMaatTable();
|
||||
if(maatTable.contains(",")){
|
||||
for(String _maatTable:maatTable.split(",")){
|
||||
BaseStringCfg strCfg=(BaseStringCfg)c.clone();
|
||||
strCfg.setMaatTable(_maatTable);
|
||||
if(maatCfg.getStrCfg()==null){
|
||||
List<BaseStringCfg> list=new ArrayList<BaseStringCfg>();
|
||||
list.add(strCfg);
|
||||
maatCfg.setStrCfg(list);
|
||||
}else{
|
||||
List<BaseStringCfg> list=maatCfg.getStrCfg();
|
||||
list.add(strCfg);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(maatCfg.getStrCfg()==null){
|
||||
List<BaseStringCfg> list=new ArrayList<BaseStringCfg>();
|
||||
list.add((BaseStringCfg)c);
|
||||
maatCfg.setStrCfg(list);
|
||||
}else{
|
||||
List<BaseStringCfg> list=maatCfg.getStrCfg();
|
||||
list.add((BaseStringCfg)c);
|
||||
}
|
||||
}
|
||||
// String maatTable=c.getMaatTable();
|
||||
// if(maatTable.contains(",")){
|
||||
// for(String _maatTable:maatTable.split(",")){
|
||||
// BaseStringCfg strCfg=(BaseStringCfg)c.clone();
|
||||
// strCfg.setMaatTable(_maatTable);
|
||||
// if(maatCfg.getStrCfg()==null){
|
||||
// List<BaseStringCfg> list=new ArrayList<BaseStringCfg>();
|
||||
// list.add(strCfg);
|
||||
// maatCfg.setStrCfg(list);
|
||||
// }else{
|
||||
// List<BaseStringCfg> list=maatCfg.getStrCfg();
|
||||
// list.add(strCfg);
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
// if(maatCfg.getStrCfg()==null){
|
||||
// List<BaseStringCfg> list=new ArrayList<BaseStringCfg>();
|
||||
// list.add((BaseStringCfg)c);
|
||||
// maatCfg.setStrCfg(list);
|
||||
// }else{
|
||||
// List<BaseStringCfg> list=maatCfg.getStrCfg();
|
||||
// list.add((BaseStringCfg)c);
|
||||
// }
|
||||
// }
|
||||
}else if(c instanceof ComplexkeywordCfg){
|
||||
compileId=compileId==0?c.getCompileId():compileId;
|
||||
String maatTable=c.getMaatTable();
|
||||
if(maatTable.contains(",")){
|
||||
for(String _maatTable:maatTable.split(",")){
|
||||
ComplexkeywordCfg complexCfg=(ComplexkeywordCfg)c.clone();
|
||||
complexCfg.setMaatTable(_maatTable);
|
||||
if(maatCfg.getComplexStrCfg()==null){
|
||||
List<ComplexkeywordCfg> list=new ArrayList<ComplexkeywordCfg>();
|
||||
list.add(complexCfg);
|
||||
maatCfg.setComplexStrCfg(list);
|
||||
}else{
|
||||
List<ComplexkeywordCfg> list=maatCfg.getComplexStrCfg();
|
||||
list.add(complexCfg);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(maatCfg.getComplexStrCfg()==null){
|
||||
List<ComplexkeywordCfg> list=new ArrayList<ComplexkeywordCfg>();
|
||||
list.add((ComplexkeywordCfg)c);
|
||||
maatCfg.setComplexStrCfg(list);
|
||||
}else{
|
||||
List<ComplexkeywordCfg> list=maatCfg.getComplexStrCfg();
|
||||
list.add((ComplexkeywordCfg)c);
|
||||
}
|
||||
}
|
||||
// String maatTable=c.getMaatTable();
|
||||
// if(maatTable.contains(",")){
|
||||
// for(String _maatTable:maatTable.split(",")){
|
||||
// ComplexkeywordCfg complexCfg=(ComplexkeywordCfg)c.clone();
|
||||
// complexCfg.setMaatTable(_maatTable);
|
||||
// if(maatCfg.getComplexStrCfg()==null){
|
||||
// List<ComplexkeywordCfg> list=new ArrayList<ComplexkeywordCfg>();
|
||||
// list.add(complexCfg);
|
||||
// maatCfg.setComplexStrCfg(list);
|
||||
// }else{
|
||||
// List<ComplexkeywordCfg> list=maatCfg.getComplexStrCfg();
|
||||
// list.add(complexCfg);
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
// if(maatCfg.getComplexStrCfg()==null){
|
||||
// List<ComplexkeywordCfg> list=new ArrayList<ComplexkeywordCfg>();
|
||||
// list.add((ComplexkeywordCfg)c);
|
||||
// maatCfg.setComplexStrCfg(list);
|
||||
// }else{
|
||||
// List<ComplexkeywordCfg> list=maatCfg.getComplexStrCfg();
|
||||
// list.add((ComplexkeywordCfg)c);
|
||||
// }
|
||||
// }
|
||||
|
||||
}else if(c instanceof NumBoundaryCfg){
|
||||
compileId=compileId==0?c.getCompileId():compileId;
|
||||
@@ -562,23 +561,23 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
|
||||
if(c.getCompileId()==null||c.getCompileId()==0){
|
||||
throw new RuntimeException("转换出错,未获取到正确的compileId");
|
||||
}
|
||||
if(StringUtils.isBlank(c.getMaatTable())){
|
||||
throw new RuntimeException("转换出错,未获取到正确的maatTalbe");
|
||||
}
|
||||
// if(StringUtils.isBlank(c.getMaatTable())){
|
||||
// throw new RuntimeException("转换出错,未获取到正确的maatTalbe");
|
||||
// }
|
||||
//针对含有多个maatTable的表
|
||||
if(c.getMaatTable().contains(",")){
|
||||
for(String maatTable:c.getMaatTable().split(",")){
|
||||
UnAuditBean bean=new UnAuditBean();
|
||||
bean.setCompileId(c.getCompileId());
|
||||
bean.setMaatTable(maatTable);
|
||||
toMaatUnAuditBean.getServiceCfg().add(bean);
|
||||
}
|
||||
}else{
|
||||
UnAuditBean bean=new UnAuditBean();
|
||||
bean.setCompileId(c.getCompileId());
|
||||
bean.setMaatTable(c.getMaatTable());
|
||||
toMaatUnAuditBean.getServiceCfg().add(bean);
|
||||
}
|
||||
// if(c.getMaatTable().contains(",")){
|
||||
// for(String maatTable:c.getMaatTable().split(",")){
|
||||
// UnAuditBean bean=new UnAuditBean();
|
||||
// bean.setCompileId(c.getCompileId());
|
||||
// bean.setMaatTable(maatTable);
|
||||
// toMaatUnAuditBean.getServiceCfg().add(bean);
|
||||
// }
|
||||
// }else{
|
||||
// UnAuditBean bean=new UnAuditBean();
|
||||
// bean.setCompileId(c.getCompileId());
|
||||
// bean.setMaatTable(c.getMaatTable());
|
||||
// toMaatUnAuditBean.getServiceCfg().add(bean);
|
||||
// }
|
||||
|
||||
}
|
||||
String json=gson.toJson(toMaatUnAuditBean);
|
||||
@@ -594,102 +593,102 @@ public abstract class CrudService<D extends CrudDao<T>, T extends BaseEntity<T>>
|
||||
if(c instanceof BaseIpCfg){
|
||||
compileId=compileId==0?c.getCompileId():compileId;
|
||||
int protocolId= ((BaseIpCfg) c).getProtocolId().intValue();
|
||||
String maatTable=c.getMaatTable();
|
||||
if(maatTable.contains(",")){
|
||||
if(protocolId!=0){
|
||||
for(String _maatTable:maatTable.split(",")){
|
||||
if(_maatTable.toLowerCase().indexOf("ip")>-1){
|
||||
BaseIpCfg ipCfg=(BaseIpCfg)c.clone();
|
||||
ipCfg.setMaatTable(_maatTable);
|
||||
if(maatCfg.getIpCfg()==null){
|
||||
List<BaseIpCfg> list=new ArrayList<>();
|
||||
list.add(ipCfg);
|
||||
maatCfg.setIpCfg(list);
|
||||
}else{
|
||||
List<BaseIpCfg> list=maatCfg.getIpCfg();
|
||||
list.add(ipCfg);
|
||||
}
|
||||
}else{
|
||||
NumBoundaryCfg numCfg=new NumBoundaryCfg();
|
||||
numCfg.initDefaultValue();
|
||||
numCfg.setLowBounadry((long)protocolId);
|
||||
numCfg.setUpBoundary((long)protocolId);
|
||||
numCfg.setMaatTable(_maatTable);
|
||||
if(maatCfg.getNumCfg()==null){
|
||||
List<NumBoundaryCfg> numlist=new ArrayList<>();
|
||||
numlist.add(numCfg);
|
||||
maatCfg.setNumCfg(numlist);
|
||||
}else{
|
||||
List<NumBoundaryCfg> numlist=maatCfg.getNumCfg();
|
||||
numlist.add(numCfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
throw new RuntimeException("protocolId等于0,却对应两个maat_table "+maatTable);
|
||||
}
|
||||
}else{
|
||||
if(maatCfg.getIpCfg()==null){
|
||||
List<BaseIpCfg> list=new ArrayList<>();
|
||||
list.add((BaseIpCfg)c);
|
||||
maatCfg.setIpCfg(list);
|
||||
}else{
|
||||
List<BaseIpCfg> list=maatCfg.getIpCfg();
|
||||
list.add((BaseIpCfg)c);
|
||||
}
|
||||
}
|
||||
// String maatTable=c.getMaatTable();
|
||||
// if(maatTable.contains(",")){
|
||||
// if(protocolId!=0){
|
||||
// for(String _maatTable:maatTable.split(",")){
|
||||
// if(_maatTable.toLowerCase().indexOf("ip")>-1){
|
||||
// BaseIpCfg ipCfg=(BaseIpCfg)c.clone();
|
||||
// ipCfg.setMaatTable(_maatTable);
|
||||
// if(maatCfg.getIpCfg()==null){
|
||||
// List<BaseIpCfg> list=new ArrayList<>();
|
||||
// list.add(ipCfg);
|
||||
// maatCfg.setIpCfg(list);
|
||||
// }else{
|
||||
// List<BaseIpCfg> list=maatCfg.getIpCfg();
|
||||
// list.add(ipCfg);
|
||||
// }
|
||||
// }else{
|
||||
// NumBoundaryCfg numCfg=new NumBoundaryCfg();
|
||||
// numCfg.initDefaultValue();
|
||||
// numCfg.setLowBounadry((long)protocolId);
|
||||
// numCfg.setUpBoundary((long)protocolId);
|
||||
// numCfg.setMaatTable(_maatTable);
|
||||
// if(maatCfg.getNumCfg()==null){
|
||||
// List<NumBoundaryCfg> numlist=new ArrayList<>();
|
||||
// numlist.add(numCfg);
|
||||
// maatCfg.setNumCfg(numlist);
|
||||
// }else{
|
||||
// List<NumBoundaryCfg> numlist=maatCfg.getNumCfg();
|
||||
// numlist.add(numCfg);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
// throw new RuntimeException("protocolId等于0,却对应两个maat_table "+maatTable);
|
||||
// }
|
||||
// }else{
|
||||
// if(maatCfg.getIpCfg()==null){
|
||||
// List<BaseIpCfg> list=new ArrayList<>();
|
||||
// list.add((BaseIpCfg)c);
|
||||
// maatCfg.setIpCfg(list);
|
||||
// }else{
|
||||
// List<BaseIpCfg> list=maatCfg.getIpCfg();
|
||||
// list.add((BaseIpCfg)c);
|
||||
// }
|
||||
// }
|
||||
}else if(c instanceof BaseStringCfg){
|
||||
compileId=compileId==0?c.getCompileId():compileId;
|
||||
String maatTable=c.getMaatTable();
|
||||
if(maatTable.contains(",")){
|
||||
for(String _maatTable:maatTable.split(",")){
|
||||
BaseStringCfg strCfg=(BaseStringCfg)c.clone();
|
||||
strCfg.setMaatTable(_maatTable);
|
||||
if(maatCfg.getStrCfg()==null){
|
||||
List<BaseStringCfg> list=new ArrayList<BaseStringCfg>();
|
||||
list.add(strCfg);
|
||||
maatCfg.setStrCfg(list);
|
||||
}else{
|
||||
List<BaseStringCfg> list=maatCfg.getStrCfg();
|
||||
list.add(strCfg);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(maatCfg.getStrCfg()==null){
|
||||
List<BaseStringCfg> list=new ArrayList<BaseStringCfg>();
|
||||
list.add((BaseStringCfg)c);
|
||||
maatCfg.setStrCfg(list);
|
||||
}else{
|
||||
List<BaseStringCfg> list=maatCfg.getStrCfg();
|
||||
list.add((BaseStringCfg)c);
|
||||
}
|
||||
}
|
||||
// String maatTable=c.getMaatTable();
|
||||
// if(maatTable.contains(",")){
|
||||
// for(String _maatTable:maatTable.split(",")){
|
||||
// BaseStringCfg strCfg=(BaseStringCfg)c.clone();
|
||||
// strCfg.setMaatTable(_maatTable);
|
||||
// if(maatCfg.getStrCfg()==null){
|
||||
// List<BaseStringCfg> list=new ArrayList<BaseStringCfg>();
|
||||
// list.add(strCfg);
|
||||
// maatCfg.setStrCfg(list);
|
||||
// }else{
|
||||
// List<BaseStringCfg> list=maatCfg.getStrCfg();
|
||||
// list.add(strCfg);
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
// if(maatCfg.getStrCfg()==null){
|
||||
// List<BaseStringCfg> list=new ArrayList<BaseStringCfg>();
|
||||
// list.add((BaseStringCfg)c);
|
||||
// maatCfg.setStrCfg(list);
|
||||
// }else{
|
||||
// List<BaseStringCfg> list=maatCfg.getStrCfg();
|
||||
// list.add((BaseStringCfg)c);
|
||||
// }
|
||||
// }
|
||||
}else if(c instanceof ComplexkeywordCfg){
|
||||
compileId=compileId==0?c.getCompileId():compileId;
|
||||
String maatTable=c.getMaatTable();
|
||||
if(maatTable.contains(",")){
|
||||
for(String _maatTable:maatTable.split(",")){
|
||||
ComplexkeywordCfg complexCfg=(ComplexkeywordCfg)c.clone();
|
||||
complexCfg.setMaatTable(_maatTable);
|
||||
if(maatCfg.getComplexStrCfg()==null){
|
||||
List<ComplexkeywordCfg> list=new ArrayList<ComplexkeywordCfg>();
|
||||
list.add(complexCfg);
|
||||
maatCfg.setComplexStrCfg(list);
|
||||
}else{
|
||||
List<ComplexkeywordCfg> list=maatCfg.getComplexStrCfg();
|
||||
list.add(complexCfg);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(maatCfg.getComplexStrCfg()==null){
|
||||
List<ComplexkeywordCfg> list=new ArrayList<ComplexkeywordCfg>();
|
||||
list.add((ComplexkeywordCfg)c);
|
||||
maatCfg.setComplexStrCfg(list);
|
||||
}else{
|
||||
List<ComplexkeywordCfg> list=maatCfg.getComplexStrCfg();
|
||||
list.add((ComplexkeywordCfg)c);
|
||||
}
|
||||
}
|
||||
// String maatTable=c.getMaatTable();
|
||||
// if(maatTable.contains(",")){
|
||||
// for(String _maatTable:maatTable.split(",")){
|
||||
// ComplexkeywordCfg complexCfg=(ComplexkeywordCfg)c.clone();
|
||||
// complexCfg.setMaatTable(_maatTable);
|
||||
// if(maatCfg.getComplexStrCfg()==null){
|
||||
// List<ComplexkeywordCfg> list=new ArrayList<ComplexkeywordCfg>();
|
||||
// list.add(complexCfg);
|
||||
// maatCfg.setComplexStrCfg(list);
|
||||
// }else{
|
||||
// List<ComplexkeywordCfg> list=maatCfg.getComplexStrCfg();
|
||||
// list.add(complexCfg);
|
||||
// }
|
||||
// }
|
||||
// }else{
|
||||
// if(maatCfg.getComplexStrCfg()==null){
|
||||
// List<ComplexkeywordCfg> list=new ArrayList<ComplexkeywordCfg>();
|
||||
// list.add((ComplexkeywordCfg)c);
|
||||
// maatCfg.setComplexStrCfg(list);
|
||||
// }else{
|
||||
// List<ComplexkeywordCfg> list=maatCfg.getComplexStrCfg();
|
||||
// list.add((ComplexkeywordCfg)c);
|
||||
// }
|
||||
// }
|
||||
|
||||
}else if(c instanceof NumBoundaryCfg){
|
||||
compileId=compileId==0?c.getCompileId():compileId;
|
||||
|
||||
@@ -349,7 +349,6 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
if(!StringUtil.isEmpty(cList)){
|
||||
for(ServiceConfigInfo c:cList){
|
||||
if(c.getTableName().equals(featuresCfg.getFeaturesTable())){
|
||||
cfg.setMaatTable(c.getMaatTable());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -365,7 +364,6 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
if(!StringUtil.isEmpty(cList)){
|
||||
for(ServiceConfigInfo c:cList){
|
||||
if(c.getTableName().equals(featuresCfg.getFeaturesTable())){
|
||||
cfg.setMaatTable(c.getMaatTable());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -453,7 +451,6 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
if(!StringUtil.isEmpty(cList)){
|
||||
for(ServiceConfigInfo c:cList){
|
||||
if(c.getTableName().equals(featuresCfg.getFeaturesTable())){
|
||||
strCfg.setMaatTable(c.getMaatTable());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -470,7 +467,6 @@ public class AppCfgService extends CrudService<AppCfgDao,AppIdCfg> {
|
||||
if(!StringUtil.isEmpty(cList)){
|
||||
for(ServiceConfigInfo c:cList){
|
||||
if(c.getTableName().equals(featuresCfg.getFeaturesTable())){
|
||||
complexCfg.setMaatTable(c.getMaatTable());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import org.springframework.stereotype.Service;
|
||||
import com.nis.web.dao.FunctionRegionDictDao;
|
||||
import com.nis.web.dao.FunctionServiceDictDao;
|
||||
import com.nis.web.dao.configuration.AvCfgDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
import com.nis.web.service.BaseService;
|
||||
|
||||
|
||||
/**
|
||||
@@ -16,7 +16,7 @@ import com.nis.web.service.CrudService;
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class AvCfgService extends CrudService {
|
||||
public class AvCfgService extends BaseService {
|
||||
@Autowired
|
||||
protected FunctionRegionDictDao functionRegionDictDao;
|
||||
@Autowired
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
package com.nis.web.service.systemService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.nis.domain.ServiceConfigInfo;
|
||||
import com.nis.domain.SystemServiceInfo;
|
||||
import com.nis.util.Collections3;
|
||||
import com.nis.web.dao.systemService.ServiceConfigInfoDao;
|
||||
import com.nis.web.dao.systemService.SystemServiceInfoDao;
|
||||
import com.nis.web.service.CrudService;
|
||||
|
||||
@Service
|
||||
public class SystemServiceService extends CrudService<SystemServiceInfoDao, SystemServiceInfo>{
|
||||
|
||||
@Autowired
|
||||
private ServiceConfigInfoDao serviceConfigInfoDao;
|
||||
|
||||
public void deleteService(SystemServiceInfo systemServiceInfo) {
|
||||
List<ServiceConfigInfo> serviceConfigInfoList = dao.get(systemServiceInfo).getServiceConfigInfoList();
|
||||
for (ServiceConfigInfo sci : serviceConfigInfoList) {
|
||||
sci.setIsValid(0);
|
||||
serviceConfigInfoDao.update(sci);
|
||||
}
|
||||
|
||||
dao.delete(systemServiceInfo);
|
||||
}
|
||||
|
||||
public void save(SystemServiceInfo systemServiceInfo, List<ServiceConfigInfo> insertServiceConfigInfoList,
|
||||
List<ServiceConfigInfo> updateServiceConfigInfoList) {
|
||||
//新增
|
||||
if (systemServiceInfo.getId() == null) {
|
||||
dao.insert(systemServiceInfo);
|
||||
|
||||
if (!Collections3.isEmpty(insertServiceConfigInfoList)) {
|
||||
for (ServiceConfigInfo sci : insertServiceConfigInfoList) {
|
||||
serviceConfigInfoDao.insert(sci);
|
||||
}
|
||||
}
|
||||
}
|
||||
//更新
|
||||
else {
|
||||
dao.update(systemServiceInfo);
|
||||
|
||||
if (!Collections3.isEmpty(insertServiceConfigInfoList)) {
|
||||
for (ServiceConfigInfo sci : insertServiceConfigInfoList) {
|
||||
serviceConfigInfoDao.insert(sci);
|
||||
}
|
||||
}
|
||||
if (!Collections3.isEmpty(updateServiceConfigInfoList)) {
|
||||
for (ServiceConfigInfo sci : updateServiceConfigInfoList) {
|
||||
serviceConfigInfoDao.update(sci);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public List<SystemServiceInfo> getSystemServiceByServiceId(String serviceId) {
|
||||
return dao.getSystemServiceByServiceId(serviceId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<!-- <bean class="com.nis.restful.SwaggerConfig" /> -->
|
||||
<!-- redis 工具类-->
|
||||
<bean id="redisDao" class="com.nis.util.redis.RedisDao" />
|
||||
<!-- <bean id="redisDao" class="com.nis.util.redis.RedisDao" /> -->
|
||||
<!-- elasticsearch 工具类 将查询转化为elasticsearch-sql支持的语法-->
|
||||
<!-- <bean id="elasticsearchSqlDao" class="com.nis.util.elasticsearch.ElasticsearchSqlDao"/> -->
|
||||
<!-- 定义httpclient连接池 -->
|
||||
|
||||
Reference in New Issue
Block a user