区域IP页面字段调整,删除src/dst开头字段,新增ip_pattern,ip_address,port_pattern,port字段

This commit is contained in:
wangxin
2018-05-21 09:05:21 +08:00
parent 24c28eb3ad
commit 425e76bbc1
3 changed files with 124 additions and 201 deletions

View File

@@ -16,7 +16,7 @@ package com.nis.domain.configuration;
* @version V1.0 * @version V1.0
*/ */
public class IpPortCfg extends BaseIpCfg { public class IpPortCfg extends BaseIpCfg {
private static final String tableName="ip_port_cfg";
/** /**
* @Fields serialVersionUID:TODO用一句话描述这个变量表示什么 * @Fields serialVersionUID:TODO用一句话描述这个变量表示什么
* *
@@ -42,5 +42,13 @@ public class IpPortCfg extends BaseIpCfg {
// TODO Auto-generated method stub // TODO Auto-generated method stub
super.setProtocolId(0); super.setProtocolId(0);
} }
/**
* tablename
* @return tablename
*/
public static String getTablename() {
return tableName;
}
} }

View File

@@ -4,15 +4,13 @@
<resultMap id="BaseIpMap" type="com.nis.domain.configuration.BaseIpCfg" > <resultMap id="BaseIpMap" type="com.nis.domain.configuration.BaseIpCfg" >
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" /> <id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" /> <result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
<result column="ip_type" property="ipType" jdbcType="INTEGER" /> <result column="ip_type" property="ipType" jdbcType="INTEGER" />
<result column="src_ip" property="srcIp" jdbcType="VARCHAR" /> <result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
<result column="src_ip_mask" property="srcIpMask" jdbcType="VARCHAR" /> <result column="ip_address" property="ipAddress" jdbcType="VARCHAR" />
<result column="src_port" property="srcPort" jdbcType="VARCHAR" /> <result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
<result column="src_port_mask" property="srcPortMask" jdbcType="VARCHAR" /> <result column="port" property="port" jdbcType="VARCHAR" />
<result column="dst_ip" property="dstIp" jdbcType="VARCHAR" />
<result column="dst_ip_mask" property="dstIpMask" jdbcType="VARCHAR" />
<result column="dst_port" property="dstPort" jdbcType="VARCHAR" />
<result column="dst_port_mask" property="dstPortMask" jdbcType="VARCHAR" />
<result column="direction" property="direction" jdbcType="INTEGER" /> <result column="direction" property="direction" jdbcType="INTEGER" />
<result column="protocol" property="protocol" jdbcType="INTEGER" /> <result column="protocol" property="protocol" jdbcType="INTEGER" />
<result column="protocol_id" property="protocolId" jdbcType="INTEGER" /> <result column="protocol_id" property="protocolId" jdbcType="INTEGER" />
@@ -34,105 +32,65 @@
<result column="lable" property="lable" jdbcType="VARCHAR" /> <result column="lable" property="lable" jdbcType="VARCHAR" />
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" /> <result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
<result column="function_id" property="functionId" jdbcType="INTEGER" /> <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> </resultMap>
<resultMap id="BaseIpMapWithUser" type="com.nis.domain.configuration.BaseIpCfg" > <resultMap id="BaseIpMapWithUser" type="com.nis.domain.configuration.BaseIpCfg" extends="BaseIpMap" >
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
<result column="src_ip" property="srcIp" jdbcType="VARCHAR" />
<result column="src_ip_mask" property="srcIpMask" jdbcType="VARCHAR" />
<result column="src_port" property="srcPort" jdbcType="VARCHAR" />
<result column="src_port_mask" property="srcPortMask" jdbcType="VARCHAR" />
<result column="dst_ip" property="dstIp" jdbcType="VARCHAR" />
<result column="dst_ip_mask" property="dstIpMask" jdbcType="VARCHAR" />
<result column="dst_port" property="dstPort" jdbcType="VARCHAR" />
<result column="dst_port_mask" property="dstPortMask" jdbcType="VARCHAR" />
<result column="direction" property="direction" jdbcType="INTEGER" />
<result column="protocol" property="protocol" jdbcType="INTEGER" />
<result column="protocol_id" property="protocolId" jdbcType="INTEGER" />
<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="function_id" property="functionId" jdbcType="INTEGER" />
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
<result column="classify" property="classify" jdbcType="VARCHAR" />
<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="creator_name" property="creatorName" jdbcType="VARCHAR" /> <result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" /> <result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
<result column="editor_name" property="editorName" jdbcType="VARCHAR" /> <result column="editor_name" property="editorName" jdbcType="VARCHAR" />
</resultMap> </resultMap>
<sql id="BaseIpCfg_Column_List_with_id" > <sql id="BaseIpCfg_Column_List_with_id" >
CFG_ID, CFG_DESC, IP_TYPE, SRC_IP, SRC_IP_MASK, SRC_PORT, CFG_ID, CFG_DESC,CFG_REGION_CODE,CFG_TYPE, IP_TYPE, IP_PATTERN, IP_ADDRESS, PORT_PATTERN,PORT,
SRC_PORT_MASK ,DST_IP ,DST_IP_MASK, DST_PORT, DST_PORT_MASK,
DIRECTION,PROTOCOL,PROTOCOL_ID,ACTION,IS_VALID,IS_AUDIT, DIRECTION,PROTOCOL,PROTOCOL_ID,ACTION,IS_VALID,IS_AUDIT,
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME,
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID
</sql> </sql>
<!-- <sql id="BaseIpCfg_Column_List_with_id_alias" >
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc, r.IP_TYPE as ipType, r.SRC_IP as srcIp, r.SRC_IP_MASK as srcIpMask, r.SRC_PORT as srcPort,
r.SRC_PORT_MASK as srcPortMask ,r.DST_IP as dstIp,r.DST_IP_MASK as dstIpMask, r.DST_PORT as dstPort, r.DST_PORT_MASK as dstPortMask,
r.DIRECTION as direction,r.PROTOCOL as protocol,r.PROTOCOL_ID as protocolId,r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit,
r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime,
r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify,
r.ATTRIBUTE AS attribute,r.LABLE AS lable,r.AREA_EFFECTIVE_IDS AS areaEffectiveIds
</sql> -->
<sql id="BaseIpCfg_Column_List_with_id_alias" > <sql id="BaseIpCfg_Column_List_with_id_alias" >
<choose> <choose>
<when test="page !=null and page.alias != null and page.alias != ''"> <when test="page !=null and page.alias != null and page.alias != ''">
${page.alias}.CFG_ID as cfgId, ${page.alias}.CFG_DESC as cfgDesc, ${page.alias}.IP_TYPE as ipType, ${page.alias}.SRC_IP as srcIp, ${page.alias}.SRC_IP_MASK as srcIpMask, ${page.alias}.SRC_PORT as srcPort, ${page.alias}.CFG_ID as cfgId, ${page.alias}.CFG_DESC as cfgDesc,${page.alias}.CFG_REGION_CODE as cfgRegionCode,${page.alias}.CFG_TYPE as cfgType, ${page.alias}.IP_TYPE as ipType,
${page.alias}.SRC_PORT_MASK as srcPortMask ,${page.alias}.DST_IP as dstIp,${page.alias}.DST_IP_MASK as dstIpMask, ${page.alias}.DST_PORT as dstPort, ${page.alias}.DST_PORT_MASK as dstPortMask, ${page.alias}.IP_PATTERN as ipPattern, ${page.alias}.IP_ADDRESS as ipAddress, ${page.alias}.PORT_PATTERN as portPattern,${page.alias}.PORT as port,
${page.alias}.DIRECTION as direction,${page.alias}.PROTOCOL as protocol,${page.alias}.PROTOCOL_ID as protocolId,${page.alias}.ACTION as action,${page.alias}.IS_VALID as isValid,${page.alias}.IS_AUDIT as isAudit, ${page.alias}.DIRECTION as direction,${page.alias}.PROTOCOL as protocol,${page.alias}.PROTOCOL_ID as protocolId,${page.alias}.ACTION as action,${page.alias}.IS_VALID as isValid,${page.alias}.IS_AUDIT as isAudit,
${page.alias}.CREATOR_ID as creatorId,${page.alias}.CREATE_TIME AS createTime,${page.alias}.EDITOR_ID as editorId,${page.alias}.EDIT_TIME AS editTime,${page.alias}.AUDITOR_ID as auditorId,${page.alias}.AUDIT_TIME AS auditTime, ${page.alias}.CREATOR_ID as creatorId,${page.alias}.CREATE_TIME AS createTime,${page.alias}.EDITOR_ID as editorId,${page.alias}.EDIT_TIME AS editTime,${page.alias}.AUDITOR_ID as auditorId,${page.alias}.AUDIT_TIME AS auditTime,
${page.alias}.SERVICE_ID as serviceId,${page.alias}.REQUEST_ID AS requestId,${page.alias}.COMPILE_ID AS compileId,${page.alias}.IS_AREA_EFFECTIVE as isAreaEffective,${page.alias}.classify, ${page.alias}.SERVICE_ID as serviceId,${page.alias}.REQUEST_ID AS requestId,${page.alias}.COMPILE_ID AS compileId,${page.alias}.IS_AREA_EFFECTIVE as isAreaEffective,${page.alias}.classify,
${page.alias}.ATTRIBUTE AS attribute,${page.alias}.LABLE AS lable,${page.alias}.AREA_EFFECTIVE_IDS AS areaEffectiveIds ${page.alias}.ATTRIBUTE AS attribute,${page.alias}.LABLE AS lable,${page.alias}.AREA_EFFECTIVE_IDS AS areaEffectiveIds,${page.alias}.FUNCTION_ID AS functionId
</when> </when>
<otherwise> <otherwise>
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc, r.IP_TYPE as ipType, r.SRC_IP as srcIp, r.SRC_IP_MASK as srcIpMask, r.SRC_PORT as srcPort, r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc,r.CFG_REGION_CODE as cfgRegionCode,r.CFG_TYPE as cfgType, r.IP_TYPE as ipType,
r.SRC_PORT_MASK as srcPortMask ,r.DST_IP as dstIp,r.DST_IP_MASK as dstIpMask, r.DST_PORT as dstPort, r.DST_PORT_MASK as dstPortMask, r.IP_PATTERN as ipPattern, r.IP_ADDRESS as ipAddress, r.PORT_PATTERN as portPattern,r.PORT as port,
r.DIRECTION as direction,r.PROTOCOL as protocol,r.PROTOCOL_ID as protocolId,r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit, r.DIRECTION as direction,r.PROTOCOL as protocol,r.PROTOCOL_ID as protocolId,r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit,
r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime, r.CREATOR_ID as creatorId,r.CREATE_TIME AS createTime,r.EDITOR_ID as editorId,r.EDIT_TIME AS editTime,r.AUDITOR_ID as auditorId,r.AUDIT_TIME AS auditTime,
r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify, r.SERVICE_ID as serviceId,r.REQUEST_ID AS requestId,r.COMPILE_ID AS compileId,r.IS_AREA_EFFECTIVE as isAreaEffective,r.classify,
r.ATTRIBUTE AS attribute,r.LABLE AS lable,r.AREA_EFFECTIVE_IDS AS areaEffectiveIds r.ATTRIBUTE AS attribute,r.LABLE AS lable,r.AREA_EFFECTIVE_IDS AS areaEffectiveIds,r.FUNCTION_ID as functionId
</otherwise> </otherwise>
</choose> </choose>
</sql> </sql>
<sql id="BaseIpCfg_Column_List" > <sql id="BaseIpCfg_Column_List" >
CFG_DESC, IP_TYPE, SRC_IP, SRC_IP_MASK, SRC_PORT, CFG_DESC,CFG_REGION_CODE,CFG_TYPE,
SRC_PORT_MASK ,DST_IP ,DST_IP_MASK, DST_PORT, DST_PORT_MASK, IP_TYPE,IP_PATTERN,IP_ADDRESS,
DIRECTION,PROTOCOL,PROTOCOL_ID,ACTION,IS_VALID,IS_AUDIT, PORT_PATTERN,PORT,DIRECTION,
CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, PROTOCOL,PROTOCOL_ID,ACTION,
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, IS_VALID,IS_AUDIT,CREATOR_ID,
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS 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
</sql> </sql>
<sql id="BaseIpCfg_Value_List" > <sql id="BaseIpCfg_Value_List" >
#{cfgDesc,jdbcType=VARCHAR},#{ipType,jdbcType=INTEGER}, #{cfgDesc,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},#{cfgType,jdbcType=VARCHAR},
#{srcIp,jdbcType=VARCHAR},#{srcIpMask,jdbcType=VARCHAR},#{srcPort,jdbcType=VARCHAR}, #{ipType,jdbcType=INTEGER}, #{ipPattern,jdbcType=INTEGER},#{ipAddress,jdbcType=VARCHAR},
#{srcPortMask,jdbcType=VARCHAR},#{dstIp,jdbcType=VARCHAR},#{dstIpMask,jdbcType=VARCHAR}, #{portPattern,jdbcType=INTEGER},#{port,jdbcType=VARCHAR},#{direction,jdbcType=INTEGER},
#{dstPort,jdbcType=VARCHAR},#{dstPortMask,jdbcType=VARCHAR},#{direction,jdbcType=INTEGER},
#{protocol,jdbcType=INTEGER},#{protocolId,jdbcType=INTEGER},#{action,jdbcType=INTEGER}, #{protocol,jdbcType=INTEGER},#{protocolId,jdbcType=INTEGER},#{action,jdbcType=INTEGER},
#{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},#{creatorId,jdbcType=INTEGER}, #{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},#{creatorId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},#{editTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},#{editTime,jdbcType=TIMESTAMP},
#{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},#{serviceId,jdbcType=INTEGER}, #{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},#{serviceId,jdbcType=INTEGER},
#{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER}, #{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER},
#{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR}, #{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR} #{areaEffectiveIds,jdbcType=VARCHAR}, #{functionId,jdbcType=INTEGER}
</sql> </sql>
<select id="getById" resultMap="BaseIpMap" parameterType="java.lang.Long" > <select id="getById" resultMap="BaseIpMap" parameterType="java.lang.Long" >
SELECT SELECT
@@ -184,9 +142,6 @@
left join sys_user e on r.editor_id=e.id left join sys_user e on r.editor_id=e.id
left join sys_user u on r.auditor_id=u.id left join sys_user u on r.auditor_id=u.id
left join request_info ri on r.request_id=ri.id left join request_info ri on r.request_id=ri.id
left join service_dict_info sdic on r.classify=sdic.item_code and sdic.item_type=1 and sdic.is_leaf=0
left join service_dict_info sdia on r.attribute=sdia.item_code and sdia.item_type=2 and sdia.is_leaf=0
left join service_dict_info sdil on r.lable=sdil.item_code and sdil.item_type=3 and sdil.is_leaf=0
<trim prefix="WHERE" prefixOverrides="AND |OR "> <trim prefix="WHERE" prefixOverrides="AND |OR ">
<if test="page !=null and page.where != null and page.where != ''"> <if test="page !=null and page.where != null and page.where != ''">
AND ${page.where} AND ${page.where}
@@ -199,33 +154,27 @@
<if test="cfgDesc != null and cfgDesc != ''"> <if test="cfgDesc != null and cfgDesc != ''">
AND ${page.alias}.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') AND ${page.alias}.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if> </if>
<if test="cfgRegionCode != null">
AND ${page.alias}.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
</if>
<if test="cfgType != null and cfgType != ''">
AND ${page.alias}.CFG_TYPE like concat(concat('%',#{CFG_TYPE,jdbcType=VARCHAR}),'%')
</if>
<if test="ipType != null"> <if test="ipType != null">
AND ${page.alias}.IP_TYPE=#{ipType,jdbcType=INTEGER} AND ${page.alias}.IP_TYPE=#{ipType,jdbcType=INTEGER}
</if> </if>
<if test="srcIp != null and srcIp != ''"> <if test="ipPattern != null">
AND ${page.alias}.SRC_IP like concat('%', #{srcIp,jdbcType=VARCHAR}, '%') AND ${page.alias}.IP_PATTERN=#{ipPattern,jdbcType=INTEGER}
</if> </if>
<if test="srcIpMask != null and srcIpMask != ''"> <if test="ipAddress != null and ipAddress != ''">
AND ${page.alias}.SRC_IP_MASK=#{srcIpMask,jdbcType=VARCHAR} AND ${page.alias}.IP_ADDRESS=#{ipAddress,jdbcType=VARCHAR}
</if> </if>
<if test="srcPort != null and srcPort !=''"> <if test="portPattern != null">
AND ${page.alias}.SRC_PORT=#{srcPort,jdbcType=VARCHAR} AND ${page.alias}.PORT_PATTERN=#{portPattern,jdbcType=INTEGER}
</if> </if>
<if test="srcPortMask != null and srcPortMask !=''"> <if test="port != null and port !=''">
AND ${page.alias}.SRC_PORT_MASK=#{srcPortMask,jdbcType=VARCHAR} AND ${page.alias}.PORT=#{port,jdbcType=VARCHAR}
</if> </if>
<if test="dstIp != null and dstIp !=''">
AND ${page.alias}.DST_IP like concat('%', #{dstIp,jdbcType=VARCHAR}, '%')
</if>
<if test="dstIpMask != null and dstIpMask !=''">
AND ${page.alias}.DST_IP_MASK=#{dstIpMask,jdbcType=VARCHAR}
</if>
<if test="dstPort != null and dstPort !=''">
AND ${page.alias}.DST_PORT=#{dstPort,jdbcType=VARCHAR}
</if>
<if test="dstPortMask != null and dstPortMask !=''">
AND ${page.alias}.DST_PORT_MASK=#{dstPortMask,jdbcType=VARCHAR}
</if>
<if test="direction != null"> <if test="direction != null">
AND ${page.alias}.DIRECTION=#{direction,jdbcType=INTEGER} AND ${page.alias}.DIRECTION=#{direction,jdbcType=INTEGER}
</if> </if>
@@ -289,6 +238,9 @@
<if test="areaEffectiveIds != null and areaEffectiveIds !=''"> <if test="areaEffectiveIds != null and areaEffectiveIds !=''">
AND ${page.alias}.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%') AND ${page.alias}.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
</if> </if>
<if test="functionId != null">
AND ${page.alias}.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
</if>
</when> </when>
<otherwise> <otherwise>
<if test="cfgId != null"> <if test="cfgId != null">
@@ -297,33 +249,27 @@
<if test="cfgDesc != null and cfgDesc != ''"> <if test="cfgDesc != null and cfgDesc != ''">
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if> </if>
<if test="cfgRegionCode != null">
AND r.CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
</if>
<if test="cfgType != null and cfgType != ''">
AND r.CFG_TYPE like concat(concat('%',#{CFG_TYPE,jdbcType=VARCHAR}),'%')
</if>
<if test="ipType != null"> <if test="ipType != null">
AND r.IP_TYPE=#{ipType,jdbcType=INTEGER} AND r.IP_TYPE=#{ipType,jdbcType=INTEGER}
</if> </if>
<if test="srcIp != null and srcIp != ''"> <if test="ipPattern != null">
AND r.SRC_IP=#{srcIp,jdbcType=VARCHAR} AND r.IP_PATTERN=#{ipPattern,jdbcType=INTEGER}
</if> </if>
<if test="srcIpMask != null and srcIpMask != ''"> <if test="ipAddress != null and ipAddress != ''">
AND r.SRC_IP_MASK=#{srcIpMask,jdbcType=VARCHAR} AND r.IP_ADDRESS=#{ipAddress,jdbcType=VARCHAR}
</if> </if>
<if test="srcPort != null and srcPort !=''"> <if test="portPattern != null">
AND r.SRC_PORT=#{srcPort,jdbcType=VARCHAR} AND r.PORT_PATTERN=#{portPattern,jdbcType=INTEGER}
</if> </if>
<if test="srcPortMask != null and srcPortMask !=''"> <if test="port != null and port !=''">
AND r.SRC_PORT_MASK=#{srcPortMask,jdbcType=VARCHAR} AND r.PORT=#{port,jdbcType=VARCHAR}
</if> </if>
<if test="dstIp != null and dstIp !=''">
AND r.DST_IP=#{dstIp,jdbcType=VARCHAR}
</if>
<if test="dstIpMask != null and dstIpMask !=''">
AND r.DST_IP_MASK=#{dstIpMask,jdbcType=VARCHAR}
</if>
<if test="dstPort != null and dstPort !=''">
AND r.DST_PORT=#{dstPort,jdbcType=VARCHAR}
</if>
<if test="dstPortMask != null and dstPortMask !=''">
AND r.DST_PORT_MASK=#{dstPortMask,jdbcType=VARCHAR}
</if>
<if test="direction != null"> <if test="direction != null">
AND r.DIRECTION=#{direction,jdbcType=INTEGER} AND r.DIRECTION=#{direction,jdbcType=INTEGER}
</if> </if>
@@ -387,6 +333,9 @@
<if test="areaEffectiveIds != null and areaEffectiveIds !=''"> <if test="areaEffectiveIds != null and areaEffectiveIds !=''">
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%') AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
</if> </if>
<if test="functionId != null">
AND r.FUNCTION_ID=#{functionId,jdbcType=INTEGER}
</if>
</otherwise> </otherwise>
</choose> </choose>
</trim> </trim>
@@ -441,33 +390,27 @@
<if test="cfgDesc != null and cfgDesc != ''" > <if test="cfgDesc != null and cfgDesc != ''" >
cfg_desc = #{cfgDesc,jdbcType=VARCHAR}, cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
</if> </if>
<if test="cfgRegionCode != null">
CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}
</if>
<if test="cfgType != null and cfgType != ''">
CFG_TYPE =#{CFG_TYPE,jdbcType=VARCHAR}
</if>
<if test="ipType != null" > <if test="ipType != null" >
ip_type = #{ipType,jdbcType=INTEGER}, ip_type = #{ipType,jdbcType=INTEGER},
</if> </if>
<if test="srcIp != null and srcIp != ''" > <if test="ipPattern != null">
src_ip = #{srcIp,jdbcType=VARCHAR}, IP_PATTERN=#{ipPattern,jdbcType=INTEGER}
</if> </if>
<if test="srcIpMask != null and srcIpMask != ''" > <if test="ipAddress != null and ipAddress != ''">
src_ip_mask = #{srcIpMask,jdbcType=VARCHAR}, IP_ADDRESS=#{ipAddress,jdbcType=VARCHAR}
</if> </if>
<if test="srcPort != null and srcPort != ''" > <if test="portPattern != null">
src_port = #{srcPort,jdbcType=VARCHAR}, PORT_PATTERN=#{portPattern,jdbcType=INTEGER}
</if> </if>
<if test="srcPortMask != null and srcPortMask != ''" > <if test="port != null and port !=''">
src_port_mask = #{srcPortMask,jdbcType=VARCHAR}, PORT=#{port,jdbcType=VARCHAR}
</if> </if>
<if test="dstIp != null and dstIp != ''" >
dst_ip = #{dstIp,jdbcType=VARCHAR},
</if>
<if test="dstIpMask != null and dstIpMask != ''" >
dst_ip_mask = #{dstIpMask,jdbcType=VARCHAR},
</if>
<if test="dstPort != null and dstPort != ''" >
dst_port = #{dstPort,jdbcType=VARCHAR},
</if>
<if test="srcPortMask != null and srcPortMask != ''" >
dst_port_mask = #{srcPortMask,jdbcType=VARCHAR},
</if>
<if test="direction != null" > <if test="direction != null" >
direction = #{direction,jdbcType=INTEGER}, direction = #{direction,jdbcType=INTEGER},
</if> </if>
@@ -528,6 +471,9 @@
<if test="areaEffectiveIds != null" > <if test="areaEffectiveIds != null" >
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR} area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR}
</if> </if>
<if test="functionId != null">
FUNCTION_ID=#{functionId,jdbcType=INTEGER}
</if>
</trim> </trim>
</set> </set>
where cfg_id = #{cfgId,jdbcType=BIGINT} where cfg_id = #{cfgId,jdbcType=BIGINT}

View File

@@ -203,6 +203,9 @@ function delAreaIsp(obj){
<div class="container-fluid hidden"> <div class="container-fluid hidden">
<div class="row"> <div class="row">
<input type="hidden" id="_areaCfg.isAreaEffective" value="${_areaCfg.isAreaEffective}"> <input type="hidden" id="_areaCfg.isAreaEffective" value="${_areaCfg.isAreaEffective}">
<input type="hidden" id="_areaCfg.cfgRegionCode" value="${_areaCfg.cfgRegionCode}">
<input type="hidden" id="_areaCfg.cfgType" value="${_areaCfg.cfgType}">
<input type="hidden" id="_areaCfg.functionId" value="0">
<input id="_areaCfg.cfgId" type="hidden" value="${_areaCfg.cfgId}"> <input id="_areaCfg.cfgId" type="hidden" value="${_areaCfg.cfgId}">
<div class="pull-right"> <div class="pull-right">
<span class="glyphicon glyphicon-remove" title="remove" onClick="delAreaIp(this);"/> <span class="glyphicon glyphicon-remove" title="remove" onClick="delAreaIp(this);"/>
@@ -233,81 +236,47 @@ function delAreaIsp(obj){
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_ip"/></label> <label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
<div class="col-md-6"> <div class="col-md-6">
<input id="_areaCfg.srcIp" class="form-control required ipCheck" type="text" value="${_areaCfg.srcIp}"> <select id="_areaCfg.ipPattern" class="show-tick form-control required">
<option value="1"><spring:message code="subnet"/></option>
<option value="2"><spring:message code="ip_range"/></option>
</select>
</div> </div>
<div for="_areaCfg.srcIp"></div> <div for="_areaCfg.ipPattern"></div>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group "> <div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_address_mask"/></label> <label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_address"/></label>
<div class="col-md-6"> <div class="col-md-6">
<input id="_areaCfg.srcIpMask" class="form-control required ipMask" type="text" value="${_areaCfg.srcIpMask}"> <input id="_areaCfg.ipAddress" class="form-control required" type="text" value="${_areaCfg.ipAddress}">
</div> </div>
<div for="_areaCfg.srcIpMask"></div> <div for="_areaCfg.ipAddress"></div>
</div> </div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port"/></label> <label class="control-label col-md-3"><font color="red">*</font><spring:message code="port_pattern"/></label>
<div class="col-md-6"> <div class="col-md-6">
<input id="_areaCfg.srcPort" class="form-control required" type="text" value="${_areaCfg.srcPort}"> <select id="_areaCfg.portPattern" class="show-tick form-control required">
<option value="1"><spring:message code="subnet"/></option>
<option value="2"><spring:message code="port_range"/></option>
</select>
</div> </div>
<div for="_areaCfg.srcPort"></div> <div for="_areaCfg.portPattern"></div>
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group "> <div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port_mask"/></label> <label class="control-label col-md-3"><font color="red">*</font><spring:message code="port"/></label>
<div class="col-md-6"> <div class="col-md-6">
<input id="_areaCfg.srcPortMask" class="form-control required" type="text" value="${_areaCfg.srcPortMask}"> <input id="_areaCfg.port" class="form-control required" type="text" value="${_areaCfg.port}">
</div> </div>
<div for="_areaCfg.srcPortMask"></div> <div for="_areaCfg.port"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
<div class="col-md-6">
<input id="_areaCfg.dstIp" class="form-control required ipCheck" type="text" value="${_areaCfg.dstIp}">
</div>
<div for="_areaCfg.dstIp"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_address_mask"/></label>
<div class="col-md-6">
<input id="_areaCfg.dstIpMask" class="form-control required ipMask" type="text" value="${_areaCfg.dstIpMask}">
</div>
<div for="_areaCfg.dstIpMask"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port"/></label>
<div class="col-md-6">
<input id="_areaCfg.dstPort" class="form-control required" type="text" value="${_areaCfg.dstPort}">
</div>
<div for="_areaCfg.dstPort"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port_mask"/></label>
<div class="col-md-6">
<input id="_areaCfg.dstPortMask" class="form-control required" type="text" value="${_areaCfg.dstPortMask}">
</div>
<div for="_areaCfg.dstPortMask"></div>
</div> </div>
</div> </div>
</div> </div>