|
|
|
|
@@ -35,12 +35,49 @@
|
|
|
|
|
<result column="auditor_name" property="auditorName" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="editor_name" property="editorName" jdbcType="VARCHAR" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<resultMap id="SubscribeIdCfgMap" type="com.nis.domain.configuration.NtcSubscribeIdCfg" >
|
|
|
|
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
|
|
|
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="action" property="action" jdbcType="INTEGER" />
|
|
|
|
|
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
|
|
|
|
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
|
|
|
|
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
|
|
|
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
|
|
|
|
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
|
|
|
|
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
|
|
|
|
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
|
|
|
|
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
|
|
|
|
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
|
|
|
|
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
|
|
|
|
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
|
|
|
|
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
|
|
|
|
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
|
|
|
|
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
|
|
|
|
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
|
|
|
|
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
|
|
|
|
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
|
|
|
|
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="BaseStringCfg_Column_List_with_id" >
|
|
|
|
|
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,RATELIMIT
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<sql id="SubscribeIdCfg_Column">
|
|
|
|
|
r.cfg_id,r.cfg_desc,r.cfg_keywords,r.cfg_type,
|
|
|
|
|
r.action,r.is_valid,r.is_audit,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.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,r.cfg_region_code
|
|
|
|
|
</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,
|
|
|
|
|
@@ -474,4 +511,184 @@
|
|
|
|
|
<update id="deleteByCompileIds" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
|
|
|
|
update ${tableName} set is_valid = -1, editor_id = #{user,jdbcType=INTEGER} , edit_time = NOW() where compile_id in (${compileIds})
|
|
|
|
|
</update>
|
|
|
|
|
<!-- =================NtcSubscribeIdCfg begin========================== -->
|
|
|
|
|
<!-- 根据compileId获取NtcSubscribeIdCfg信息 -->
|
|
|
|
|
<select id="findSubscribeIdCfgList" resultMap="SubscribeIdCfgMap" parameterType="com.nis.domain.configuration.NtcSubscribeIdCfg">
|
|
|
|
|
select
|
|
|
|
|
<include refid="SubscribeIdCfg_Column" />
|
|
|
|
|
from ntc_subscribe_id_cfg r
|
|
|
|
|
<where>
|
|
|
|
|
<if test="compileId != null">
|
|
|
|
|
and r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="isValid != null">
|
|
|
|
|
and r.is_valid=#{isValid,jdbcType=INTEGER}
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
and r.is_valid != -1
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
</where>
|
|
|
|
|
</select>
|
|
|
|
|
<!-- insert ntc_subscribe_id_cfg表信息 -->
|
|
|
|
|
<insert id="saveSubscribeIdCfg" parameterType="com.nis.domain.configuration.NtcSubscribeIdCfg" >
|
|
|
|
|
insert into ntc_subscribe_id_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,
|
|
|
|
|
cfg_keywords,
|
|
|
|
|
cfg_type,
|
|
|
|
|
cfg_region_code,
|
|
|
|
|
expr_type,
|
|
|
|
|
match_method,
|
|
|
|
|
is_hexbin
|
|
|
|
|
)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},
|
|
|
|
|
#{cfgKeywords,jdbcType=VARCHAR},
|
|
|
|
|
#{cfgType,jdbcType=VARCHAR},
|
|
|
|
|
#{cfgRegionCode,jdbcType=INTEGER},
|
|
|
|
|
#{exprType,jdbcType=INTEGER},
|
|
|
|
|
#{matchMethod,jdbcType=INTEGER},
|
|
|
|
|
#{isHexbin,jdbcType=INTEGER}
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
<!-- update ntc_subscribe_id_cfg表信息 -->
|
|
|
|
|
<update id="updateSubscribeIdCfg" parameterType="com.nis.domain.configuration.NtcSubscribeIdCfg" >
|
|
|
|
|
update ntc_subscribe_id_cfg
|
|
|
|
|
<set >
|
|
|
|
|
<trim suffixOverrides=",">
|
|
|
|
|
<if test="cfgDesc != null and cfgDesc != ''" >
|
|
|
|
|
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="action != null" >
|
|
|
|
|
action = #{action,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="isValid != null" >
|
|
|
|
|
is_valid = #{isValid,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="isAudit != null" >
|
|
|
|
|
is_audit = #{isAudit,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="editorId != null" >
|
|
|
|
|
editor_id = #{editorId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="editTime != null and editTime != ''" >
|
|
|
|
|
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="auditorId != null" >
|
|
|
|
|
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="auditTime != null and auditTime != ''" >
|
|
|
|
|
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="compileId != null" >
|
|
|
|
|
COMPILE_ID = #{compileId,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="requestId != null" >
|
|
|
|
|
request_id = #{requestId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="isAreaEffective != null" >
|
|
|
|
|
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="classify != null and classify != ''" >
|
|
|
|
|
classify = #{classify,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="attribute != null and attribute != ''" >
|
|
|
|
|
attribute = #{attribute,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="lable != null and lable != ''" >
|
|
|
|
|
lable = #{lable,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="areaEffectiveIds != null" >
|
|
|
|
|
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="functionId != null" >
|
|
|
|
|
function_id = #{functionId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="serviceId != null" >
|
|
|
|
|
service_id = #{serviceId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfgKeywords != null and cfgKeywords != ''" >
|
|
|
|
|
cfg_keywords = #{cfgKeywords,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfgType != null and cfgType != ''" >
|
|
|
|
|
cfg_type = #{cfgType,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfgRegionCode != null " >
|
|
|
|
|
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="exprType != null " >
|
|
|
|
|
expr_type = #{exprType,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="matchMethod != null " >
|
|
|
|
|
match_method = #{matchMethod,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="isHexbin != null " >
|
|
|
|
|
is_hexbin = #{isHexbin,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</set>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="cfgId != null" >
|
|
|
|
|
and cfg_id = #{cfgId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="compileId != null" >
|
|
|
|
|
and compile_id = #{compileId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="functionId != null" >
|
|
|
|
|
and function_id = #{functionId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</update>
|
|
|
|
|
<!-- 删除 subscribe信息 -->
|
|
|
|
|
<delete id="deleteSubscribeIdCfg" parameterType="com.nis.domain.configuration.NtcSubscribeIdCfg" >
|
|
|
|
|
delete from ntc_subscribe_id_cfg
|
|
|
|
|
<where>
|
|
|
|
|
<if test="cfgId != null" >
|
|
|
|
|
and cfg_id = #{cfgId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="compileId != null" >
|
|
|
|
|
and compile_id = #{compileId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="functionId != null" >
|
|
|
|
|
and function_id = #{functionId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</delete>
|
|
|
|
|
<!-- =====================NtcSubscribeIdCfg end======================== -->
|
|
|
|
|
</mapper>
|