voip 区域信息增加,voipAccount修改为字符串类型配置

区域信息单选切换移至common.js
This commit is contained in:
duandongmei
2018-05-29 18:31:43 +08:00
parent 3ff6acb8c8
commit 787510e168
18 changed files with 1586 additions and 308 deletions

View File

@@ -53,7 +53,26 @@
AND IS_VALID!=-1
</trim>
</select>
<!-- 根据compileId获取avVoipAccountCfg信息 -->
<select id="findAreaIpCfgList" resultMap="BaseIpMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
select
<include refid="AreaIpCfg_Column_List_with_id" />
from area_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>
<!-- insert area_ip_cfg表信息 -->
<insert id="saveAreaIpCfg" parameterType="com.nis.domain.configuration.AreaIpCfg" >
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
@@ -125,8 +144,201 @@
#{cfgRegionCode,jdbcType=INTEGER}
)
</insert>
<!-- insert area_ip_cfg表信息 -->
<insert id="saveAreaIpCfgFromCfgIndexInfo" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
SELECT LAST_INSERT_ID()
</selectKey>
insert into area_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},
#{areaIpCfg.ipType,jdbcType=INTEGER},
#{areaIpCfg.srcIpAddress,jdbcType=VARCHAR},
#{areaIpCfg.ipPattern,jdbcType=INTEGER},
#{areaIpCfg.portPattern,jdbcType=INTEGER},
#{areaIpCfg.srcPort,jdbcType=VARCHAR},
#{areaIpCfg.protocol,jdbcType=INTEGER},
#{areaIpCfg.protocolId,jdbcType=INTEGER},
#{areaIpCfg.direction,jdbcType=INTEGER},
#{areaIpCfg.destPort,jdbcType=VARCHAR},
#{areaIpCfg.destIpAddress,jdbcType=VARCHAR},
#{areaIpCfg.cfgType,jdbcType=VARCHAR},
#{areaIpCfg.cfgRegionCode,jdbcType=INTEGER}
)
</insert>
<!-- update av_voip_ip_cfg表信息 -->
<update id="updateAreaIpCfgFromCfgIndexInfo" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
update area_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="areaIpCfg != null and areaIpCfg.ipType != null" >
ip_type = #{areaIpCfg.ipType,jdbcType=INTEGER},
</if>
<if test="areaIpCfg != null and areaIpCfg.srcIpAddress != null and areaIpCfg.srcIpAddress != ''" >
src_ip_address = #{areaIpCfg.srcIpAddress,jdbcType=VARCHAR},
</if>
<if test="areaIpCfg != null and areaIpCfg.ipPattern != null" >
ip_pattern = #{areaIpCfg.ipPattern,jdbcType=INTEGER},
</if>
<if test="areaIpCfg != null and areaIpCfg.portPattern != null" >
port_pattern = #{areaIpCfg.portPattern,jdbcType=INTEGER},
</if>
<if test="areaIpCfg != null and areaIpCfg.srcPort != null and areaIpCfg.srcPort != ''" >
src_port = #{areaIpCfg.srcPort,jdbcType=VARCHAR},
</if>
<if test="areaIpCfg != null and areaIpCfg.protocol != null" >
protocol = #{areaIpCfg.protocol,jdbcType=INTEGER},
</if>
<if test="areaIpCfg != null and areaIpCfg.protocolId != null" >
protocol_id = #{areaIpCfg.protocolId,jdbcType=INTEGER},
</if>
<if test="areaIpCfg != null and areaIpCfg.direction != null" >
direction = #{areaIpCfg.direction,jdbcType=INTEGER},
</if>
<if test="areaIpCfg != null and areaIpCfg.destPort != null and areaIpCfg.destPort != ''" >
dest_port = #{areaIpCfg.destPort,jdbcType=VARCHAR},
</if>
<if test="areaIpCfg != null and areaIpCfg.destIpAddress != null and areaIpCfg.destIpAddress != ''" >
dest_ip_address = #{areaIpCfg.destIpAddress,jdbcType=VARCHAR},
</if>
<if test="areaIpCfg != null and areaIpCfg.cfgType != null and areaIpCfg.cfgType != ''" >
cfg_type = #{areaIpCfg.cfgType,jdbcType=VARCHAR},
</if>
<if test="areaIpCfg != null and areaIpCfg.cfgRegionCode != null " >
cfg_region_code = #{areaIpCfg.cfgRegionCode,jdbcType=INTEGER},
</if>
</trim>
</set>
<where>
<if test="areaIpCfg != null and areaIpCfg.cfgId != null" >
and cfg_id = #{areaIpCfg.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>
<!-- 删除区域IP配置 -->
<delete id="deleteAreaIpCfg" >
delete from area_ip_cfg where compile_id=#{compileId} and function_id=#{functionId}
</delete>
<!-- 删除区域IP配置 -->
<!-- 删除voipIp信息 -->
<delete id="deleteAreaIpCfgByCfgId" parameterType="com.nis.domain.configuration.AreaIpCfg" >
delete from area_ip_cfg
<where>
<if test="areaIpCfg != null and areaIpCfg.cfgId != null" >
and cfg_id = #{areaIpCfg.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>
</mapper>