(1)特定服务管理,增加一列,配置类型;

(2)app策略,增加一列行为类型
This commit is contained in:
wangxin
2018-07-23 18:48:11 +08:00
parent 5d99522e57
commit cb650427e4
19 changed files with 262 additions and 27 deletions

View File

@@ -29,6 +29,11 @@
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
<result column="ratelimit" property="ratelimit" jdbcType="INTEGER" />
<result column="function_id" property="functionId" jdbcType="INTEGER" />
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="AppIpCfgMap" type="com.nis.domain.configuration.AppIpCfg" >
@@ -229,7 +234,8 @@
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY,
r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,
r.CFG_TYPE,r.CFG_REGION_CODE,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN
r.CFG_TYPE,r.CFG_REGION_CODE,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.USER_REGION1,r.USER_REGION2,
r.USER_REGION3,r.USER_REGION4,r.USER_REGION5
</sql>
<sql id="AppIpCfg_Column" >
@@ -440,6 +446,21 @@
</if>
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
</if>
<if test="userRegion1 != null and userRegion1 != ''">
AND r.user_region1 =#{userRegion1,jdbcType=VARCHAR}
</if>
<if test="userRegion2 != null and userRegion2 != ''">
AND r.user_region2 =#{userRegion2,jdbcType=VARCHAR}
</if>
<if test="userRegion3 != null and userRegion3 != ''">
AND r.user_region3 =#{userRegion3,jdbcType=VARCHAR}
</if>
<if test="userRegion4 != null and userRegion4 != ''">
AND r.user_region4 =#{userRegion4,jdbcType=VARCHAR}
</if>
<if test="userRegion5 != null and userRegion5 != ''">
AND r.user_region5 =#{userRegion5,jdbcType=VARCHAR}
</if>
<if test="ipPort!=null">
AND r.compile_id in (select t.compile_id from ip_port_cfg t
@@ -991,10 +1012,13 @@
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,RATELIMIT,FUNCTION_ID,
CFG_TYPE,CFG_REGION_CODE,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN
CFG_TYPE,CFG_REGION_CODE,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,USER_REGION1
,USER_REGION2,USER_REGION3,USER_REGION4,USER_REGION5
)values (
<include refid="AppCommonCfg_Value_List" />,
#{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER}
,#{userRegion1,jdbcType=VARCHAR} ,#{userRegion2,jdbcType=VARCHAR} ,#{userRegion3,jdbcType=VARCHAR}
,#{userRegion4,jdbcType=VARCHAR} ,#{userRegion5,jdbcType=VARCHAR}
)
</insert>
<insert id="insertAppIpCfg" parameterType="com.nis.domain.configuration.AppIpCfg" >
@@ -1230,6 +1254,21 @@
</if>
<if test="cfgType != null and cfgType != ''">
CFG_TYPE =#{cfgType,jdbcType=VARCHAR},
</if>
<if test="userRegion1 != null and userRegion1 != ''">
USER_REGION1 =#{userRegion1,jdbcType=VARCHAR},
</if>
<if test="userRegion2 != null and userRegion2 != ''">
USER_REGION2 =#{userRegion2,jdbcType=VARCHAR},
</if>
<if test="userRegion3 != null and userRegion3 != ''">
USER_REGION1 =#{userRegion3,jdbcType=VARCHAR},
</if>
<if test="userRegion4 != null and userRegion4 != ''">
USER_REGION1 =#{userRegion4,jdbcType=VARCHAR},
</if>
<if test="userRegion5 != null and userRegion5 != ''">
USER_REGION1 =#{userRegion5,jdbcType=VARCHAR},
</if>
</trim>
</set>

View File

@@ -11,6 +11,7 @@
<result column="op_time" property="opTime" jdbcType="TIMESTAMP" />
<result column="is_leaf" property="isLeaf" jdbcType="INTEGER" />
<result column="group_id" property="groupId" jdbcType="INTEGER" />
<result column="cfg_type" property="cfgType" jdbcType="INTEGER" />
<!-- 父id -->
<association property="parent" javaType="com.nis.domain.specific.SpecificServiceCfg">
<id column="parent_id" property="specServiceId" jdbcType="INTEGER" />
@@ -26,7 +27,8 @@
s.op_time AS opTime,
s.parent_id AS "parent.specServiceId",
s.is_leaf AS isLeaf,
s.group_id AS groupId
s.group_id AS groupId,
s.cfg_type AS cfgType
</sql>
@@ -53,6 +55,9 @@
<if test="groupId != null and groupId != '' ">
AND group_id like '%${groupId}%'
</if>
<if test="cfgType != null and cfgType != '' ">
AND cfg_type =#{cfgType,jdbcType=INTEGER}
</if>
<if test="beginDate != null" >
AND s.op_time &gt;= #{beginDate,jdbcType=TIMESTAMP}
</if>
@@ -112,6 +117,9 @@
<if test="specificServiceCfg.groupId != null and specificServiceCfg.groupId != '' ">
AND group_id like '%${specificServiceCfg.groupId}%'
</if>
<if test="specificServiceCfg.cfgType != null and specificServiceCfg.cfgType != '' ">
AND cfg_type = #{specificServiceCfg.cfgType}
</if>
<if test="specificServiceCfg.beginDate != null">
AND op_time &gt; #{specificServiceCfg.beginDate}
</if>
@@ -130,8 +138,8 @@
<!-- 新增 -->
<insert id="insert" parameterType="com.nis.domain.specific.SpecificServiceCfg" useGeneratedKeys="true">
insert into specific_service_cfg (spec_service_code,spec_service_name,spec_service_desc,is_valid, op_time, parent_id,is_leaf,group_id)
values(#{specServiceCode},#{specServiceName},#{specServiceDesc},#{isValid},#{opTime},#{parent.specServiceId},#{isLeaf},#{groupId})
insert into specific_service_cfg (spec_service_code,spec_service_name,spec_service_desc,is_valid, op_time, parent_id,is_leaf,group_id,cfg_type)
values(#{specServiceCode},#{specServiceName},#{specServiceDesc},#{isValid},#{opTime},#{parent.specServiceId},#{isLeaf},#{groupId},#{cfgType})
</insert>
<!-- 修改 -->
@@ -144,7 +152,8 @@
s.op_time = #{opTime},
s.parent_id = #{parent.specServiceId},
s.is_leaf = #{isLeaf},
s.group_id = #{groupId}
s.group_id = #{groupId},
s.cfg_type = #{cfgType}
WHERE s.spec_service_id = #{specServiceId}
</update>