(1)BaseStringCfg 类修改为BaseStringCfg<T>,加入泛型。所有继承BaseStringCfg的类均已经修改泛型。

(2)HttpUrlCfg新增ratelimit一列,用于域名限速。
(3)域名限速新增/修改增加限速比例一列,列表展示新增限速比例一列。
(4)审核自定义域域名拦截与域名限速进行调整。
(5)删除MultipleCfg以及相关的dao,service
(6StringCfgService重命名为DomainService,其不具备字符串配置都能调用的功能
This commit is contained in:
wangxin
2018-06-29 12:44:33 +08:00
parent 25bb850d47
commit b30e88c3b8
48 changed files with 715 additions and 1084 deletions

View File

@@ -28,6 +28,7 @@
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
<result column="function_id" property="functionId" jdbcType="INTEGER" />
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="VARCHAR" />
<result column="ratelimit" property="ratelimit" jdbcType="INTEGER" />
</resultMap>
<resultMap id="BaseStringMapWithUser" type="com.nis.domain.configuration.BaseStringCfg" extends="BaseStringMap">
<result column="creator_name" property="creatorName" jdbcType="VARCHAR" />
@@ -39,7 +40,7 @@
CFG_ID, CFG_DESC, CFG_KEYWORDS,CFG_TYPE,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,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,FUNCTION_ID,CFG_REGION_CODE
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,FUNCTION_ID,CFG_REGION_CODE,RATELIMIT
</sql>
<!-- <sql id="BaseStringCfg_Column_List_with_id_alias" >
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc, r.CFG_KEYWORDS as cfgKeywords, r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit,
@@ -55,6 +56,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}.EXPR_TYPE as exprType,${page.alias}.MATCH_METHOD as matchMethod,${page.alias}.IS_HEXBIN as isHexbin,${page.alias}.AREA_EFFECTIVE_IDS AS areaEffectiveIds,${page.alias}.FUNCTION_ID AS functionId,${page.alias}.CFG_REGION_CODE as cfgRegionCode
,${page.alias}.RATELIMIT as ratelimit
</when>
<otherwise>
r.CFG_ID as cfgId, r.CFG_DESC as cfgDesc, r.CFG_KEYWORDS as cfgKeywords,r.CFG_TYPE as cfgType, r.ACTION as action,r.IS_VALID as isValid,r.IS_AUDIT as isAudit,
@@ -62,6 +64,7 @@
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.EXPR_TYPE as exprType,r.MATCH_METHOD as matchMethod,r.IS_HEXBIN as isHexbin,
r.AREA_EFFECTIVE_IDS AS areaEffectiveIds,r.FUNCTION_ID AS functionId,r.CFG_REGION_CODE as cfgRegionCode
,r.RATELIMIT as ratelimit
</otherwise>
</choose>
</sql>
@@ -69,7 +72,8 @@
CFG_DESC, CFG_KEYWORDS,CFG_TYPE, 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,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,AREA_EFFECTIVE_IDS,FUNCTION_ID,CFG_REGION_CODE
ATTRIBUTE,LABLE,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,AREA_EFFECTIVE_IDS,FUNCTION_ID,CFG_REGION_CODE,
RATELIMIT
</sql>
<sql id="BaseStringCfg_Value_List" >
#{cfgDesc,jdbcType=VARCHAR},#{cfgKeywords,jdbcType=VARCHAR},#{cfgType,jdbcType=VARCHAR},#{action,jdbcType=INTEGER},
@@ -80,6 +84,7 @@
#{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR},
#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER},
#{areaEffectiveIds,jdbcType=VARCHAR},#{functionId,jdbcType=INTEGER},#{cfgRegionCode,jdbcType=INTEGER}
,#{ratelimit,jdbcType=INTEGER}
</sql>
<select id="getById" resultMap="BaseStringMap" parameterType="java.lang.Long" >
SELECT
@@ -211,6 +216,9 @@
<if test="cfgRegionCode != null">
AND ${page.alias}.CFG_REGION_CODE =#{cfgRegionCode,jdbcType=INTEGER}
</if>
<if test="ratelimit != null">
AND ${page.alias}.RATELIMIT =#{ratelimit,jdbcType=INTEGER}
</if>
</when>
<otherwise>
<if test="cfgId != null">
@@ -294,6 +302,9 @@
<if test="cfgRegionCode != null">
AND r.CFG_REGION_CODE =#{cfgRegionCode,jdbcType=INTEGER}
</if>
<if test="ratelimit != null">
AND r.RATELIMIT =#{ratelimit,jdbcType=INTEGER}
</if>
</otherwise>
</choose>
</trim>
@@ -420,6 +431,9 @@
<if test="cfgRegionCode != null" >
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
</if>
<if test="ratelimit != null" >
ratelimit = #{ratelimit,jdbcType=INTEGER},
</if>
</trim>
</set>
where cfg_id = #{cfgId,jdbcType=BIGINT}