ip复用策略提交①界面新增字段复用类型ir_type;②审核user_region字段调整
This commit is contained in:
@@ -47,7 +47,23 @@ public class BaseIpCfg extends BaseCfg<BaseIpCfg> {
|
||||
protected String srcPort;
|
||||
protected String destPort;
|
||||
protected Long dnsStrategyId;
|
||||
protected Integer irType;
|
||||
protected String groupName;
|
||||
|
||||
/**
|
||||
* irType
|
||||
* @return irType
|
||||
*/
|
||||
|
||||
public Integer getIrType() {
|
||||
return irType;
|
||||
}
|
||||
/**
|
||||
* @param irType the irType to set
|
||||
*/
|
||||
public void setIrType(Integer irType) {
|
||||
this.irType = irType;
|
||||
}
|
||||
/**
|
||||
* groupName
|
||||
* @return groupName
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="ratelimit" property="ratelimit" jdbcType="INTEGER" />
|
||||
<result column="dns_strategy_id" property="dnsStrategyId" jdbcType="INTEGER" />
|
||||
<result column="ir_type" property="irType" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="BaseIpMapWithUser" type="com.nis.domain.configuration.BaseIpCfg" extends="BaseIpMap" >
|
||||
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
|
||||
@@ -49,7 +50,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,DNS_STRATEGY_ID
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT,DNS_STRATEGY_ID,IR_TYPE
|
||||
</sql>
|
||||
<sql id="BaseIpCfg_Column_List_with_id_alias" >
|
||||
<choose>
|
||||
@@ -60,7 +61,7 @@
|
||||
${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}.DNS_STRATEGY_ID AS dnsStrategyId
|
||||
${page.alias}.DNS_STRATEGY_ID AS dnsStrategyId,${page.alias}.IR_TYPE AS irType
|
||||
</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,
|
||||
@@ -69,7 +70,7 @@
|
||||
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.DNS_STRATEGY_ID AS dnsStrategyId
|
||||
r.DNS_STRATEGY_ID AS dnsStrategyId,r.IR_TYPE AS irType
|
||||
</otherwise>
|
||||
</choose>
|
||||
</sql>
|
||||
@@ -83,7 +84,8 @@
|
||||
AUDITOR_ID,AUDIT_TIME,SERVICE_ID,
|
||||
REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,ATTRIBUTE,LABLE,
|
||||
AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT,DNS_STRATEGY_ID
|
||||
AREA_EFFECTIVE_IDS,FUNCTION_ID,RATELIMIT,
|
||||
DNS_STRATEGY_ID,IR_TYPE
|
||||
</sql>
|
||||
<sql id="BaseIpCfg_Value_List" >
|
||||
#{cfgDesc,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},#{cfgType,jdbcType=VARCHAR},
|
||||
@@ -96,7 +98,7 @@
|
||||
#{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},
|
||||
#{dnsStrategyId,jdbcType=INTEGER}
|
||||
#{dnsStrategyId,jdbcType=INTEGER},#{irType,jdbcType=INTEGER}
|
||||
</sql>
|
||||
<select id="getById" resultMap="BaseIpMap" parameterType="java.lang.Long" >
|
||||
SELECT
|
||||
@@ -270,6 +272,9 @@
|
||||
<if test="dnsStrategyId != null">
|
||||
AND ${page.alias}.DNS_STRATEGY_ID=#{dnsStrategyId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="irType != null">
|
||||
AND ${page.alias}.IR_TYPE=#{irType,jdbcType=INTEGER}
|
||||
</if>
|
||||
</when>
|
||||
<otherwise>
|
||||
<if test="cfgId != null">
|
||||
@@ -377,6 +382,9 @@
|
||||
<if test="dnsStrategyId != null">
|
||||
AND r.DNS_STRATEGY_ID=#{dnsStrategyId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="irType != null">
|
||||
AND r.IR_TYPE=#{irType,jdbcType=INTEGER}
|
||||
</if>
|
||||
</otherwise>
|
||||
</choose>
|
||||
<!-- 数据范围过滤 -->
|
||||
@@ -529,6 +537,9 @@
|
||||
<if test="dnsStrategyId != null">
|
||||
DNS_STRATEGY_ID=#{dnsStrategyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="irType != null">
|
||||
IR_TYPE=#{irType,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
where cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
|
||||
@@ -192,7 +192,9 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
maatCfg.setGroupNum(groupRelationList.size());
|
||||
maatCfg.setAreaIpRegionList(areaIpRegionList);
|
||||
if(Constants.SERVICE_IP_MULITIPLEX==cfg.getServiceId().intValue()){
|
||||
|
||||
String region=Constants.USERREGION_IR_STRATEGY+"="+cfg.getDnsStrategyId()+Constants.USER_REGION_SPLIT
|
||||
+Constants.USERREGION_IR_TYPE+"="+cfg.getIrType();
|
||||
maatCfg.setUserRegion(region);
|
||||
}else if(Constants.SERVICE_IP_RATELIMIT==cfg.getServiceId().intValue()){
|
||||
maatCfg.setUserRegion(Constants.USERREGION_RATE_LIMIT+"="+cfg.getRatelimit());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user