1、增加NTC_BGP_AS配置域

2、增加Subcribe ID配置域
3、增加do_log
This commit is contained in:
leijun
2018-08-22 10:26:52 +08:00
parent b5da00f715
commit e458363886
12 changed files with 1806 additions and 992 deletions

View File

@@ -15,6 +15,8 @@ import com.nis.domain.configuration.HttpReqHeadCfg;
import com.nis.domain.configuration.HttpResHeadCfg;
import com.nis.domain.configuration.HttpUrlCfg;
import com.nis.domain.configuration.IpPortCfg;
import com.nis.domain.configuration.NtcBgpAsCfg;
import com.nis.domain.configuration.NtcSubscribeIdCfg;
import com.nis.domain.configuration.SslKeywordCfg;
import com.nis.web.dao.CrudDao;
import com.nis.web.dao.MyBatisDao;
@@ -32,16 +34,19 @@ public interface BgpCfgDao extends CrudDao<CfgIndexInfo>{
public List<CfgIndexInfo> getBgpList(CfgIndexInfo entity);
public List<IpPortCfg> getIpPortList(CfgIndexInfo entity);
public List<HttpUrlCfg> getHttpUrlList(CfgIndexInfo entity);
public List<NtcBgpAsCfg> getNtcBgpAsList(CfgIndexInfo entity);
public void saveNtcBgpAsCfg(NtcBgpAsCfg entity);
public void deleteBgpAsCfg(CfgIndexInfo entity);
public void saveCfgIndex(CfgIndexInfo entity);
public void saveIpPortCfg(IpPortCfg entity);
public void updateBgpAsCfg(CfgIndexInfo entity);
public void updateSubscribeIdCfg(CfgIndexInfo entity);
//public void saveHttpUrlCfg(HttpUrlCfg entity);
public void deleteHttpIpCfg(CfgIndexInfo entity);
//public void deleteHttpUrlCfg(CfgIndexInfo entity);
public void updateCfgIndex(CfgIndexInfo entity);
public void updateCfgValid(BaseCfg entity);
public void auditCfg(BaseCfg entity);
public void saveDnsDomainCfg(ComplexkeywordCfg entity);
public void deleteIpCfg(CfgIndexInfo entity);

View File

@@ -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="ipPortMap" type="com.nis.domain.configuration.IpPortCfg" >
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
@@ -117,11 +118,47 @@
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="BgpAsCfgMap" type="com.nis.domain.configuration.NtcBgpAsCfg" >
<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" />
<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="function_id" property="functionId" jdbcType="INTEGER" />
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
</resultMap>
<sql id="BgpAsCfg_Column">
r.cfg_id,r.cfg_desc,r.cfg_keywords,r.cfg_type,
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.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,r.cfg_region_code
</sql>
<sql id="ConfigIndex_Column" >
a.CFG_ID,a.CFG_DESC,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.AREA_EFFECTIVE_IDS,a.function_id
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.do_log
</sql>
<sql id="IpCfg_Column" >
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
@@ -271,6 +308,25 @@
<include refid="StrCfg_Column" />
FROM http_url_cfg a where compile_id=#{compileId} and function_id=#{functionId}
</select>
<select id="getNtcBgpAsList" resultMap="BgpAsCfgMap" parameterType="com.nis.domain.configuration.NtcBgpAsCfg">
select
<include refid="BgpAsCfg_Column" />
from ntc_bgp_as_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>
<!-- insert cfgIndexInfox -->
<insert id="saveCfgIndex" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
@@ -296,7 +352,8 @@
ATTRIBUTE,
LABLE,
AREA_EFFECTIVE_IDS,
function_id
function_id,
do_log
)values (
#{cfgDesc,jdbcType=VARCHAR},
#{action,jdbcType=INTEGER},
@@ -316,7 +373,8 @@
#{attribute,jdbcType=VARCHAR},
#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{functionId,jdbcType=INTEGER}
#{functionId,jdbcType=INTEGER},
#{doLog,jdbcType=INTEGER}
)
</insert>
<!-- insert ip_port_cfg表信息 -->
@@ -450,6 +508,68 @@
#{isHexbin,jdbcType=INTEGER}
)
</insert>
<!-- insert ntc_bgp_as_cfg表信息 -->
<insert id="saveNtcBgpAsCfg" parameterType="com.nis.domain.configuration.NtcBgpAsCfg" >
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
SELECT LAST_INSERT_ID()
</selectKey>
insert into ntc_bgp_as_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>
<update id="updateCfgIndex" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
update cfg_index_info
<set >
@@ -499,6 +619,9 @@
</if>
<if test="functionId != null" >
function_id = #{functionId,jdbcType=INTEGER},
</if>
<if test="doLog != null" >
do_log = #{doLog,jdbcType=INTEGER},
</if>
</trim>
</set>
@@ -512,6 +635,10 @@
delete from http_url_cfg where compile_id=#{compileId} and function_id=#{functionId}
</delete>
<delete id="deleteBgpAsCfg" >
delete from ntc_bgp_as_cfg where compile_id=#{compileId} and function_id=#{functionId}
</delete>
<update id="updateCfgValid" parameterType="com.nis.domain.configuration.BaseCfg">
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER},
editor_id = #{editorId,jdbcType=INTEGER} ,
@@ -544,4 +671,181 @@
</trim>
</update>
<update id="updateBgpAsCfg" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
update ntc_bgp_as_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="ntcBgpAsCfg != null and ntcBgpAsCfg.cfgKeywords != null and ntcBgpAsCfg.cfgKeywords != ''" >
cfg_keywords = #{ntcBgpAsCfg.cfgKeywords,jdbcType=VARCHAR},
</if>
<if test="ntcBgpAsCfg != null and ntcBgpAsCfg.cfgType != null and ntcBgpAsCfg.cfgType != ''" >
cfg_type = #{ntcBgpAsCfg.cfgType,jdbcType=VARCHAR},
</if>
<if test="ntcBgpAsCfg != null and ntcBgpAsCfg.cfgRegionCode != null " >
cfg_region_code = #{ntcBgpAsCfg.cfgRegionCode,jdbcType=INTEGER},
</if>
<if test="ntcBgpAsCfg != null and ntcBgpAsCfg.exprType != null " >
expr_type = #{ntcBgpAsCfg.exprType,jdbcType=INTEGER},
</if>
<if test="ntcBgpAsCfg != null and ntcBgpAsCfg.matchMethod != null " >
match_method = #{ntcBgpAsCfg.matchMethod,jdbcType=INTEGER},
</if>
<if test="ntcBgpAsCfg != null and ntcBgpAsCfg.isHexbin != null " >
is_hexbin = #{ntcBgpAsCfg.isHexbin,jdbcType=INTEGER},
</if>
</trim>
</set>
<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>
</update>
<update id="updateSubscribeIdCfg" 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="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>
</update>
</mapper>