批量配置失效、全量下发、各业务全量下发功能提交

This commit is contained in:
段冬梅
2019-03-15 16:15:11 +08:00
parent e977d00657
commit 9a9b050fc7
14 changed files with 604 additions and 307 deletions

View File

@@ -97,6 +97,7 @@ public interface ConfigSynchronizationDao {
public List<ComplexkeywordCfg> getComplexStrListByService(BaseCfg entity);
public List<IpPortCfg> getAppIpPortList(@Param("tableName")String tableName,@Param("compileIds")List compileIds);
public List<AppIpCfg> getAppIpFeatureList(BaseCfg entity);
public List<AppIpCfg> getAsnIpList(BaseCfg entity);
public void updateCfgStatus(BaseCfg entity);

View File

@@ -777,7 +777,7 @@
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.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
,a.protocol,a.protocol_id,a.direction,a.dest_port,a.dest_ip_address,a.cfg_type,a.pps_threadshold,
a.antiddos_protocol,a.bps_threadshold,a.do_blacklist
a.antiddos_protocol,a.bps_threadshold
</sql>
<sql id="IpCfg_Column" >
a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port,
@@ -813,9 +813,9 @@
a.expr_type,a.match_method,a.is_hexbin,a.compile_id
</sql>
<sql id="DigestCfg_Column" >
a.cfg_id,a.cfg_desc,a.action,a.is_valid,a.is_audit,a.creator_id,a.audit_time,
a.cfg_id,a.cfg_desc,a.cfg_type,a.raw_len,a.digest,a.cfds_level,a.file_url,a.action,a.is_valid,a.is_audit,a.creator_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.do_log,a.user_region1,a.user_region2,
a.area_effective_ids,a.function_id,a.do_log,a.user_region1,a.user_region2
</sql>
<sql id="PxyObjTrustedCaCertColumns">
a.cfg_id,a.cfg_desc
@@ -1062,7 +1062,7 @@
SELECT
<include refid="DigestCfg_Column" />
<trim prefix="," prefixOverrides=",">
, s.name as creator_name,u.name as auditor_name
s.name as creator_name,u.name as auditor_name
</trim>
FROM file_digest_cfg a
left join sys_user s on a.creator_id=s.id
@@ -1124,30 +1124,6 @@
</foreach>
</where>
</select>
<select id="getAsnIpList" resultType="com.nis.domain.basics.AsnIpCfg">
SELECT
<include refid="AsnIpCfg_Column" />
FROM asn_ip_cfg a
<where>
a.is_valid!=-1
<if test="isAudit != null">
AND a.is_audit=#{isAudit,jdbcType=INTEGER}
</if>
and a.asn_ip_group in
<foreach collection="asnGroupIds" index="index" item="groupId" open="(" separator="," close=")">
#{groupId}
</foreach>
<!-- <if test="compileId != null">
AND a.compile_id =#{compileId}
</if>
<if test="functionId != null">
AND a.function_id =#{functionId}
</if>
<if test="serviceId!= null">
AND a.service_id =#{serviceId}
</if> -->
</where>
</select>
<select id="getStrList" resultMap="stringCfgMap" >
SELECT
<include refid="StrCfg_Column" />
@@ -1260,7 +1236,7 @@
AND a.compile_id=#{compileId,jdbcType=INTEGER}
</if>
and a.is_valid!=-1
and (cert_id is null or cert_id == 0)
and (cert_id is null or cert_id = 0)
</trim>
ORDER BY a.CFG_ID
</select>
@@ -1625,6 +1601,39 @@
</trim>
ORDER BY a.CFG_ID
</select>
<select id="getAsnIpList" resultType="com.nis.domain.basics.AsnIpCfg" parameterType="com.nis.domain.configuration.CfgIndexInfo">
select
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
,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.region_id,a.is_area_effective,a.classify,a.attribute,a.lable
,a.area_effective_ids,a.function_id,a.cfg_region_code,a.asn_ip_group,a.user_region1
,a.user_region2,a.user_region3,a.user_region4,a.user_region5,a.organization,a.country,a.detail,a.compile_id
from ${tableName} a
<trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test="serviceId != null">
AND a.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
</if>
<if test="functionId != null">
AND a.function_id=#{functionId,jdbcType=INTEGER}
</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="isAudit != null">
AND a.is_audit=#{isAudit,jdbcType=INTEGER}
</if>
<if test="compileId != null">
AND a.compile_id=#{compileId,jdbcType=INTEGER}
</if>
and a.is_valid!=-1
</trim>
ORDER BY a.CFG_ID
</select>
<select id="getSpoofingIpPoolList" resultType="com.nis.domain.configuration.PxyObjSpoofingIpPool" parameterType="com.nis.domain.configuration.CfgIndexInfo">
SELECT