1443 lines
56 KiB
XML
1443 lines
56 KiB
XML
<?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="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>
|
|
|
|
<resultMap id="AvContIpCfgMap" type="com.nis.domain.configuration.AvContIpCfg" >
|
|
<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="BaseStringCfgMap" type="com.nis.domain.configuration.BaseStringCfg" >
|
|
<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="AvVoip_Column" >
|
|
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
|
|
</sql>
|
|
<sql id="AvVoipIp_Column" >
|
|
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
|
|
</sql>
|
|
<sql id="AvVoipAccount_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="AvContIp_Column" >
|
|
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
|
|
</sql>
|
|
<sql id="BaseStringCfg_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>
|
|
<!-- voip条件查询列表信息 -->
|
|
<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>
|
|
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
|
|
|
|
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
|
<if test="page !=null and page.where != null and page.where != ''">
|
|
AND ${page.where}
|
|
</if>
|
|
<if test="cfgId != null">
|
|
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
|
</if>
|
|
<if test="cfgDesc != null and cfgDesc != ''">
|
|
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="action != null">
|
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isValid != null">
|
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isValid == null">
|
|
AND r.IS_VALID != -1
|
|
</if>
|
|
<if test="isAudit != null">
|
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="creatorName != null and creatorName != ''">
|
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<!-- <if test="search_create_time_start != null and search_create_time_start != ''">
|
|
<![CDATA[AND r.CREATE_TIME >= #{search_create_time_start,jdbcType=TIMESTAMP}]]>
|
|
</if>
|
|
<if test="search_create_time_end != null and search_create_time_end != ''">
|
|
<![CDATA[AND r.CREATE_TIME <= #{search_create_time_end,jdbcType=TIMESTAMP}]]>
|
|
</if> -->
|
|
<if test="editorName != null and editorName != ''">
|
|
AND r.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<!-- <if test="search_edit_time_start != null and search_edit_time_start != ''">
|
|
<![CDATA[AND r.EDIT_TIME >= #{search_edit_time_start,jdbcType=TIMESTAMP}]]>
|
|
</if>
|
|
<if test="search_edit_time_end != null and search_edit_time_end != ''">
|
|
<![CDATA[AND r.EDIT_TIME <= #{search_edit_time_end,jdbcType=TIMESTAMP}]]>
|
|
</if> -->
|
|
<if test="auditorName != null and auditorName != ''">
|
|
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<!-- <if test="search_audit_time_start != null and search_audit_time_start != ''">
|
|
<![CDATA[AND r.AUDIT_TIME >= #{search_audit_time_start,jdbcType=TIMESTAMP}]]>
|
|
</if>
|
|
<if test="search_audit_time_end != null and search_audit_time_end != ''">
|
|
<![CDATA[AND r.AUDIT_TIME <= #{search_audit_time_end,jdbcType=TIMESTAMP}]]>
|
|
</if> -->
|
|
<if test="serviceId != null">
|
|
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="requestId != null">
|
|
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="compileId != null">
|
|
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isAreaEffective != null">
|
|
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="classify != null and classify != ''">
|
|
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="attribute != null and attribute != ''">
|
|
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="lable != null and lable != ''">
|
|
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
|
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="functionId != null">
|
|
AND r.function_id=#{functionId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="(voipIp.srcIpAddress != null and voipIp.srcIpAddress != '') or (voipIp.srcPort != null and voipIp.srcPort != '')">
|
|
AND r.compile_id in (select t.compile_id from av_voip_ip_cfg t
|
|
<where>
|
|
<if test="voipIp.srcIpAddress != null and voipIp.srcIpAddress != ''">
|
|
and t.src_ip_address =#{voipIp.srcIpAddress,jdbcType=VARCHAR}
|
|
</if>
|
|
<if test="voipIp.srcPort != null and voipIp.srcPort != ''">
|
|
and t.src_port =#{voipIp.srcPort,jdbcType=VARCHAR}
|
|
</if>
|
|
</where>
|
|
)
|
|
</if>
|
|
<if test="(voipAccount.cfgKeywords != null and voipAccount.cfgKeywords != '') ">
|
|
AND r.compile_id in (select f.compile_id from av_voip_account_cfg f
|
|
<where>
|
|
<if test="voipAccount.cfgKeywords != null and voipAccount.cfgKeywords != ''">
|
|
and f.cfg_keywords like concat(concat('%',#{voipAccount.cfgKeywords,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="compileId != null">
|
|
and f.compile_id =#{compileId,jdbcType=INTEGER}
|
|
</if>
|
|
</where>
|
|
)
|
|
</if>
|
|
|
|
<!-- 数据范围过滤 -->
|
|
${sqlMap.dsf}
|
|
</trim>
|
|
<choose>
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
ORDER BY ${page.orderBy}
|
|
</when>
|
|
<otherwise>
|
|
ORDER BY r.CFG_ID desc
|
|
</otherwise>
|
|
</choose>
|
|
</select>
|
|
<!-- 根据compileId获取avVoipIpCfg信息 -->
|
|
<select id="findVoipIpCfgList" resultMap="AvVoipIpCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
|
select
|
|
<include refid="AvVoipIp_Column" />
|
|
from av_voip_ip_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>
|
|
<!-- 根据compileId获取avVoipAccountCfg信息 -->
|
|
<select id="findVoipAccountCfgList" resultMap="AvVoipAccountCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
|
select
|
|
<include refid="AvVoipAccount_Column" />
|
|
from av_voip_account_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>
|
|
<!-- 根据Id获取cfgIndexInfo信息 -->
|
|
<select id="getCfgIndexInfo" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
|
|
SELECT
|
|
*
|
|
FROM cfg_index_info a
|
|
<where>
|
|
<if test="cfgId != null">
|
|
and a.CFG_ID=#{cfgId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="compileId != null">
|
|
and a.compile_Id=#{compileId,jdbcType=INTEGER}
|
|
</if>
|
|
<choose>
|
|
<when test="isValid != null">
|
|
and a.is_valid=#{isValid,jdbcType=INTEGER}
|
|
</when>
|
|
<otherwise>
|
|
and a.is_valid != -1
|
|
</otherwise>
|
|
</choose>
|
|
|
|
|
|
</where>
|
|
</select>
|
|
<!-- insert cfgIndexInfox -->
|
|
<insert id="insertCfgIndexInfo" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
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 (
|
|
#{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}
|
|
)
|
|
</insert>
|
|
<!-- insert AV_VOIP_IP_CFG表信息 -->
|
|
<insert id="insertAvVoipIp" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
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 (
|
|
#{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},
|
|
#{voipIp.ipType,jdbcType=INTEGER},
|
|
#{voipIp.srcIpAddress,jdbcType=VARCHAR},
|
|
#{voipIp.ipPattern,jdbcType=INTEGER},
|
|
#{voipIp.portPattern,jdbcType=INTEGER},
|
|
#{voipIp.srcPort,jdbcType=VARCHAR},
|
|
#{voipIp.protocol,jdbcType=INTEGER},
|
|
#{voipIp.protocolId,jdbcType=INTEGER},
|
|
#{voipIp.direction,jdbcType=INTEGER},
|
|
#{voipIp.destPort,jdbcType=VARCHAR},
|
|
#{voipIp.destIpAddress,jdbcType=VARCHAR},
|
|
#{voipIp.cfgType,jdbcType=VARCHAR},
|
|
#{voipIp.cfgRegionCode,jdbcType=INTEGER}
|
|
)
|
|
</insert>
|
|
<!-- insert AV_VOIP_ACCOUNT_CFG表信息 -->
|
|
<insert id="insertAvVoipAccount" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
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,
|
|
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},
|
|
#{voipAccount.cfgKeywords,jdbcType=VARCHAR},
|
|
#{voipAccount.cfgType,jdbcType=VARCHAR},
|
|
#{voipAccount.cfgRegionCode,jdbcType=INTEGER},
|
|
#{voipAccount.exprType,jdbcType=INTEGER},
|
|
#{voipAccount.matchMethod,jdbcType=INTEGER},
|
|
#{voipAccount.isHexbin,jdbcType=INTEGER}
|
|
)
|
|
</insert>
|
|
<!-- update cfg_index_info表信息 -->
|
|
<update id="updateCfgIndexInfo" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
update cfg_index_info
|
|
<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>
|
|
</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>
|
|
<!-- update av_voip_ip_cfg表信息 -->
|
|
<update id="updateAvVoipIp" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
update av_voip_ip_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="voipIp != null and voipIp.ipType != null" >
|
|
ip_type = #{voipIp.ipType,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="voipIp != null and voipIp.srcIpAddress != null and voipIp.srcIpAddress != ''" >
|
|
src_ip_address = #{voipIp.srcIpAddress,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="voipIp != null and voipIp.ipPattern != null" >
|
|
ip_pattern = #{voipIp.ipPattern,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="voipIp != null and voipIp.portPattern != null" >
|
|
port_pattern = #{voipIp.portPattern,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="voipIp != null and voipIp.srcPort != null and voipIp.srcPort != ''" >
|
|
src_port = #{voipIp.srcPort,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="voipIp != null and voipIp.protocol != null" >
|
|
protocol = #{voipIp.protocol,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="voipIp != null and voipIp.protocolId != null" >
|
|
protocol_id = #{voipIp.protocolId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="voipIp != null and voipIp.direction != null" >
|
|
direction = #{voipIp.direction,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="voipIp != null and voipIp.destPort != null and voipIp.destPort != ''" >
|
|
dest_port = #{voipIp.destPort,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="voipIp != null and voipIp.destIpAddress != null and voipIp.destIpAddress != ''" >
|
|
dest_ip_address = #{voipIp.destIpAddress,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="voipIp != null and voipIp.cfgType != null and voipIp.cfgType != ''" >
|
|
cfg_type = #{voipIp.cfgType,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="voipIp != null and voipIp.cfgRegionCode != null " >
|
|
cfg_region_code = #{voipIp.cfgRegionCode,jdbcType=INTEGER},
|
|
</if>
|
|
</trim>
|
|
</set>
|
|
<where>
|
|
<if test="voipIp != null and voipIp.cfgId != null" >
|
|
and cfg_id = #{voipIp.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>
|
|
<!-- update av_voip_account_cfg表信息 -->
|
|
<update id="updateAvVoipAccount" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
update av_voip_account_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="voipAccount != null and voipAccount.cfgKeywords != null and voipAccount.cfgKeywords != ''" >
|
|
cfg_keywords = #{voipAccount.cfgKeywords,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="voipAccount != null and voipAccount.cfgType != null and voipAccount.cfgType != ''" >
|
|
cfg_type = #{voipAccount.cfgType,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="voipAccount != null and voipAccount.cfgRegionCode != null " >
|
|
cfg_region_code = #{voipAccount.cfgRegionCode,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="voipAccount != null and voipAccount.exprType != null " >
|
|
expr_type = #{voipAccount.exprType,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="voipAccount != null and voipAccount.matchMethod != null " >
|
|
match_method = #{voipAccount.matchMethod,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="voipAccount != null and voipAccount.isHexbin != null " >
|
|
is_hexbin = #{voipAccount.isHexbin,jdbcType=INTEGER},
|
|
</if>
|
|
</trim>
|
|
</set>
|
|
<where>
|
|
<if test="voipAccount != null and voipAccount.cfgId != null" >
|
|
and cfg_id = #{voipAccount.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>
|
|
<!-- 删除voipIp信息 -->
|
|
<delete id="deleteAvVoipIp" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
delete from av_voip_ip_cfg
|
|
<where>
|
|
<if test="voipIp != null and voipIp.cfgId != null" >
|
|
and cfg_id = #{voipAccount.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>
|
|
<!-- 删除voipIp信息 -->
|
|
<delete id="deleteAvVoipAccount" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
|
|
delete from av_voip_account_cfg
|
|
<where>
|
|
<if test="voipAccount != null and voipAccount.cfgId != null" >
|
|
and cfg_id = #{voipAccount.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>
|
|
<!--**********************************BaseIpCfg*******************************************************-->
|
|
<!-- avContIp条件查询列表信息 -->
|
|
<select id="findIpList" resultMap="AvContIpCfgMap" parameterType="com.nis.domain.configuration.BaseIpCfg" >
|
|
SELECT
|
|
<include refid="AvContIp_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>
|
|
FROM ${tableName} 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
|
|
|
|
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
|
<if test="page !=null and page.where != null and page.where != ''">
|
|
AND ${page.where}
|
|
</if>
|
|
<if test="cfgId != null">
|
|
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
|
</if>
|
|
<if test="cfgDesc != null and cfgDesc != ''">
|
|
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="action != null">
|
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isValid != null">
|
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isValid == null">
|
|
AND r.IS_VALID != -1
|
|
</if>
|
|
<if test="isAudit != null">
|
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="creatorName != null and creatorName != ''">
|
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<!-- <if test="search_create_time_start != null and search_create_time_start != ''">
|
|
<![CDATA[AND r.CREATE_TIME >= #{search_create_time_start,jdbcType=TIMESTAMP}]]>
|
|
</if>
|
|
<if test="search_create_time_end != null and search_create_time_end != ''">
|
|
<![CDATA[AND r.CREATE_TIME <= #{search_create_time_end,jdbcType=TIMESTAMP}]]>
|
|
</if> -->
|
|
<if test="editorName != null and editorName != ''">
|
|
AND r.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<!-- <if test="search_edit_time_start != null and search_edit_time_start != ''">
|
|
<![CDATA[AND r.EDIT_TIME >= #{search_edit_time_start,jdbcType=TIMESTAMP}]]>
|
|
</if>
|
|
<if test="search_edit_time_end != null and search_edit_time_end != ''">
|
|
<![CDATA[AND r.EDIT_TIME <= #{search_edit_time_end,jdbcType=TIMESTAMP}]]>
|
|
</if> -->
|
|
<if test="auditorName != null and auditorName != ''">
|
|
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<!-- <if test="search_audit_time_start != null and search_audit_time_start != ''">
|
|
<![CDATA[AND r.AUDIT_TIME >= #{search_audit_time_start,jdbcType=TIMESTAMP}]]>
|
|
</if>
|
|
<if test="search_audit_time_end != null and search_audit_time_end != ''">
|
|
<![CDATA[AND r.AUDIT_TIME <= #{search_audit_time_end,jdbcType=TIMESTAMP}]]>
|
|
</if> -->
|
|
<if test="serviceId != null">
|
|
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="requestId != null">
|
|
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="compileId != null">
|
|
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isAreaEffective != null">
|
|
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="classify != null and classify != ''">
|
|
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="attribute != null and attribute != ''">
|
|
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="lable != null and lable != ''">
|
|
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
|
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="functionId != null">
|
|
AND r.function_id=#{functionId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="srcIpAddress != null and srcIpAddress != ''">
|
|
and r.src_ip_address =#{srcIpAddress,jdbcType=VARCHAR}
|
|
</if>
|
|
<if test="srcPort != null and srcPort != ''">
|
|
and r.src_port =#{srcPort,jdbcType=VARCHAR}
|
|
</if>
|
|
<!-- 数据范围过滤 -->
|
|
${sqlMap.dsf}
|
|
</trim>
|
|
<choose>
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
ORDER BY ${page.orderBy}
|
|
</when>
|
|
<otherwise>
|
|
ORDER BY r.CFG_ID desc
|
|
</otherwise>
|
|
</choose>
|
|
</select>
|
|
<!-- 根据cfg_id获取avContIpCfg信息 -->
|
|
<select id="findIpCfgById" resultMap="AvContIpCfgMap" parameterType="com.nis.domain.configuration.BaseIpCfg">
|
|
select
|
|
<include refid="AvContIp_Column" />
|
|
from ${tableName} r
|
|
<where>
|
|
<if test="cfgId != null">
|
|
and r.cfg_id=#{cfgId,jdbcType=INTEGER}
|
|
</if>
|
|
<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 AV_cont_IP_CFG表信息 -->
|
|
<insert id="insertIp" parameterType="com.nis.domain.configuration.BaseIpCfg" >
|
|
insert into ${tableName} (
|
|
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 (
|
|
#{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},
|
|
#{ipType,jdbcType=INTEGER},
|
|
#{srcIpAddress,jdbcType=VARCHAR},
|
|
#{ipPattern,jdbcType=INTEGER},
|
|
#{portPattern,jdbcType=INTEGER},
|
|
#{srcPort,jdbcType=VARCHAR},
|
|
#{protocol,jdbcType=INTEGER},
|
|
#{protocolId,jdbcType=INTEGER},
|
|
#{direction,jdbcType=INTEGER},
|
|
#{destPort,jdbcType=VARCHAR},
|
|
#{destIpAddress,jdbcType=VARCHAR},
|
|
#{cfgType,jdbcType=VARCHAR},
|
|
#{cfgRegionCode,jdbcType=INTEGER}
|
|
)
|
|
</insert>
|
|
<!-- update av_cont_ip_cfg表信息 -->
|
|
<update id="updateIp" parameterType="com.nis.domain.configuration.BaseIpCfg" >
|
|
update ${tableName}
|
|
<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="ipType != null" >
|
|
ip_type = #{ipType,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="srcIpAddress != null and srcIpAddress != ''" >
|
|
src_ip_address = #{srcIpAddress,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="ipPattern != null" >
|
|
ip_pattern = #{ipPattern,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="portPattern != null" >
|
|
port_pattern = #{portPattern,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="srcPort != null and srcPort != ''" >
|
|
src_port = #{srcPort,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="protocol != null" >
|
|
protocol = #{protocol,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="protocolId != null" >
|
|
protocol_id = #{protocolId,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="direction != null" >
|
|
direction = #{direction,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="destPort != null and destPort != ''" >
|
|
dest_port = #{destPort,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="destIpAddress != null and destIpAddress != ''" >
|
|
dest_ip_address = #{destIpAddress,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>
|
|
</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>
|
|
<select id="getIpList" resultMap="AvVoipIpCfgMap" parameterType="com.nis.domain.configuration.BaseIpCfg">
|
|
select
|
|
<include refid="AvVoipIp_Column" />
|
|
from ${tableName} r
|
|
<where>
|
|
<if test="cfgId != null">
|
|
and r.cfg_id=#{cfgId,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>
|
|
|
|
<!--**********************************BaseStringCfg*******************************************************-->
|
|
<!-- avContIp条件查询列表信息 -->
|
|
<select id="findStringList" resultMap="BaseStringCfgMap" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
|
SELECT
|
|
<include refid="BaseStringCfg_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>
|
|
FROM ${tableName} 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
|
|
|
|
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
|
<if test="page !=null and page.where != null and page.where != ''">
|
|
AND ${page.where}
|
|
</if>
|
|
<if test="cfgId != null">
|
|
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
|
|
</if>
|
|
<if test="cfgDesc != null and cfgDesc != ''">
|
|
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="action != null">
|
|
AND r.ACTION=#{action,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isValid != null">
|
|
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isValid == null">
|
|
AND r.IS_VALID != -1
|
|
</if>
|
|
<if test="isAudit != null">
|
|
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="creatorName != null and creatorName != ''">
|
|
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="editorName != null and editorName != ''">
|
|
AND r.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="auditorName != null and auditorName != ''">
|
|
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="serviceId != null">
|
|
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="requestId != null">
|
|
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="compileId != null">
|
|
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="isAreaEffective != null">
|
|
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="classify != null and classify != ''">
|
|
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="attribute != null and attribute != ''">
|
|
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="lable != null and lable != ''">
|
|
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
|
|
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
<if test="functionId != null">
|
|
AND r.function_id=#{functionId,jdbcType=INTEGER}
|
|
</if>
|
|
<if test="cfgKeywords != null and cfgKeywords != ''">
|
|
and r.cfg_keywords like concat(concat('%',#{cfgKeywords,jdbcType=VARCHAR}),'%')
|
|
</if>
|
|
${sqlMap.dsf}
|
|
</trim>
|
|
<choose>
|
|
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
|
|
ORDER BY ${page.orderBy}
|
|
</when>
|
|
<otherwise>
|
|
ORDER BY r.CFG_ID desc
|
|
</otherwise>
|
|
</choose>
|
|
</select>
|
|
|
|
<!-- 根据cfg_id获取avContUrlCfg信息-->
|
|
<select id="findStringCfgById" resultMap="BaseStringCfgMap" parameterType="com.nis.domain.configuration.BaseStringCfg">
|
|
select
|
|
<include refid="BaseStringCfg_Column" />
|
|
from ${tableName} r
|
|
<where>
|
|
<if test="cfgId != null">
|
|
and r.cfg_id=#{cfgId,jdbcType=INTEGER}
|
|
</if>
|
|
<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 AV_cont_IP_CFG表信息-->
|
|
<insert id="insertString" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
|
insert into ${tableName} (
|
|
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,
|
|
expr_type,
|
|
match_method,
|
|
is_hexbin,
|
|
cfg_type,
|
|
cfg_region_code
|
|
)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},
|
|
#{exprType,jdbcType=INTEGER},
|
|
#{matchMethod,jdbcType=INTEGER},
|
|
#{isHexbin,jdbcType=INTEGER},
|
|
#{cfgType,jdbcType=VARCHAR},
|
|
#{cfgRegionCode,jdbcType=INTEGER}
|
|
)
|
|
</insert>
|
|
|
|
<!--update av_cont_ip_cfg表信息-->
|
|
<update id="updateString" parameterType="com.nis.domain.configuration.BaseStringCfg" >
|
|
update ${tableName}
|
|
<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="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>
|
|
<if test="cfgType != null and cfgType != ''" >
|
|
cfg_type = #{cfgType,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="cfgRegionCode != null " >
|
|
cfg_region_code = #{cfgRegionCode,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>
|
|
<select id="getStringList" resultMap="BaseStringCfgMap" parameterType="com.nis.domain.configuration.BaseStringCfg">
|
|
select
|
|
<include refid="BaseStringCfg_Column" />
|
|
from ${tableName} r
|
|
<where>
|
|
<if test="cfgId != null">
|
|
and r.cfg_id=#{cfgId,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>
|
|
</mapper> |