voip 拆分为VoIP IP跟VoIP Account

This commit is contained in:
zhanghongqing
2018-08-20 11:35:07 +08:00
parent a8aebd9e23
commit 26d4ed4a9c
10 changed files with 2092 additions and 704 deletions

View File

@@ -9,23 +9,32 @@ import com.nis.domain.configuration.AvVoipIpCfg;
import com.nis.domain.configuration.BaseIpCfg;
import com.nis.domain.configuration.BaseStringCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.configuration.NtcSubscribeIdCfg;
import com.nis.web.dao.MyBatisDao;
@MyBatisDao
public interface AvContentCfgDao {
public List<CfgIndexInfo> findVoipList(CfgIndexInfo entity) ;
public List<CfgIndexInfo> findAccountList(CfgIndexInfo entity) ;
public List<AvVoipIpCfg> findVoipIpCfgList(CfgIndexInfo entity);
public List<AvVoipAccountCfg> findVoipAccountCfgList(CfgIndexInfo entity);
public List<NtcSubscribeIdCfg> findSubscribeIdCfgList(CfgIndexInfo entity);
public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity);
public void insertCfgIndexInfo(CfgIndexInfo entity);
public void insertAvVoipIp(CfgIndexInfo entity);
public void insertAvVoipAccount(CfgIndexInfo entity);
public void insertAvVoipAccountCfg(CfgIndexInfo entity);
public void insertAvVoipKeywordCfg(CfgIndexInfo entity);
public void updateCfgIndexInfo(CfgIndexInfo entity);
public void updateAvVoipIp(CfgIndexInfo entity);
public void updateAvVoipAccount(CfgIndexInfo entity);
public void updateAvVoipKeywordCfgt(CfgIndexInfo entity);
public void deleteAvVoipIp(CfgIndexInfo entity);
public void deleteAvVoipAccount(CfgIndexInfo entity);
public void deleteAvVoipKeywordCfg(CfgIndexInfo entity);
public void deleteAvVoipAccountCfg(CfgIndexInfo entity);
public BaseIpCfg findIpCfgById(BaseIpCfg entity) ;
public void insertIp(BaseIpCfg entity);
@@ -38,4 +47,5 @@ public interface AvContentCfgDao {
public void updateString(BaseStringCfg entity);
public List<BaseStringCfg> findStringList(BaseStringCfg entity) ;
public List<BaseStringCfg> getStringList(BaseStringCfg entity) ;
}

View File

@@ -187,7 +187,7 @@
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条件查询列表信息 -->
<!-- voip IP条件查询列表信息 -->
<select id="findVoipList" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
SELECT
<include refid="AvVoip_Column" />
@@ -289,6 +289,121 @@
</where>
)
</if>
<if test="(ntcSubscribeIdCfg.cfgKeywords != null and ntcSubscribeIdCfg.cfgKeywords != '') ">
AND r.compile_id in (select f.compile_id from ntc_subscribe_id_cfg f
<where>
<if test="ntcSubscribeIdCfg.cfgKeywords != null and ntcSubscribeIdCfg.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{ntcSubscribeIdCfg.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>
<!-- voip Account条件查询列表信息 -->
<select id="findAccountList" 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="(voipAccount.cfgKeywords != null and voipAccount.cfgKeywords != '') ">
AND r.compile_id in (select f.compile_id from av_voip_account_cfg f
<where>
@@ -301,6 +416,18 @@
</where>
)
</if>
<if test="(ntcSubscribeIdCfg.cfgKeywords != null and ntcSubscribeIdCfg.cfgKeywords != '') ">
AND r.compile_id in (select f.compile_id from ntc_subscribe_id_cfg f
<where>
<if test="ntcSubscribeIdCfg.cfgKeywords != null and ntcSubscribeIdCfg.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{ntcSubscribeIdCfg.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
<if test="compileId != null">
and f.compile_id =#{compileId,jdbcType=INTEGER}
</if>
</where>
)
</if>
<!-- 数据范围过滤 -->
${sqlMap.dsf}
@@ -352,6 +479,26 @@
</choose>
</where>
</select>
<!-- 根据compileId获取avVoipAccountCfg信息 -->
<select id="findSubscribeIdCfgList" resultMap="BaseStringCfgMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
select
<include refid="BaseStringCfg_Column" />
from ntc_subscribe_id_cfg r
<where>
<if test="compileId != null">
and r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if>
<choose>
<when test="isValid != null">
and r.is_valid=#{isValid,jdbcType=INTEGER}
</when>
<otherwise>
and r.is_valid != -1
</otherwise>
</choose>
</where>
</select>
<!-- 根据Id获取cfgIndexInfo信息 -->
<select id="getCfgIndexInfo" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
@@ -490,7 +637,7 @@
)
</insert>
<!-- insert AV_VOIP_ACCOUNT_CFG表信息 -->
<insert id="insertAvVoipAccount" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
<insert id="insertAvVoipAccountCfg" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
insert into av_voip_account_cfg (
CFG_DESC,
ACTION,
@@ -545,6 +692,62 @@
#{voipAccount.isHexbin,jdbcType=INTEGER}
)
</insert>
<!-- insert AV_VOIP_ACCOUNT_CFG表信息 -->
<insert id="insertAvVoipKeywordCfg" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
insert into ntc_subscribe_id_cfg (
CFG_DESC,
ACTION,
IS_VALID,
IS_AUDIT,
CREATOR_ID,
CREATE_TIME,
EDITOR_ID,
EDIT_TIME,
AUDITOR_ID,
AUDIT_TIME,
SERVICE_ID,
REQUEST_ID,
COMPILE_ID,
IS_AREA_EFFECTIVE,
CLASSIFY,
ATTRIBUTE,
LABLE,
AREA_EFFECTIVE_IDS,
function_id,
cfg_keywords,
cfg_type,
cfg_region_code,
expr_type,
match_method,
is_hexbin
)values (
#{cfgDesc,jdbcType=VARCHAR},
#{action,jdbcType=INTEGER},
0,
0,
#{creatorId,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
#{editorId,jdbcType=INTEGER},
#{editTime,jdbcType=TIMESTAMP},
#{auditorId,jdbcType=INTEGER},
#{auditTime,jdbcType=TIMESTAMP},
#{serviceId,jdbcType=INTEGER},
#{requestId,jdbcType=INTEGER},
#{compileId,jdbcType=INTEGER},
#{isAreaEffective,jdbcType=INTEGER},
#{classify,jdbcType=VARCHAR},
#{attribute,jdbcType=VARCHAR},
#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{functionId,jdbcType=INTEGER},
#{ntcSubscribeIdCfg.cfgKeywords,jdbcType=VARCHAR},
#{ntcSubscribeIdCfg.cfgType,jdbcType=VARCHAR},
#{ntcSubscribeIdCfg.cfgRegionCode,jdbcType=INTEGER},
#{ntcSubscribeIdCfg.exprType,jdbcType=INTEGER},
#{ntcSubscribeIdCfg.matchMethod,jdbcType=INTEGER},
#{ntcSubscribeIdCfg.isHexbin,jdbcType=INTEGER}
)
</insert>
<!-- update cfg_index_info表信息 -->
<update id="updateCfgIndexInfo" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
update cfg_index_info
@@ -721,6 +924,94 @@
</if>
</where>
</update>
<!-- update ntc_subscribe_id_cfg表信息 -->
<update id="updateAvVoipKeywordCfgt" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
update ntc_subscribe_id_cfg
<set >
<trim suffixOverrides=",">
<if test="cfgDesc != null and cfgDesc != ''" >
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
</if>
<if test="action != null" >
action = #{action,jdbcType=INTEGER},
</if>
<if test="isValid != null" >
is_valid = #{isValid,jdbcType=INTEGER},
</if>
<if test="isAudit != null" >
is_audit = #{isAudit,jdbcType=INTEGER},
</if>
<if test="editorId != null" >
editor_id = #{editorId,jdbcType=INTEGER},
</if>
<if test="editTime != null and editTime != ''" >
edit_time = #{editTime,jdbcType=TIMESTAMP},
</if>
<if test="auditorId != null" >
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
</if>
<if test="auditTime != null and auditTime != ''" >
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="compileId != null" >
COMPILE_ID = #{compileId,jdbcType=TIMESTAMP},
</if>
<if test="requestId != null" >
request_id = #{requestId,jdbcType=INTEGER},
</if>
<if test="isAreaEffective != null" >
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
</if>
<if test="classify != null and classify != ''" >
classify = #{classify,jdbcType=VARCHAR},
</if>
<if test="attribute != null and attribute != ''" >
attribute = #{attribute,jdbcType=VARCHAR},
</if>
<if test="lable != null and lable != ''" >
lable = #{lable,jdbcType=VARCHAR},
</if>
<if test="areaEffectiveIds != null" >
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
</if>
<if test="functionId != null" >
function_id = #{functionId,jdbcType=INTEGER},
</if>
<if test="serviceId != null" >
service_id = #{serviceId,jdbcType=INTEGER},
</if>
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.cfgKeywords != null and ntcSubscribeIdCfg.cfgKeywords != ''" >
cfg_keywords = #{ntcSubscribeIdCfg.cfgKeywords,jdbcType=VARCHAR},
</if>
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.cfgType != null and ntcSubscribeIdCfg.cfgType != ''" >
cfg_type = #{ntcSubscribeIdCfg.cfgType,jdbcType=VARCHAR},
</if>
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.cfgRegionCode != null " >
cfg_region_code = #{ntcSubscribeIdCfg.cfgRegionCode,jdbcType=INTEGER},
</if>
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.exprType != null " >
expr_type = #{ntcSubscribeIdCfg.exprType,jdbcType=INTEGER},
</if>
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.matchMethod != null " >
match_method = #{ntcSubscribeIdCfg.matchMethod,jdbcType=INTEGER},
</if>
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.isHexbin != null " >
is_hexbin = #{ntcSubscribeIdCfg.isHexbin,jdbcType=INTEGER},
</if>
</trim>
</set>
<where>
<if test="voipAccount != null and voipAccount.cfgId != null" >
and cfg_id = #{ntcSubscribeIdCfg.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
@@ -824,8 +1115,23 @@
</if>
</where>
</delete>
<!-- 删除voip subscribe信息 -->
<delete id="deleteAvVoipKeywordCfg" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
delete from ntc_subscribe_id_cfg
<where>
<if test="ntcSubscribeIdCfg != null and ntcSubscribeIdCfg.cfgId != null" >
and cfg_id = #{ntcSubscribeIdCfg.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 id="deleteAvVoipAccountCfg" parameterType="com.nis.domain.configuration.CfgIndexInfo" >
delete from av_voip_account_cfg
<where>
<if test="voipAccount != null and voipAccount.cfgId != null" >