2018-05-22 17:30:52 +08:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
|
|
<mapper namespace="com.nis.web.dao.configuration.AvContentCfgDao" >
|
|
|
|
|
|
|
|
|
|
<resultMap id="CfgIndexInfoMap" type="com.nis.domain.configuration.CfgIndexInfo" >
|
|
|
|
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
|
|
|
|
<result column="cfg_desc" property="cfgDesc" 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="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
|
|
|
|
</resultMap>
|
|
|
|
|
<resultMap id="AvVoipIpCfgMap" type="com.nis.domain.configuration.AvVoipIpCfg" >
|
|
|
|
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
|
|
|
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
|
|
|
|
|
<result column="ip_pattern" property="ipPattern" jdbcType="INTEGER" />
|
|
|
|
|
<result column="dest_ip_address" property="destIpAddress" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="src_ip_address" property="srcIpAddress" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="dest_port" property="destPort" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="src_port" property="srcPort" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="port_pattern" property="portPattern" jdbcType="INTEGER" />
|
|
|
|
|
<result column="direction" property="direction" jdbcType="INTEGER" />
|
|
|
|
|
<result column="protocol" property="protocol" jdbcType="INTEGER" />
|
|
|
|
|
<result column="protocol_id" property="protocolId" jdbcType="INTEGER" />
|
|
|
|
|
<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="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>
|
|
|
|
|
<resultMap id="AvVoipAccountCfgMap" type="com.nis.domain.configuration.AvVoipAccountCfg" >
|
|
|
|
|
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
|
|
|
|
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
|
|
|
|
<result column="district" property="district" 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="AvVoip_Column" >
|
2018-05-24 16:04:16 +08:00
|
|
|
r.CFG_ID,r.CFG_DESC,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.AREA_EFFECTIVE_IDS,r.function_id
|
2018-05-22 17:30:52 +08:00
|
|
|
</sql>
|
|
|
|
|
<sql id="AvVoipIp_Column" >
|
2018-05-24 16:04:16 +08:00
|
|
|
r.cfg_id,r.cfg_desc,r.ip_type,r.src_ip_address,r.ip_pattern,r.port_pattern,r.src_port
|
|
|
|
|
,r.protocol,r.protocol_id,r.direction,r.cfg_type,r.action,r.dest_port,r.dest_ip_address
|
|
|
|
|
,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.area_effective_ids,r.function_id,r.cfg_region_code
|
2018-05-22 17:30:52 +08:00
|
|
|
</sql>
|
|
|
|
|
<sql id="AvVoipAccount_Column" >
|
2018-05-24 16:04:16 +08:00
|
|
|
r.cfg_id,r.cfg_desc,r.district,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
|
2018-05-22 17:30:52 +08:00
|
|
|
</sql>
|
2018-05-23 17:34:40 +08:00
|
|
|
<!-- 条件查询列表信息 -->
|
2018-05-22 17:30:52 +08:00
|
|
|
<select id="findVoipList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
|
|
|
SELECT
|
|
|
|
|
<include refid="AvVoip_Column" />
|
|
|
|
|
<trim prefix="," prefixOverrides=",">
|
|
|
|
|
, s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
|
|
|
|
,ri.request_title as requestName
|
|
|
|
|
</trim>
|
2018-05-24 16:04:16 +08:00
|
|
|
FROM cfg_index_info r
|
|
|
|
|
left join sys_user s on r.creator_id=s.id
|
|
|
|
|
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
|
2018-05-22 17:30:52 +08:00
|
|
|
|
|
|
|
|
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
|
|
|
|
<if test="cfg.page !=null and cfg.page.where != null and cfg.page.where != ''">
|
|
|
|
|
AND ${cfg.page.where}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.cfgId != null">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.CFG_DESC like concat(concat('%',#{cfg.cfgDesc,jdbcType=VARCHAR}),'%')
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.action != null">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.ACTION=#{cfg.action,jdbcType=INTEGER}
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.isValid != null">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.IS_VALID=#{cfg.isValid,jdbcType=INTEGER}
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.isValid == null">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.IS_VALID != -1
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.isAudit != null">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.IS_AUDIT=#{cfg.isAudit,jdbcType=INTEGER}
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.creatorName != null and cfg.creatorName != ''">
|
|
|
|
|
AND CREATOR_NAME like concat(concat('%',#{cfg.creatorName,jdbcType=VARCHAR}),'%')
|
|
|
|
|
</if>
|
|
|
|
|
<!-- <if test="cfg.search_create_time_start != null and cfg.search_create_time_start != ''">
|
2018-05-24 16:04:16 +08:00
|
|
|
<![CDATA[AND r.CREATE_TIME >= #{cfg.search_create_time_start,jdbcType=TIMESTAMP}]]>
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.search_create_time_end != null and cfg.search_create_time_end != ''">
|
2018-05-24 16:04:16 +08:00
|
|
|
<![CDATA[AND r.CREATE_TIME <= #{cfg.search_create_time_end,jdbcType=TIMESTAMP}]]>
|
2018-05-22 17:30:52 +08:00
|
|
|
</if> -->
|
|
|
|
|
<if test="cfg.editorName != null and cfg.editorName != ''">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.EDITOR_NAME like concat(concat('%',#{cfg.editorName,jdbcType=VARCHAR}),'%')
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<!-- <if test="cfg.search_edit_time_start != null and cfg.search_edit_time_start != ''">
|
2018-05-24 16:04:16 +08:00
|
|
|
<![CDATA[AND r.EDIT_TIME >= #{cfg.search_edit_time_start,jdbcType=TIMESTAMP}]]>
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.search_edit_time_end != null and cfg.search_edit_time_end != ''">
|
2018-05-24 16:04:16 +08:00
|
|
|
<![CDATA[AND r.EDIT_TIME <= #{cfg.search_edit_time_end,jdbcType=TIMESTAMP}]]>
|
2018-05-22 17:30:52 +08:00
|
|
|
</if> -->
|
|
|
|
|
<if test="cfg.auditorName != null and cfg.auditorName != ''">
|
|
|
|
|
AND AUDITOR_NAME like concat(concat('%',#{cfg.auditorName,jdbcType=VARCHAR}),'%')
|
|
|
|
|
</if>
|
|
|
|
|
<!-- <if test="cfg.search_audit_time_start != null and cfg.search_audit_time_start != ''">
|
2018-05-24 16:04:16 +08:00
|
|
|
<![CDATA[AND r.AUDIT_TIME >= #{cfg.search_audit_time_start,jdbcType=TIMESTAMP}]]>
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.search_audit_time_end != null and cfg.search_audit_time_end != ''">
|
2018-05-24 16:04:16 +08:00
|
|
|
<![CDATA[AND r.AUDIT_TIME <= #{cfg.search_audit_time_end,jdbcType=TIMESTAMP}]]>
|
2018-05-22 17:30:52 +08:00
|
|
|
</if> -->
|
|
|
|
|
<if test="cfg.serviceId != null">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.SERVICE_ID=#{cfg.serviceId,jdbcType=INTEGER}
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.requestId != null">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.REQUEST_ID=#{cfg.requestId,jdbcType=INTEGER}
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.compileId != null">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.isAreaEffective != null">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.IS_AREA_EFFECTIVE=#{cfg.isAreaEffective,jdbcType=INTEGER}
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.classify != null and cfg.classify != ''">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.classify like concat(concat('%',#{cfg.classify,jdbcType=VARCHAR}),'%')
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.attribute != null and cfg.attribute != ''">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.attribute like concat(concat('%',#{cfg.attribute,jdbcType=VARCHAR}),'%')
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.lable != null and cfg.lable != ''">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.lable like concat(concat('%',#{cfg.lable,jdbcType=VARCHAR}),'%')
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.areaEffectiveIds != null and cfg.areaEffectiveIds != ''">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{cfg.areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.functionId != null">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.function_id=#{cfg.functionId,jdbcType=INTEGER}
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
2018-05-22 19:39:12 +08:00
|
|
|
<if test="(cfg.voipIp.srcIpAddress != null and cfg.voipIp.srcIpAddress != '') or (cfg.voipIp.srcPort != null and cfg.voipIp.srcPort != '')">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.compile_id in (select t.compile_id from av_voip_ip_cfg t
|
2018-05-22 17:30:52 +08:00
|
|
|
<where>
|
2018-05-22 19:39:12 +08:00
|
|
|
<if test="cfg.voipIp.srcIpAddress != null and cfg.voipIp.srcIpAddress != ''">
|
|
|
|
|
and t.src_ip_address =#{cfg.voipIp.srcIpAddress,jdbcType=VARCHAR}
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipIp.srcPort != null and cfg.voipIp.srcPort != ''">
|
|
|
|
|
and t.src_port =#{cfg.voipIp.srcPort,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
<if test="(cfg.voipAccount.cfgKeywords != null and cfg.voipAccount.cfgKeywords != '') or (cfg.voipAccount.district != null and cfg.voipAccount.district != '') ">
|
2018-05-24 16:04:16 +08:00
|
|
|
AND r.compile_id in (select f.compile_id from av_voip_account_cfg f
|
2018-05-22 17:30:52 +08:00
|
|
|
<where>
|
|
|
|
|
<if test="cfg.voipAccount.cfgKeywords != null and cfg.voipAccount.cfgKeywords != ''">
|
|
|
|
|
and f.cfg_keywords like concat(concat('%',#{cfg.voipAccount.cfgKeywords,jdbcType=VARCHAR}),'%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipAccount.district != null and cfg.voipAccount.district != ''">
|
|
|
|
|
and f.district =#{cfg.voipAccount.district,jdbcType=VARCHAR}
|
|
|
|
|
</if>
|
2018-05-22 19:39:12 +08:00
|
|
|
<if test="cfg.compileId != null">
|
|
|
|
|
and f.compile_id =#{cfg.compileId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
2018-05-22 17:30:52 +08:00
|
|
|
</where>
|
|
|
|
|
)
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<!-- 数据范围过滤 -->
|
|
|
|
|
${cfg.sqlMap.dsf}
|
|
|
|
|
</trim>
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="cfg.page !=null and cfg.page.orderBy != null and cfg.page.orderBy != ''">
|
|
|
|
|
ORDER BY ${cfg.page.orderBy}
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
2018-05-24 16:04:16 +08:00
|
|
|
ORDER BY r.CFG_ID desc
|
2018-05-22 17:30:52 +08:00
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
</select>
|
2018-05-23 17:34:40 +08:00
|
|
|
<!-- 根据compileId获取avVoipIpCfg信息 -->
|
|
|
|
|
<select id="findVoipIpCfgList" resultMap="AvVoipIpCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
2018-05-22 17:30:52 +08:00
|
|
|
select
|
|
|
|
|
<include refid="AvVoipIp_Column" />
|
2018-05-24 16:04:16 +08:00
|
|
|
from av_voip_ip_cfg r
|
2018-05-22 17:30:52 +08:00
|
|
|
<where>
|
|
|
|
|
<if test="cfg.compileId != null">
|
2018-05-24 16:04:16 +08:00
|
|
|
and r.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
2018-05-24 16:04:16 +08:00
|
|
|
and r.is_valid !=-1
|
2018-05-22 17:30:52 +08:00
|
|
|
</where>
|
|
|
|
|
</select>
|
2018-05-23 17:34:40 +08:00
|
|
|
<!-- 根据compileId获取avVoipAccountCfg信息 -->
|
|
|
|
|
<select id="findVoipAccountCfgList" resultMap="AvVoipAccountCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
2018-05-22 17:30:52 +08:00
|
|
|
select
|
|
|
|
|
<include refid="AvVoipAccount_Column" />
|
2018-05-24 16:04:16 +08:00
|
|
|
from av_voip_account_cfg r
|
2018-05-22 17:30:52 +08:00
|
|
|
<where>
|
|
|
|
|
<if test="cfg.compileId != null">
|
2018-05-24 16:04:16 +08:00
|
|
|
and r.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
|
2018-05-22 17:30:52 +08:00
|
|
|
</if>
|
2018-05-24 16:04:16 +08:00
|
|
|
and r.is_valid != -1
|
2018-05-22 17:30:52 +08:00
|
|
|
</where>
|
|
|
|
|
|
|
|
|
|
</select>
|
2018-05-23 17:34:40 +08:00
|
|
|
<!-- 根据Id获取cfgIndexInfo信息 -->
|
2018-05-22 17:30:52 +08:00
|
|
|
<select id="getCfgIndexInfo" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
|
|
|
|
SELECT
|
|
|
|
|
*
|
|
|
|
|
FROM cfg_index_info a
|
|
|
|
|
<where>
|
|
|
|
|
<if test="cfg.cfgId != null">
|
|
|
|
|
and a.CFG_ID=#{cfg.cfgId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
2018-05-23 17:34:40 +08:00
|
|
|
<if test="cfg.compileId != null">
|
|
|
|
|
and a.compile_Id=#{cfg.compileId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
2018-05-24 16:04:16 +08:00
|
|
|
and a.is_valid != -1
|
2018-05-22 17:30:52 +08:00
|
|
|
</where>
|
|
|
|
|
</select>
|
2018-05-23 17:34:40 +08:00
|
|
|
<!-- insert cfgIndexInfox -->
|
|
|
|
|
<insert id="insertCfgIndexInfo" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
|
|
|
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
|
|
|
|
SELECT LAST_INSERT_ID()
|
|
|
|
|
</selectKey>
|
|
|
|
|
insert into cfg_index_info(
|
|
|
|
|
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
|
|
|
|
|
)values (
|
|
|
|
|
#{cfg.cfgDesc,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.action,jdbcType=INTEGER},
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
#{cfg.creatorId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{cfg.editorId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.editTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{cfg.auditorId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.auditTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{cfg.serviceId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.requestId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.compileId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.isAreaEffective,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.classify,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.attribute,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.lable,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.areaEffectiveIds,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.functionId,jdbcType=INTEGER}
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
<!-- insert AV_VOIP_IP_CFG表信息 -->
|
|
|
|
|
<insert id="insertAvVoipIp" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
|
|
|
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
|
|
|
|
SELECT LAST_INSERT_ID()
|
|
|
|
|
</selectKey>
|
|
|
|
|
insert into av_voip_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 (
|
|
|
|
|
#{cfg.cfgDesc,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.action,jdbcType=INTEGER},
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
#{cfg.creatorId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{cfg.editorId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.editTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{cfg.auditorId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.auditTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{cfg.serviceId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.requestId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.compileId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.isAreaEffective,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.classify,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.attribute,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.lable,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.areaEffectiveIds,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.functionId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.voipIp.ipType,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.voipIp.srcIpAddress,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.voipIp.ipPattern,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.voipIp.portPattern,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.voipIp.srcPort,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.voipIp.protocol,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.voipIp.protocolId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.voipIp.direction,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.voipIp.destPort,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.voipIp.destIpAddress,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.voipIp.cfgType,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.voipIp.cfgRegionCode,jdbcType=INTEGER}
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
<!-- insert AV_VOIP_ACCOUNT_CFG表信息 -->
|
|
|
|
|
<insert id="insertAvVoipAccount" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
|
|
|
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
|
|
|
|
SELECT LAST_INSERT_ID()
|
|
|
|
|
</selectKey>
|
|
|
|
|
insert into av_voip_account_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,
|
|
|
|
|
district,
|
|
|
|
|
cfg_keywords,
|
|
|
|
|
cfg_type,
|
|
|
|
|
cfg_region_code,
|
|
|
|
|
expr_type,
|
|
|
|
|
match_method,
|
|
|
|
|
is_hexbin
|
|
|
|
|
)values (
|
|
|
|
|
#{cfg.cfgDesc,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.action,jdbcType=INTEGER},
|
|
|
|
|
0,
|
|
|
|
|
0,
|
|
|
|
|
#{cfg.creatorId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.createTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{cfg.editorId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.editTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{cfg.auditorId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.auditTime,jdbcType=TIMESTAMP},
|
|
|
|
|
#{cfg.serviceId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.requestId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.compileId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.isAreaEffective,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.classify,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.attribute,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.lable,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.areaEffectiveIds,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.functionId,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.voipAccount.district,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.voipAccount.cfgKeywords,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.voipAccount.cfgType,jdbcType=VARCHAR},
|
|
|
|
|
#{cfg.voipAccount.cfgRegionCode,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.voipAccount.exprType,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.voipAccount.matchMethod,jdbcType=INTEGER},
|
|
|
|
|
#{cfg.voipAccount.isHexbin,jdbcType=INTEGER}
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
2018-05-24 16:04:16 +08:00
|
|
|
<!-- update cfg_index_info表信息 -->
|
|
|
|
|
<update id="updateCfgIndexInfo" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
|
|
|
update cfg_index_info
|
|
|
|
|
<set >
|
|
|
|
|
<trim suffixOverrides=",">
|
|
|
|
|
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''" >
|
|
|
|
|
cfg_desc = #{cfg.cfgDesc,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.action != null" >
|
|
|
|
|
action = #{cfg.action,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.isValid != null" >
|
|
|
|
|
is_valid = #{cfg.isValid,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.isAudit != null" >
|
|
|
|
|
is_audit = #{cfg.isAudit,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.editorId != null" >
|
|
|
|
|
editor_id = #{cfg.editorId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.editTime != null and cfg.editTime != ''" >
|
|
|
|
|
edit_time = #{cfg.editTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.auditorId != null" >
|
|
|
|
|
AUDITOR_ID = #{cfg.auditorId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.auditTime != null and cfg.auditTime != ''" >
|
|
|
|
|
AUDIT_TIME = #{cfg.auditTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.compileId != null" >
|
|
|
|
|
COMPILE_ID = #{cfg.compileId,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.requestId != null" >
|
|
|
|
|
request_id = #{cfg.requestId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.isAreaEffective != null" >
|
|
|
|
|
is_area_effective = #{cfg.isAreaEffective,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.classify != null and cfg.classify != ''" >
|
|
|
|
|
classify = #{cfg.classify,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.attribute != null and cfg.attribute != ''" >
|
|
|
|
|
attribute = #{cfg.attribute,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.lable != null and cfg.lable != ''" >
|
|
|
|
|
lable = #{cfg.lable,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.areaEffectiveIds != null" >
|
|
|
|
|
area_effective_ids = #{cfg.areaEffectiveIds,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.functionId != null" >
|
|
|
|
|
function_id = #{cfg.functionId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.serviceId != null" >
|
|
|
|
|
service_id = #{cfg.serviceId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</set>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="cfg.cfgId != null" >
|
|
|
|
|
and cfg_id = #{cfg.cfgId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.compileId != null" >
|
|
|
|
|
and compile_id = #{cfg.compileId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.functionId != null" >
|
|
|
|
|
and function_id = #{cfg.functionId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</update>
|
|
|
|
|
<!-- update av_voip_ip_cfg表信息 -->
|
|
|
|
|
<update id="updateAvVoipIp" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
|
|
|
update av_voip_ip_cfg
|
|
|
|
|
<set >
|
|
|
|
|
<trim suffixOverrides=",">
|
|
|
|
|
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''" >
|
|
|
|
|
cfg_desc = #{cfg.cfgDesc,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.action != null" >
|
|
|
|
|
action = #{cfg.action,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.isValid != null" >
|
|
|
|
|
is_valid = #{cfg.isValid,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.isAudit != null" >
|
|
|
|
|
is_audit = #{cfg.isAudit,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.editorId != null" >
|
|
|
|
|
editor_id = #{cfg.editorId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.editTime != null and cfg.editTime != ''" >
|
|
|
|
|
edit_time = #{cfg.editTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.auditorId != null" >
|
|
|
|
|
AUDITOR_ID = #{cfg.auditorId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.auditTime != null and cfg.auditTime != ''" >
|
|
|
|
|
AUDIT_TIME = #{cfg.auditTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.compileId != null" >
|
|
|
|
|
COMPILE_ID = #{cfg.compileId,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.requestId != null" >
|
|
|
|
|
request_id = #{cfg.requestId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.isAreaEffective != null" >
|
|
|
|
|
is_area_effective = #{cfg.isAreaEffective,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.classify != null and cfg.classify != ''" >
|
|
|
|
|
classify = #{cfg.classify,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.attribute != null and cfg.attribute != ''" >
|
|
|
|
|
attribute = #{cfg.attribute,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.lable != null and cfg.lable != ''" >
|
|
|
|
|
lable = #{cfg.lable,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.areaEffectiveIds != null" >
|
|
|
|
|
area_effective_ids = #{cfg.areaEffectiveIds,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.functionId != null" >
|
|
|
|
|
function_id = #{cfg.functionId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.serviceId != null" >
|
|
|
|
|
service_id = #{cfg.serviceId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipIp != null and cfg.voipIp.ipType != null" >
|
|
|
|
|
ip_type = #{cfg.voipIp.ipType,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipIp != null and cfg.voipIp.srcIpAddress != null and cfg.voipIp.srcIpAddress != ''" >
|
|
|
|
|
src_ip_address = #{cfg.voipIp.srcIpAddress,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipIp != null and cfg.voipIp.ipPattern != null" >
|
|
|
|
|
ip_pattern = #{cfg.voipIp.ipPattern,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipIp != null and cfg.voipIp.portPattern != null" >
|
|
|
|
|
port_pattern = #{cfg.voipIp.portPattern,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipIp != null and cfg.voipIp.srcPort != null and cfg.voipIp.srcPort != ''" >
|
|
|
|
|
src_port = #{cfg.voipIp.srcPort,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipIp != null and cfg.voipIp.protocol != null" >
|
|
|
|
|
protocol = #{cfg.voipIp.protocol,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipIp != null and cfg.voipIp.protocolId != null" >
|
|
|
|
|
protocol_id = #{cfg.voipIp.protocolId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipIp != null and cfg.voipIp.direction != null" >
|
|
|
|
|
direction = #{cfg.voipIp.direction,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipIp != null and cfg.voipIp.destPort != null and cfg.voipIp.destPort != ''" >
|
|
|
|
|
dest_port = #{cfg.voipIp.destPort,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipIp != null and cfg.voipIp.destIpAddress != null and cfg.voipIp.destIpAddress != ''" >
|
|
|
|
|
dest_ip_address = #{cfg.voipIp.destIpAddress,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipIp != null and cfg.voipIp.cfgType != null and cfg.voipIp.cfgType != ''" >
|
|
|
|
|
cfg_type = #{cfg.voipIp.cfgType,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipIp != null and cfg.voipIp.cfgRegionCode != null " >
|
|
|
|
|
cfg_region_code = #{cfg.voipIp.cfgRegionCode,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</set>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="cfg.voipIp != null and cfg.voipIp.cfgId != null" >
|
|
|
|
|
and cfg_id = #{cfg.voipIp.cfgId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.compileId != null" >
|
|
|
|
|
and compile_id = #{cfg.compileId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.functionId != null" >
|
|
|
|
|
and function_id = #{cfg.functionId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</update>
|
|
|
|
|
<!-- update av_voip_account_cfg表信息 -->
|
|
|
|
|
<update id="updateAvVoipAccount" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
|
|
|
update av_voip_account_cfg
|
|
|
|
|
<set >
|
|
|
|
|
<trim suffixOverrides=",">
|
|
|
|
|
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''" >
|
|
|
|
|
cfg_desc = #{cfg.cfgDesc,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.action != null" >
|
|
|
|
|
action = #{cfg.action,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.isValid != null" >
|
|
|
|
|
is_valid = #{cfg.isValid,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.isAudit != null" >
|
|
|
|
|
is_audit = #{cfg.isAudit,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.editorId != null" >
|
|
|
|
|
editor_id = #{cfg.editorId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.editTime != null and cfg.editTime != ''" >
|
|
|
|
|
edit_time = #{cfg.editTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.auditorId != null" >
|
|
|
|
|
AUDITOR_ID = #{cfg.auditorId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.auditTime != null and cfg.auditTime != ''" >
|
|
|
|
|
AUDIT_TIME = #{cfg.auditTime,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.compileId != null" >
|
|
|
|
|
COMPILE_ID = #{cfg.compileId,jdbcType=TIMESTAMP},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.requestId != null" >
|
|
|
|
|
request_id = #{cfg.requestId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.isAreaEffective != null" >
|
|
|
|
|
is_area_effective = #{cfg.isAreaEffective,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.classify != null and cfg.classify != ''" >
|
|
|
|
|
classify = #{cfg.classify,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.attribute != null and cfg.attribute != ''" >
|
|
|
|
|
attribute = #{cfg.attribute,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.lable != null and cfg.lable != ''" >
|
|
|
|
|
lable = #{cfg.lable,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.areaEffectiveIds != null" >
|
|
|
|
|
area_effective_ids = #{cfg.areaEffectiveIds,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.functionId != null" >
|
|
|
|
|
function_id = #{cfg.functionId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.serviceId != null" >
|
|
|
|
|
service_id = #{cfg.serviceId,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipAccount != null and cfg.voipAccount.district != null and cfg.voipAccount.district != ''" >
|
|
|
|
|
district = #{cfg.voipAccount.district,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipAccount != null and cfg.voipAccount.cfgKeywords != null and cfg.voipAccount.cfgKeywords != ''" >
|
|
|
|
|
cfg_keywords = #{cfg.voipAccount.cfgKeywords,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipAccount != null and cfg.voipAccount.cfgType != null and cfg.voipAccount.cfgType != ''" >
|
|
|
|
|
cfg_type = #{cfg.voipAccount.cfgType,jdbcType=VARCHAR},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipAccount != null and cfg.voipAccount.cfgRegionCode != null " >
|
|
|
|
|
cfg_region_code = #{cfg.voipAccount.cfgRegionCode,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipAccount != null and cfg.voipAccount.exprType != null " >
|
|
|
|
|
expr_type = #{cfg.voipAccount.exprType,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipAccount != null and cfg.voipAccount.matchMethod != null " >
|
|
|
|
|
match_method = #{cfg.voipAccount.matchMethod,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.voipAccount != null and cfg.voipAccount.isHexbin != null " >
|
|
|
|
|
is_hexbin = #{cfg.voipAccount.isHexbin,jdbcType=INTEGER},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</set>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="cfg.voipAccount != null and cfg.voipAccount.cfgId != null" >
|
|
|
|
|
and cfg_id = #{cfg.voipAccount.cfgId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.compileId != null" >
|
|
|
|
|
and compile_id = #{cfg.compileId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="cfg.functionId != null" >
|
|
|
|
|
and function_id = #{cfg.functionId,jdbcType=INTEGER}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-05-22 17:30:52 +08:00
|
|
|
</mapper>
|