DNAT复用策略增加用户和用户类型
调整SNAT地址池管理 配置IP的格式为:IP sql提交
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
||||
<result column="translated_dest_ip" property="destIpAddress" jdbcType="VARCHAR" />
|
||||
<!-- <result column="translated_dest_ip" property="destIpAddress" jdbcType="VARCHAR" /> -->
|
||||
<result column="original_dest_ip" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||
<result column="translated_dest_port" property="destPort" jdbcType="VARCHAR" />
|
||||
<result column="original_dest_port" property="srcPort" jdbcType="VARCHAR" />
|
||||
@@ -73,6 +73,9 @@
|
||||
<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="translated_user_type" property="translatedUserType" jdbcType="VARCHAR" />
|
||||
<result column="translated_user_id" property="translatedUserId" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="policyColumns">
|
||||
@@ -86,11 +89,11 @@
|
||||
|
||||
<sql id="dnatPolicyColumns" >
|
||||
a.cfg_id,a.cfg_desc,a.ip_type,a.original_dest_ip,a.ip_pattern,a.port_pattern,a.original_dest_port,
|
||||
a.protocol,a.protocol_id,a.cfg_type,a.action,a.translated_dest_port,a.translated_dest_ip,a.is_valid,
|
||||
a.protocol,a.protocol_id,a.cfg_type,a.action,a.translated_dest_port,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.cfg_region_code,a.user_region1,a.user_region2,
|
||||
a.user_region3,a.user_region4,a.user_region5
|
||||
a.user_region3,a.user_region4,a.user_region5,a.translated_user_type,a.translated_user_id
|
||||
</sql>
|
||||
|
||||
<select id="findPage" resultMap="policyMap">
|
||||
@@ -438,7 +441,7 @@
|
||||
port_pattern,
|
||||
original_dest_ip,
|
||||
original_dest_port,
|
||||
translated_dest_ip,
|
||||
<!-- translated_dest_ip, -->
|
||||
translated_dest_port,
|
||||
protocol,
|
||||
protocol_id,
|
||||
@@ -467,7 +470,9 @@
|
||||
user_region2,
|
||||
user_region3,
|
||||
user_region4,
|
||||
user_region5
|
||||
user_region5,
|
||||
translated_user_type,
|
||||
translated_user_id
|
||||
)VALUES (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{ipType,jdbcType=INTEGER},
|
||||
@@ -475,7 +480,7 @@
|
||||
#{portPattern,jdbcType=INTEGER},
|
||||
#{srcIpAddress,jdbcType=VARCHAR},
|
||||
#{srcPort,jdbcType=VARCHAR},
|
||||
#{destIpAddress,jdbcType=VARCHAR},
|
||||
<!-- #{destIpAddress,jdbcType=VARCHAR}, -->
|
||||
#{destPort,jdbcType=VARCHAR},
|
||||
#{protocol,jdbcType=INTEGER},
|
||||
#{protocolId,jdbcType=INTEGER},
|
||||
@@ -504,7 +509,9 @@
|
||||
#{userRegion2,jdbcType=VARCHAR},
|
||||
#{userRegion3,jdbcType=VARCHAR},
|
||||
#{userRegion4,jdbcType=VARCHAR},
|
||||
#{userRegion5,jdbcType=VARCHAR}
|
||||
#{userRegion5,jdbcType=VARCHAR},
|
||||
#{translatedUserType,jdbcType=VARCHAR},
|
||||
#{translatedUserId,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -527,9 +534,9 @@
|
||||
<if test="srcIpAddress != null">
|
||||
original_dest_ip=#{srcIpAddress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="destIpAddress != null and destIpAddress != ''">
|
||||
<!-- <if test="destIpAddress != null and destIpAddress != ''">
|
||||
translated_dest_ip=#{destIpAddress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</if> -->
|
||||
<if test="srcPort != null and srcPort !=''">
|
||||
original_dest_port=#{srcPort,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -587,6 +594,12 @@
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="translatedUserType != null and translatedUserType != ''">
|
||||
translated_user_type=#{translatedUserType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="translatedUserId != null and translatedUserId != ''">
|
||||
translated_user_id=#{translatedUserId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
WHERE cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
@@ -628,9 +641,9 @@
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||
AND a.original_dest_ip=#{srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="destIpAddress != null and destIpAddress != ''">
|
||||
<!-- <if test="destIpAddress != null and destIpAddress != ''">
|
||||
AND a.translated_dest_ip=#{destIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</if> -->
|
||||
<if test="srcPort != null and srcPort !=''">
|
||||
AND a.original_dest_port=#{srcPort,jdbcType=VARCHAR}
|
||||
</if>
|
||||
@@ -657,7 +670,7 @@
|
||||
</if>
|
||||
<if test="auditorName != null and auditorName != ''">
|
||||
AND a.AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
AND a.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
||||
</if>
|
||||
@@ -676,6 +689,9 @@
|
||||
<if test="lable != null and lable != ''">
|
||||
AND a.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="translatedUserId != null and translatedUserId != ''">
|
||||
AND a.translated_user_id LIKE concat(concat('%',#{translatedUserId,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
AND a.function_id=#{functionId,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user