(1)IP复用提交
(2)修改保存区域IP的Dao为AreaIpCfgDao (3)共用页面兼容性调整 (4)针对IP复用的loop action做了特殊处理,此处审核不是走callback
This commit is contained in:
@@ -11,6 +11,7 @@ import com.nis.web.dao.MyBatisDao;
|
||||
public interface PolicyGroupInfoDao extends CrudDao<PolicyGroupInfo> {
|
||||
List<PolicyGroupInfo> findPolicyGroupInfoList(PolicyGroupInfo policyGroupInfo);
|
||||
List<PolicyGroupInfo> findPolicyGroupInfos();
|
||||
List<PolicyGroupInfo> findPolicyGroupInfosByType(int groupType);
|
||||
PolicyGroupInfo getById(int id);
|
||||
|
||||
}
|
||||
@@ -66,6 +66,12 @@
|
||||
FROM policy_group_info r
|
||||
where r.is_valid=1
|
||||
</select>
|
||||
<select id="findPolicyGroupInfosByType" resultMap="PolicyGroupInfoMap">
|
||||
SELECT
|
||||
<include refid="PolicyGroupInfoColumns"/>
|
||||
FROM policy_group_info r
|
||||
where r.is_valid=1 and r.group_type=#{groupType,jdbcType=INTEGER}
|
||||
</select>
|
||||
<insert id="insert" parameterType="com.nis.domain.basics.PolicyGroupInfo" >
|
||||
insert into policy_group_info(
|
||||
IS_VALID,
|
||||
|
||||
@@ -121,6 +121,77 @@
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- insert 方法用于区域IP的批量处理,请勿删除 -->
|
||||
<insert id="insert" parameterType="com.nis.domain.configuration.AreaIpCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into area_ip_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
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,
|
||||
ip_type,
|
||||
src_ip_address,
|
||||
ip_pattern,
|
||||
port_pattern,
|
||||
src_port,
|
||||
protocol,
|
||||
protocol_id,
|
||||
direction,
|
||||
dest_port,
|
||||
dest_ip_address,
|
||||
cfg_type,
|
||||
cfg_region_code
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{ipType,jdbcType=INTEGER},
|
||||
#{srcIpAddress,jdbcType=VARCHAR},
|
||||
#{ipPattern,jdbcType=INTEGER},
|
||||
#{portPattern,jdbcType=INTEGER},
|
||||
#{srcPort,jdbcType=VARCHAR},
|
||||
#{protocol,jdbcType=INTEGER},
|
||||
#{protocolId,jdbcType=INTEGER},
|
||||
#{direction,jdbcType=INTEGER},
|
||||
#{destPort,jdbcType=VARCHAR},
|
||||
#{destIpAddress,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<!-- update av_voip_ip_cfg表信息 -->
|
||||
<update id="updateAreaIpCfg" parameterType="com.nis.domain.configuration.AreaIpCfg" >
|
||||
|
||||
@@ -35,13 +35,13 @@
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="ratelimit" property="ratelimit" jdbcType="INTEGER" />
|
||||
|
||||
|
||||
<result column="dns_strategy_id" property="dnsStrategyId" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="BaseIpMapWithUser" type="com.nis.domain.configuration.BaseIpCfg" extends="BaseIpMap" >
|
||||
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
|
||||
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
|
||||
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
|
||||
<result column="group_name" property="groupName" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="BaseIpCfg_Column_List_with_id" >
|
||||
@@ -49,7 +49,7 @@
|
||||
DIRECTION,PROTOCOL,PROTOCOL_ID,ACTION,IS_VALID,IS_AUDIT,
|
||||
CREATOR_ID,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,RATELIMIT
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT,DNS_STRATEGY_ID
|
||||
</sql>
|
||||
<sql id="BaseIpCfg_Column_List_with_id_alias" >
|
||||
<choose>
|
||||
@@ -59,7 +59,8 @@
|
||||
${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}.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}.FUNCTION_ID AS functionId,${page.alias}.RATELIMIT AS ratelimit
|
||||
${page.alias}.ATTRIBUTE AS attribute,${page.alias}.LABLE AS lable,${page.alias}.AREA_EFFECTIVE_IDS AS areaEffectiveIds,${page.alias}.FUNCTION_ID AS functionId,${page.alias}.RATELIMIT AS ratelimit,
|
||||
${page.alias}.DNS_STRATEGY_ID AS dnsStrategyId
|
||||
</when>
|
||||
<otherwise>
|
||||
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,
|
||||
@@ -67,7 +68,8 @@
|
||||
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,r.FUNCTION_ID as functionId,r.RATELIMIT AS ratelimit
|
||||
r.ATTRIBUTE AS attribute,r.LABLE AS lable,r.AREA_EFFECTIVE_IDS AS areaEffectiveIds,r.FUNCTION_ID as functionId,r.RATELIMIT AS ratelimit,
|
||||
r.DNS_STRATEGY_ID AS dnsStrategyId
|
||||
</otherwise>
|
||||
</choose>
|
||||
</sql>
|
||||
@@ -81,7 +83,7 @@
|
||||
AUDITOR_ID,AUDIT_TIME,SERVICE_ID,
|
||||
REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,ATTRIBUTE,LABLE,
|
||||
AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT
|
||||
AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT,DNS_STRATEGY_ID
|
||||
</sql>
|
||||
<sql id="BaseIpCfg_Value_List" >
|
||||
#{cfgDesc,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},#{cfgType,jdbcType=VARCHAR},
|
||||
@@ -93,7 +95,8 @@
|
||||
#{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR}, #{functionId,jdbcType=INTEGER}, #{ratelimit,jdbcType=INTEGER}
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR}, #{functionId,jdbcType=INTEGER}, #{ratelimit,jdbcType=INTEGER},
|
||||
#{dnsStrategyId,jdbcType=INTEGER}
|
||||
</sql>
|
||||
<select id="getById" resultMap="BaseIpMap" parameterType="java.lang.Long" >
|
||||
SELECT
|
||||
@@ -142,7 +145,7 @@
|
||||
</choose> -->
|
||||
<trim prefix="," prefixOverrides=",">
|
||||
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
,ri.request_title as requestName
|
||||
,ri.request_title as requestName,po.group_name as group_name
|
||||
</trim>
|
||||
from ${tableName}
|
||||
<choose>
|
||||
@@ -155,6 +158,7 @@
|
||||
left join sys_user e on r.editor_id=e.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 policy_group_info po on r.dns_strategy_id=po.group_id
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="page !=null and page.where != null and page.where != ''">
|
||||
AND ${page.where}
|
||||
@@ -263,6 +267,9 @@
|
||||
<if test="ratelimit != null">
|
||||
AND ${page.alias}.RATELIMIT=#{ratelimit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="dnsStrategyId != null">
|
||||
AND ${page.alias}.DNS_STRATEGY_ID=#{dnsStrategyId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="cfgId != null">
|
||||
@@ -367,6 +374,9 @@
|
||||
<if test="ratelimit != null">
|
||||
AND r.RATELIMIT=#{ratelimit,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="dnsStrategyId != null">
|
||||
AND r.DNS_STRATEGY_ID=#{dnsStrategyId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<!-- 数据范围过滤 -->
|
||||
@@ -511,11 +521,14 @@
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
FUNCTION_ID=#{functionId,jdbcType=INTEGER}
|
||||
FUNCTION_ID=#{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="ratelimit != null">
|
||||
RATELIMIT=#{ratelimit,jdbcType=INTEGER}
|
||||
RATELIMIT=#{ratelimit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="dnsStrategyId != null">
|
||||
DNS_STRATEGY_ID=#{dnsStrategyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
|
||||
Reference in New Issue
Block a user