Protocol配置列表增加源/目的IP、关键字检索.

This commit is contained in:
zhangwq
2018-11-04 18:21:46 +08:00
parent 65ae455f38
commit 21fbccfa88
9 changed files with 88 additions and 113 deletions

View File

@@ -369,18 +369,17 @@
<if test="functionId != null">
AND r.function_id=#{functionId,jdbcType=INTEGER}
</if>
<if test="(ipPort.srcIpAddress != null and ipPort.srcIpAddress != '') or (ipPort.srcPort != null and ipPort.srcPort != '')">
<if test="ipPort != null">
AND r.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}
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}
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}
@@ -388,46 +387,16 @@
</where>
)
</if>
<!-- <if test="(voipIp.srcIpAddress != null and voipIp.srcIpAddress != '') or (voipIp.srcPort != null and voipIp.srcPort != '')">
AND r.compile_id in (select t.compile_id from av_voip_ip_cfg t
<if test="voipAccount != null">
AND r.compile_id in (SELECT s.compile_id FROM av_voip_account_cfg s
<where>
<if test="voipIp.srcIpAddress != null and voipIp.srcIpAddress != ''">
and t.src_ip_address =#{voipIp.srcIpAddress,jdbcType=VARCHAR}
<if test="voipAccount.cfgKeywords != null and voipAccount.cfgKeywords != ''">
REPLACE(s.cfg_keywords,'***and***','|') LIKE concat(concat('%',#{voipAccount.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
<if test="voipIp.srcPort != null and voipIp.srcPort != ''">
and t.src_port =#{voipIp.srcPort,jdbcType=VARCHAR}
</if>
</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>
)
</where>
)
</if>
<if test="avContUrlCfg!=null">
<if test="(avContUrlCfg.cfgKeywords != null and avContUrlCfg.cfgKeywords != '') ">
AND r.compile_id in (select s.compile_id from av_cont_url_cfg s
<where>
<if test="avContUrlCfg.cfgKeywords != null and avContUrlCfg.cfgKeywords != ''">
and s.cfg_keywords like concat(concat('%',#{avContUrlCfg.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
<if test="compileId != null">
and s.compile_id =#{compileId,jdbcType=INTEGER}
</if>
</where>
)
</if>
</if>
<!-- 数据范围过滤 -->
<!-- 数据范围过滤 -->
${sqlMap.dsf}
</trim>
<choose>

View File

@@ -265,15 +265,15 @@
<if test="ipPort!=null">
AND a.compile_id in (select t.compile_id from ip_port_cfg t
<where>
and t.protocol_id=4
and t.protocol_id=7
<if test="ipPort.srcIpAddress != null and ipPort.srcIpAddress != ''">
and t.src_ip_address =#{(ipPort.srcIpAddress,jdbcType=VARCHAR}
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}
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}
@@ -281,6 +281,11 @@
</where>
)
</if>
<if test="searchKeywords != null and searchKeywords !=''">
AND a.compile_id in (SELECT d.compile_id FROM ftp_keyword_cfg d WHERE
d.cfg_keywords LIKE concat(concat('%',#{searchKeywords,jdbcType=VARCHAR}),'%')
)
</if>
<if test="ntcSubscribeIdCfg != null">
AND a.compile_id in (select f.compile_id from ntc_subscribe_id_cfg f
<where>
@@ -293,16 +298,6 @@
</where>
)
</if>
<!-- <if test="ftp!=null">
AND a.compile_id in (select f.compile_id from ftp_keyword_cfg f
<where>
<if test="ftp.cfgKeywords != null and ftp.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{ftp.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
</where>
)
</if> -->
<!-- 数据范围过滤 -->
${sqlMap.dsf}
</trim>
@@ -691,15 +686,14 @@
<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}
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}
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}
@@ -708,27 +702,25 @@
)
</if>
<if test="p2pHash!=null">
AND a.compile_id in (select f.compile_id from p2p_hash_cfg h
AND a.compile_id in (select h.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}),'%')
REPLACE(h.cfg_keywords,'***and***','|') like concat(concat('%',#{p2pHash.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
</where>
</where>
)
</if>
<if test="p2pKeyword!=null">
AND a.compile_id in (select f.compile_id from p2p_keyword_cfg k
AND a.compile_id in (select k.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}),'%')
REPLACE(k.cfg_keywords,'***and***','|') like concat(concat('%',#{p2pKeyword.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
</where>
</where>
)
</if>
<if test="ntcSubscribeIdCfg!=null">
AND a.compile_id in (select f.compile_id from ntc_subscribe_id_cfg s
AND a.compile_id in (select s.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}),'%')

View File

@@ -216,15 +216,15 @@
<if test="ipPort!=null">
AND a.compile_id in (select t.compile_id from ip_port_cfg t
<where>
and t.protocol_id=4
and t.protocol_id=5
<if test="ipPort.srcIpAddress != null and ipPort.srcIpAddress != ''">
and t.src_ip_address =#{(ipPort.srcIpAddress,jdbcType=VARCHAR}
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}
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}
@@ -232,16 +232,11 @@
</where>
)
</if>
<!-- <if test="mail!=null">
AND a.compile_id in (select f.compile_id from mail_keyword_cfg f
<where>
<if test="mail.cfgKeywords != null and mail.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{mail.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
</where>
)
</if> -->
<if test="searchKeywords != null and searchKeywords !=''">
AND a.compile_id in (SELECT m.compile_id FROM mail_keyword_cfg m WHERE
REPLACE(m.cfg_keywords,'***and***','|') LIKE concat(concat('%',#{searchKeywords,jdbcType=VARCHAR}),'%')
)
</if>
<!-- 数据范围过滤 -->
${sqlMap.dsf}
</trim>