snat策略增加用户类型选项.
This commit is contained in:
@@ -25,4 +25,6 @@ public interface IpMultiplexDao extends CrudDao<IpMultiplexDao>{
|
||||
// 校验地址池是否被引用
|
||||
List<IpReusePolicyCfg> checkAddrPoolIsUsed(@Param("addrPoolId")String addrPoolId);
|
||||
|
||||
void updatePolicyAuditStatus(IpReusePolicyCfg cfg);
|
||||
|
||||
}
|
||||
|
||||
@@ -8,7 +8,10 @@
|
||||
<result column="addr_pool_id" property="addrPoolId" jdbcType="INTEGER"/>
|
||||
<result column="user_name" property="userName" jdbcType="VARCHAR"/>
|
||||
<result column="user_type" property="userType" jdbcType="VARCHAR"/>
|
||||
|
||||
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
||||
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
||||
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
||||
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
@@ -38,7 +41,7 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="policyColumns">
|
||||
r.CFG_ID,r.CFG_DESC,r.ADDR_POOL_ID,r.USER_NAME,r.USER_TYPE,
|
||||
r.CFG_ID,r.CFG_DESC,r.ADDR_POOL_ID,r.USER_NAME,r.USER_TYPE,r.IP_TYPE,r.IP_PATTERN,r.SRC_IP_ADDRESS,
|
||||
r.ACTION,r.DO_LOG,r.IS_VALID,r.IS_AUDIT,r.CFG_REGION_CODE,r.CFG_TYPE,r.FUNCTION_ID,
|
||||
r.SERVICE_ID,r.COMPILE_ID,r.REQUEST_ID,r.CLASSIFY,r.ATTRIBUTE,r.LABLE,
|
||||
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
|
||||
@@ -75,13 +78,12 @@
|
||||
<if test="compileId != null">
|
||||
AND r.compile_id=#{compileId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND r.user_id in (SELECT u.id FROM user_manage u
|
||||
<where>
|
||||
u.user_name LIKE concat(concat('%',#{userName,jdbcType=VARCHAR}),'%')
|
||||
</where>
|
||||
)
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||
AND r.src_ip_address=#{srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND r.user_name LIKE concat(concat('%',#{userName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
<if test="addrPoolName != null and addrPoolName != ''">
|
||||
AND r.addr_pool_id in (SELECT i.cfg_id FROM ip_reuse_addr_pool i
|
||||
<where>
|
||||
@@ -173,6 +175,9 @@
|
||||
addr_pool_id,
|
||||
user_name,
|
||||
user_type,
|
||||
ip_type,
|
||||
ip_pattern,
|
||||
src_ip_address,
|
||||
action,
|
||||
do_log,
|
||||
is_valid,
|
||||
@@ -204,6 +209,9 @@
|
||||
#{addrPoolId,jdbcType=INTEGER},
|
||||
#{userName,jdbcType=VARCHAR},
|
||||
#{userType,jdbcType=VARCHAR},
|
||||
#{ipType,jdbcType=INTEGER},
|
||||
#{ipPattern,jdbcType=INTEGER},
|
||||
#{srcIpAddress,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
#{doLog,jdbcType=INTEGER},
|
||||
0,
|
||||
@@ -246,7 +254,7 @@
|
||||
update ip_reuse_policy_cfg
|
||||
<set>
|
||||
<trim suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''" >
|
||||
<if test="userName != null" >
|
||||
user_name = #{userName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="userType != null and userType != ''" >
|
||||
@@ -258,6 +266,15 @@
|
||||
<if test="addrPoolId != null" >
|
||||
addr_pool_id = #{addrPoolId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<!-- <if test="ipType != null" > -->
|
||||
ip_type = #{ipType,jdbcType=INTEGER},
|
||||
<!-- </if>
|
||||
<if test="ipPattern != null"> -->
|
||||
ip_pattern=#{ipPattern,jdbcType=INTEGER},
|
||||
<!-- </if> -->
|
||||
<if test="srcIpAddress != null">
|
||||
src_ip_address=#{srcIpAddress,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="translateParam != null and translateParam != ''" >
|
||||
translate_param = #{translateParam,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -312,6 +329,28 @@
|
||||
|
||||
</update>
|
||||
|
||||
<update id="updatePolicyAuditStatus" parameterType="com.nis.domain.configuration.IpReusePolicyCfg">
|
||||
update ip_reuse_policy_cfg
|
||||
<set>
|
||||
<trim suffixOverrides=",">
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and createTime != ''" >
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
WHERE cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
|
||||
</update>
|
||||
|
||||
<select id="checkAddrPoolIsUsed" resultMap="policyMap">
|
||||
SELECT
|
||||
<include refid="policyColumns"/>
|
||||
|
||||
Reference in New Issue
Block a user