voip删除、审核、列表分页功能完成

This commit is contained in:
duandongmei
2018-05-25 09:01:23 +08:00
parent 262087ecf0
commit 2b17b9e3fe
5 changed files with 437 additions and 384 deletions

View File

@@ -8,7 +8,6 @@
*/
package com.nis.domain.configuration;
import java.util.Date;
import java.util.List;

View File

@@ -71,7 +71,7 @@ public class AvContentController extends BaseController {
//视频文本VOIP配置列表
@RequestMapping(value = {"/voipList"})
public String voipCfgList(@ModelAttribute("cfg")CfgIndexInfo entity,Model model,HttpServletRequest request,HttpServletResponse response){
public String voipCfgList(Model model,HttpServletRequest request,HttpServletResponse response,@ModelAttribute("cfg")CfgIndexInfo entity){
if(entity.getVoipIp()== null){
entity.setVoipIp(new AvVoipIpCfg());
}
@@ -94,7 +94,7 @@ public class AvContentController extends BaseController {
//修改VOIP配置审核状态
@RequestMapping(value = {"/auditAvVoip"})
public String auditVoip(Integer isAudit,Integer isValid,String ids,Integer functionId){
//avContentCfgService.auditAvVoip(isAudit,isValid,ids);
avContentCfgService.auditAvVoip(isAudit,isValid,ids,functionId);
return "redirect:" + adminPath +"/ntc/av/voipList?functionId="+functionId;
}

View File

@@ -16,15 +16,17 @@ import com.nis.web.dao.MyBatisDao;
@MyBatisDao
public interface AvContentCfgDao extends CrudDao<BaseIpCfg>{
public List<CfgIndexInfo> findVoipList(@Param("cfg")CfgIndexInfo entity) ;
public List<AvVoipIpCfg> findVoipIpCfgList(@Param("cfg")CfgIndexInfo entity);
public List<AvVoipAccountCfg> findVoipAccountCfgList(@Param("cfg")CfgIndexInfo entity);
public CfgIndexInfo getCfgIndexInfo(@Param("cfg")CfgIndexInfo entity);
public void insertCfgIndexInfo(@Param("cfg")CfgIndexInfo entity);
public void insertAvVoipIp(@Param("cfg")CfgIndexInfo entity);
public void insertAvVoipAccount(@Param("cfg")CfgIndexInfo entity);
public void updateCfgIndexInfo(@Param("cfg")CfgIndexInfo entity);
public void updateAvVoipIp(@Param("cfg")CfgIndexInfo entity);
public void updateAvVoipAccount(@Param("cfg")CfgIndexInfo entity);
public interface AvContentCfgDao {
public List<CfgIndexInfo> findVoipList(CfgIndexInfo entity) ;
public List<AvVoipIpCfg> findVoipIpCfgList(CfgIndexInfo entity);
public List<AvVoipAccountCfg> findVoipAccountCfgList(CfgIndexInfo entity);
public CfgIndexInfo getCfgIndexInfo(CfgIndexInfo entity);
public void insertCfgIndexInfo(CfgIndexInfo entity);
public void insertAvVoipIp(CfgIndexInfo entity);
public void insertAvVoipAccount(CfgIndexInfo entity);
public void updateCfgIndexInfo(CfgIndexInfo entity);
public void updateAvVoipIp(CfgIndexInfo entity);
public void updateAvVoipAccount(CfgIndexInfo entity);
public void deleteAvVoipIp(CfgIndexInfo entity);
public void deleteAvVoipAccount(CfgIndexInfo entity);
}

View File

@@ -124,115 +124,115 @@
left join request_info ri on r.request_id=ri.id
<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 test="page !=null and page.where != null and page.where != ''">
AND ${page.where}
</if>
<if test="cfg.cfgId != null">
<if test="cfgId != null">
AND r.CFG_ID=#{cfgId,jdbcType=BIGINT}
</if>
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''">
AND r.CFG_DESC like concat(concat('%',#{cfg.cfgDesc,jdbcType=VARCHAR}),'%')
<if test="cfgDesc != null and cfgDesc != ''">
AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.action != null">
AND r.ACTION=#{cfg.action,jdbcType=INTEGER}
<if test="action != null">
AND r.ACTION=#{action,jdbcType=INTEGER}
</if>
<if test="cfg.isValid != null">
AND r.IS_VALID=#{cfg.isValid,jdbcType=INTEGER}
<if test="isValid != null">
AND r.IS_VALID=#{isValid,jdbcType=INTEGER}
</if>
<if test="cfg.isValid == null">
<if test="isValid == null">
AND r.IS_VALID != -1
</if>
<if test="cfg.isAudit != null">
AND r.IS_AUDIT=#{cfg.isAudit,jdbcType=INTEGER}
<if test="isAudit != null">
AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER}
</if>
<if test="cfg.creatorName != null and cfg.creatorName != ''">
AND CREATOR_NAME like concat(concat('%',#{cfg.creatorName,jdbcType=VARCHAR}),'%')
<if test="creatorName != null and creatorName != ''">
AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%')
</if>
<!-- <if test="cfg.search_create_time_start != null and cfg.search_create_time_start != ''">
<![CDATA[AND r.CREATE_TIME >= #{cfg.search_create_time_start,jdbcType=TIMESTAMP}]]>
<!-- <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="cfg.search_create_time_end != null and cfg.search_create_time_end != ''">
<![CDATA[AND r.CREATE_TIME <= #{cfg.search_create_time_end,jdbcType=TIMESTAMP}]]>
<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="cfg.editorName != null and cfg.editorName != ''">
AND r.EDITOR_NAME like concat(concat('%',#{cfg.editorName,jdbcType=VARCHAR}),'%')
<if test="editorName != null and editorName != ''">
AND r.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
</if>
<!-- <if test="cfg.search_edit_time_start != null and cfg.search_edit_time_start != ''">
<![CDATA[AND r.EDIT_TIME >= #{cfg.search_edit_time_start,jdbcType=TIMESTAMP}]]>
<!-- <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="cfg.search_edit_time_end != null and cfg.search_edit_time_end != ''">
<![CDATA[AND r.EDIT_TIME <= #{cfg.search_edit_time_end,jdbcType=TIMESTAMP}]]>
<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="cfg.auditorName != null and cfg.auditorName != ''">
AND AUDITOR_NAME like concat(concat('%',#{cfg.auditorName,jdbcType=VARCHAR}),'%')
<if test="auditorName != null and auditorName != ''">
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
</if>
<!-- <if test="cfg.search_audit_time_start != null and cfg.search_audit_time_start != ''">
<![CDATA[AND r.AUDIT_TIME >= #{cfg.search_audit_time_start,jdbcType=TIMESTAMP}]]>
<!-- <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="cfg.search_audit_time_end != null and cfg.search_audit_time_end != ''">
<![CDATA[AND r.AUDIT_TIME <= #{cfg.search_audit_time_end,jdbcType=TIMESTAMP}]]>
<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="cfg.serviceId != null">
AND r.SERVICE_ID=#{cfg.serviceId,jdbcType=INTEGER}
<if test="serviceId != null">
AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER}
</if>
<if test="cfg.requestId != null">
AND r.REQUEST_ID=#{cfg.requestId,jdbcType=INTEGER}
<if test="requestId != null">
AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER}
</if>
<if test="cfg.compileId != null">
AND r.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
<if test="compileId != null">
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if>
<if test="cfg.isAreaEffective != null">
AND r.IS_AREA_EFFECTIVE=#{cfg.isAreaEffective,jdbcType=INTEGER}
<if test="isAreaEffective != null">
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
</if>
<if test="cfg.classify != null and cfg.classify != ''">
AND r.classify like concat(concat('%',#{cfg.classify,jdbcType=VARCHAR}),'%')
<if test="classify != null and classify != ''">
AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.attribute != null and cfg.attribute != ''">
AND r.attribute like concat(concat('%',#{cfg.attribute,jdbcType=VARCHAR}),'%')
<if test="attribute != null and attribute != ''">
AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.lable != null and cfg.lable != ''">
AND r.lable like concat(concat('%',#{cfg.lable,jdbcType=VARCHAR}),'%')
<if test="lable != null and lable != ''">
AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.areaEffectiveIds != null and cfg.areaEffectiveIds != ''">
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{cfg.areaEffectiveIds,jdbcType=VARCHAR}),'%')
<if test="areaEffectiveIds != null and areaEffectiveIds != ''">
AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.functionId != null">
AND r.function_id=#{cfg.functionId,jdbcType=INTEGER}
<if test="functionId != null">
AND r.function_id=#{functionId,jdbcType=INTEGER}
</if>
<if test="(cfg.voipIp.srcIpAddress != null and cfg.voipIp.srcIpAddress != '') or (cfg.voipIp.srcPort != null and cfg.voipIp.srcPort != '')">
<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="cfg.voipIp.srcIpAddress != null and cfg.voipIp.srcIpAddress != ''">
and t.src_ip_address =#{cfg.voipIp.srcIpAddress,jdbcType=VARCHAR}
<if test="voipIp.srcIpAddress != null and voipIp.srcIpAddress != ''">
and t.src_ip_address =#{voipIp.srcIpAddress,jdbcType=VARCHAR}
</if>
<if test="cfg.voipIp.srcPort != null and cfg.voipIp.srcPort != ''">
and t.src_port =#{cfg.voipIp.srcPort,jdbcType=VARCHAR}
<if test="voipIp.srcPort != null and voipIp.srcPort != ''">
and t.src_port =#{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 != '') ">
<if test="(voipAccount.cfgKeywords != null and voipAccount.cfgKeywords != '') or (voipAccount.district != null and voipAccount.district != '') ">
AND r.compile_id in (select f.compile_id from av_voip_account_cfg f
<where>
<if test="cfg.voipAccount.cfgKeywords != null and cfg.voipAccount.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{cfg.voipAccount.cfgKeywords,jdbcType=VARCHAR}),'%')
<if test="voipAccount.cfgKeywords != null and voipAccount.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{voipAccount.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.voipAccount.district != null and cfg.voipAccount.district != ''">
and f.district =#{cfg.voipAccount.district,jdbcType=VARCHAR}
<if test="voipAccount.district != null and voipAccount.district != ''">
and f.district =#{voipAccount.district,jdbcType=VARCHAR}
</if>
<if test="cfg.compileId != null">
and f.compile_id =#{cfg.compileId,jdbcType=INTEGER}
<if test="compileId != null">
and f.compile_id =#{compileId,jdbcType=INTEGER}
</if>
</where>
)
</if>
<!-- 数据范围过滤 -->
${cfg.sqlMap.dsf}
${sqlMap.dsf}
</trim>
<choose>
<when test="cfg.page !=null and cfg.page.orderBy != null and cfg.page.orderBy != ''">
ORDER BY ${cfg.page.orderBy}
<when test="page !=null and page.orderBy != null and page.orderBy != ''">
ORDER BY ${page.orderBy}
</when>
<otherwise>
ORDER BY r.CFG_ID desc
@@ -245,10 +245,17 @@
<include refid="AvVoipIp_Column" />
from av_voip_ip_cfg r
<where>
<if test="cfg.compileId != null">
and r.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
<if test="compileId != null">
and r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if>
and r.is_valid !=-1
<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信息 -->
@@ -257,10 +264,17 @@
<include refid="AvVoipAccount_Column" />
from av_voip_account_cfg r
<where>
<if test="cfg.compileId != null">
and r.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
<if test="compileId != null">
and r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
</if>
and r.is_valid != -1
<choose>
<when test="isValid != null">
and r.is_valid=#{isValid,jdbcType=INTEGER}
</when>
<otherwise>
and r.is_valid != -1
</otherwise>
</choose>
</where>
</select>
@@ -270,13 +284,22 @@
*
FROM cfg_index_info a
<where>
<if test="cfg.cfgId != null">
and a.CFG_ID=#{cfg.cfgId,jdbcType=INTEGER}
<if test="cfgId != null">
and a.CFG_ID=#{cfgId,jdbcType=INTEGER}
</if>
<if test="cfg.compileId != null">
and a.compile_Id=#{cfg.compileId,jdbcType=INTEGER}
<if test="compileId != null">
and a.compile_Id=#{compileId,jdbcType=INTEGER}
</if>
and a.is_valid != -1
<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 -->
@@ -305,25 +328,25 @@
AREA_EFFECTIVE_IDS,
function_id
)values (
#{cfg.cfgDesc,jdbcType=VARCHAR},
#{cfg.action,jdbcType=INTEGER},
#{cfgDesc,jdbcType=VARCHAR},
#{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}
#{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表信息 -->
@@ -364,37 +387,37 @@
cfg_type,
cfg_region_code
)values (
#{cfg.cfgDesc,jdbcType=VARCHAR},
#{cfg.action,jdbcType=INTEGER},
#{cfgDesc,jdbcType=VARCHAR},
#{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}
#{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表信息 -->
@@ -430,32 +453,32 @@
match_method,
is_hexbin
)values (
#{cfg.cfgDesc,jdbcType=VARCHAR},
#{cfg.action,jdbcType=INTEGER},
#{cfgDesc,jdbcType=VARCHAR},
#{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}
#{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.district,jdbcType=VARCHAR},
#{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表信息 -->
@@ -463,68 +486,68 @@
update cfg_index_info
<set >
<trim suffixOverrides=",">
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''" >
cfg_desc = #{cfg.cfgDesc,jdbcType=VARCHAR},
<if test="cfgDesc != null and cfgDesc != ''" >
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
</if>
<if test="cfg.action != null" >
action = #{cfg.action,jdbcType=INTEGER},
<if test="action != null" >
action = #{action,jdbcType=INTEGER},
</if>
<if test="cfg.isValid != null" >
is_valid = #{cfg.isValid,jdbcType=INTEGER},
<if test="isValid != null" >
is_valid = #{isValid,jdbcType=INTEGER},
</if>
<if test="cfg.isAudit != null" >
is_audit = #{cfg.isAudit,jdbcType=INTEGER},
<if test="isAudit != null" >
is_audit = #{isAudit,jdbcType=INTEGER},
</if>
<if test="cfg.editorId != null" >
editor_id = #{cfg.editorId,jdbcType=INTEGER},
<if test="editorId != null" >
editor_id = #{editorId,jdbcType=INTEGER},
</if>
<if test="cfg.editTime != null and cfg.editTime != ''" >
edit_time = #{cfg.editTime,jdbcType=TIMESTAMP},
<if test="editTime != null and editTime != ''" >
edit_time = #{editTime,jdbcType=TIMESTAMP},
</if>
<if test="cfg.auditorId != null" >
AUDITOR_ID = #{cfg.auditorId,jdbcType=INTEGER},
<if test="auditorId != null" >
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
</if>
<if test="cfg.auditTime != null and cfg.auditTime != ''" >
AUDIT_TIME = #{cfg.auditTime,jdbcType=TIMESTAMP},
<if test="auditTime != null and auditTime != ''" >
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="cfg.compileId != null" >
COMPILE_ID = #{cfg.compileId,jdbcType=TIMESTAMP},
<if test="compileId != null" >
COMPILE_ID = #{compileId,jdbcType=TIMESTAMP},
</if>
<if test="cfg.requestId != null" >
request_id = #{cfg.requestId,jdbcType=INTEGER},
<if test="requestId != null" >
request_id = #{requestId,jdbcType=INTEGER},
</if>
<if test="cfg.isAreaEffective != null" >
is_area_effective = #{cfg.isAreaEffective,jdbcType=INTEGER},
<if test="isAreaEffective != null" >
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
</if>
<if test="cfg.classify != null and cfg.classify != ''" >
classify = #{cfg.classify,jdbcType=VARCHAR},
<if test="classify != null and classify != ''" >
classify = #{classify,jdbcType=VARCHAR},
</if>
<if test="cfg.attribute != null and cfg.attribute != ''" >
attribute = #{cfg.attribute,jdbcType=VARCHAR},
<if test="attribute != null and attribute != ''" >
attribute = #{attribute,jdbcType=VARCHAR},
</if>
<if test="cfg.lable != null and cfg.lable != ''" >
lable = #{cfg.lable,jdbcType=VARCHAR},
<if test="lable != null and lable != ''" >
lable = #{lable,jdbcType=VARCHAR},
</if>
<if test="cfg.areaEffectiveIds != null" >
area_effective_ids = #{cfg.areaEffectiveIds,jdbcType=VARCHAR},
<if test="areaEffectiveIds != null" >
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
</if>
<if test="cfg.functionId != null" >
function_id = #{cfg.functionId,jdbcType=INTEGER},
<if test="functionId != null" >
function_id = #{functionId,jdbcType=INTEGER},
</if>
<if test="cfg.serviceId != null" >
service_id = #{cfg.serviceId,jdbcType=INTEGER},
<if test="serviceId != null" >
service_id = #{serviceId,jdbcType=INTEGER},
</if>
</trim>
</set>
<where>
<if test="cfg.cfgId != null" >
and cfg_id = #{cfg.cfgId,jdbcType=INTEGER}
<if test="cfgId != null" >
and cfg_id = #{cfgId,jdbcType=INTEGER}
</if>
<if test="cfg.compileId != null" >
and compile_id = #{cfg.compileId,jdbcType=INTEGER}
<if test="compileId != null" >
and compile_id = #{compileId,jdbcType=INTEGER}
</if>
<if test="cfg.functionId != null" >
and function_id = #{cfg.functionId,jdbcType=INTEGER}
<if test="functionId != null" >
and function_id = #{functionId,jdbcType=INTEGER}
</if>
</where>
</update>
@@ -533,104 +556,104 @@
update av_voip_ip_cfg
<set >
<trim suffixOverrides=",">
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''" >
cfg_desc = #{cfg.cfgDesc,jdbcType=VARCHAR},
<if test="cfgDesc != null and cfgDesc != ''" >
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
</if>
<if test="cfg.action != null" >
action = #{cfg.action,jdbcType=INTEGER},
<if test="action != null" >
action = #{action,jdbcType=INTEGER},
</if>
<if test="cfg.isValid != null" >
is_valid = #{cfg.isValid,jdbcType=INTEGER},
<if test="isValid != null" >
is_valid = #{isValid,jdbcType=INTEGER},
</if>
<if test="cfg.isAudit != null" >
is_audit = #{cfg.isAudit,jdbcType=INTEGER},
<if test="isAudit != null" >
is_audit = #{isAudit,jdbcType=INTEGER},
</if>
<if test="cfg.editorId != null" >
editor_id = #{cfg.editorId,jdbcType=INTEGER},
<if test="editorId != null" >
editor_id = #{editorId,jdbcType=INTEGER},
</if>
<if test="cfg.editTime != null and cfg.editTime != ''" >
edit_time = #{cfg.editTime,jdbcType=TIMESTAMP},
<if test="editTime != null and editTime != ''" >
edit_time = #{editTime,jdbcType=TIMESTAMP},
</if>
<if test="cfg.auditorId != null" >
AUDITOR_ID = #{cfg.auditorId,jdbcType=INTEGER},
<if test="auditorId != null" >
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
</if>
<if test="cfg.auditTime != null and cfg.auditTime != ''" >
AUDIT_TIME = #{cfg.auditTime,jdbcType=TIMESTAMP},
<if test="auditTime != null and auditTime != ''" >
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="cfg.compileId != null" >
COMPILE_ID = #{cfg.compileId,jdbcType=TIMESTAMP},
<if test="compileId != null" >
COMPILE_ID = #{compileId,jdbcType=TIMESTAMP},
</if>
<if test="cfg.requestId != null" >
request_id = #{cfg.requestId,jdbcType=INTEGER},
<if test="requestId != null" >
request_id = #{requestId,jdbcType=INTEGER},
</if>
<if test="cfg.isAreaEffective != null" >
is_area_effective = #{cfg.isAreaEffective,jdbcType=INTEGER},
<if test="isAreaEffective != null" >
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
</if>
<if test="cfg.classify != null and cfg.classify != ''" >
classify = #{cfg.classify,jdbcType=VARCHAR},
<if test="classify != null and classify != ''" >
classify = #{classify,jdbcType=VARCHAR},
</if>
<if test="cfg.attribute != null and cfg.attribute != ''" >
attribute = #{cfg.attribute,jdbcType=VARCHAR},
<if test="attribute != null and attribute != ''" >
attribute = #{attribute,jdbcType=VARCHAR},
</if>
<if test="cfg.lable != null and cfg.lable != ''" >
lable = #{cfg.lable,jdbcType=VARCHAR},
<if test="lable != null and lable != ''" >
lable = #{lable,jdbcType=VARCHAR},
</if>
<if test="cfg.areaEffectiveIds != null" >
area_effective_ids = #{cfg.areaEffectiveIds,jdbcType=VARCHAR},
<if test="areaEffectiveIds != null" >
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
</if>
<if test="cfg.functionId != null" >
function_id = #{cfg.functionId,jdbcType=INTEGER},
<if test="functionId != null" >
function_id = #{functionId,jdbcType=INTEGER},
</if>
<if test="cfg.serviceId != null" >
service_id = #{cfg.serviceId,jdbcType=INTEGER},
<if test="serviceId != null" >
service_id = #{serviceId,jdbcType=INTEGER},
</if>
<if test="cfg.voipIp != null and cfg.voipIp.ipType != null" >
ip_type = #{cfg.voipIp.ipType,jdbcType=INTEGER},
<if test="voipIp != null and voipIp.ipType != null" >
ip_type = #{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 test="voipIp != null and voipIp.srcIpAddress != null and voipIp.srcIpAddress != ''" >
src_ip_address = #{voipIp.srcIpAddress,jdbcType=VARCHAR},
</if>
<if test="cfg.voipIp != null and cfg.voipIp.ipPattern != null" >
ip_pattern = #{cfg.voipIp.ipPattern,jdbcType=INTEGER},
<if test="voipIp != null and voipIp.ipPattern != null" >
ip_pattern = #{voipIp.ipPattern,jdbcType=INTEGER},
</if>
<if test="cfg.voipIp != null and cfg.voipIp.portPattern != null" >
port_pattern = #{cfg.voipIp.portPattern,jdbcType=INTEGER},
<if test="voipIp != null and voipIp.portPattern != null" >
port_pattern = #{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 test="voipIp != null and voipIp.srcPort != null and voipIp.srcPort != ''" >
src_port = #{voipIp.srcPort,jdbcType=VARCHAR},
</if>
<if test="cfg.voipIp != null and cfg.voipIp.protocol != null" >
protocol = #{cfg.voipIp.protocol,jdbcType=INTEGER},
<if test="voipIp != null and voipIp.protocol != null" >
protocol = #{voipIp.protocol,jdbcType=INTEGER},
</if>
<if test="cfg.voipIp != null and cfg.voipIp.protocolId != null" >
protocol_id = #{cfg.voipIp.protocolId,jdbcType=INTEGER},
<if test="voipIp != null and voipIp.protocolId != null" >
protocol_id = #{voipIp.protocolId,jdbcType=INTEGER},
</if>
<if test="cfg.voipIp != null and cfg.voipIp.direction != null" >
direction = #{cfg.voipIp.direction,jdbcType=INTEGER},
<if test="voipIp != null and voipIp.direction != null" >
direction = #{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 test="voipIp != null and voipIp.destPort != null and voipIp.destPort != ''" >
dest_port = #{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 test="voipIp != null and voipIp.destIpAddress != null and voipIp.destIpAddress != ''" >
dest_ip_address = #{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 test="voipIp != null and voipIp.cfgType != null and voipIp.cfgType != ''" >
cfg_type = #{voipIp.cfgType,jdbcType=VARCHAR},
</if>
<if test="cfg.voipIp != null and cfg.voipIp.cfgRegionCode != null " >
cfg_region_code = #{cfg.voipIp.cfgRegionCode,jdbcType=INTEGER},
<if test="voipIp != null and voipIp.cfgRegionCode != null " >
cfg_region_code = #{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 test="voipIp != null and voipIp.cfgId != null" >
and cfg_id = #{voipIp.cfgId,jdbcType=INTEGER}
</if>
<if test="cfg.compileId != null" >
and compile_id = #{cfg.compileId,jdbcType=INTEGER}
<if test="compileId != null" >
and compile_id = #{compileId,jdbcType=INTEGER}
</if>
<if test="cfg.functionId != null" >
and function_id = #{cfg.functionId,jdbcType=INTEGER}
<if test="functionId != null" >
and function_id = #{functionId,jdbcType=INTEGER}
</if>
</where>
</update>
@@ -639,92 +662,122 @@
update av_voip_account_cfg
<set >
<trim suffixOverrides=",">
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''" >
cfg_desc = #{cfg.cfgDesc,jdbcType=VARCHAR},
<if test="cfgDesc != null and cfgDesc != ''" >
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
</if>
<if test="cfg.action != null" >
action = #{cfg.action,jdbcType=INTEGER},
<if test="action != null" >
action = #{action,jdbcType=INTEGER},
</if>
<if test="cfg.isValid != null" >
is_valid = #{cfg.isValid,jdbcType=INTEGER},
<if test="isValid != null" >
is_valid = #{isValid,jdbcType=INTEGER},
</if>
<if test="cfg.isAudit != null" >
is_audit = #{cfg.isAudit,jdbcType=INTEGER},
<if test="isAudit != null" >
is_audit = #{isAudit,jdbcType=INTEGER},
</if>
<if test="cfg.editorId != null" >
editor_id = #{cfg.editorId,jdbcType=INTEGER},
<if test="editorId != null" >
editor_id = #{editorId,jdbcType=INTEGER},
</if>
<if test="cfg.editTime != null and cfg.editTime != ''" >
edit_time = #{cfg.editTime,jdbcType=TIMESTAMP},
<if test="editTime != null and editTime != ''" >
edit_time = #{editTime,jdbcType=TIMESTAMP},
</if>
<if test="cfg.auditorId != null" >
AUDITOR_ID = #{cfg.auditorId,jdbcType=INTEGER},
<if test="auditorId != null" >
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
</if>
<if test="cfg.auditTime != null and cfg.auditTime != ''" >
AUDIT_TIME = #{cfg.auditTime,jdbcType=TIMESTAMP},
<if test="auditTime != null and auditTime != ''" >
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
</if>
<if test="cfg.compileId != null" >
COMPILE_ID = #{cfg.compileId,jdbcType=TIMESTAMP},
<if test="compileId != null" >
COMPILE_ID = #{compileId,jdbcType=TIMESTAMP},
</if>
<if test="cfg.requestId != null" >
request_id = #{cfg.requestId,jdbcType=INTEGER},
<if test="requestId != null" >
request_id = #{requestId,jdbcType=INTEGER},
</if>
<if test="cfg.isAreaEffective != null" >
is_area_effective = #{cfg.isAreaEffective,jdbcType=INTEGER},
<if test="isAreaEffective != null" >
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
</if>
<if test="cfg.classify != null and cfg.classify != ''" >
classify = #{cfg.classify,jdbcType=VARCHAR},
<if test="classify != null and classify != ''" >
classify = #{classify,jdbcType=VARCHAR},
</if>
<if test="cfg.attribute != null and cfg.attribute != ''" >
attribute = #{cfg.attribute,jdbcType=VARCHAR},
<if test="attribute != null and attribute != ''" >
attribute = #{attribute,jdbcType=VARCHAR},
</if>
<if test="cfg.lable != null and cfg.lable != ''" >
lable = #{cfg.lable,jdbcType=VARCHAR},
<if test="lable != null and lable != ''" >
lable = #{lable,jdbcType=VARCHAR},
</if>
<if test="cfg.areaEffectiveIds != null" >
area_effective_ids = #{cfg.areaEffectiveIds,jdbcType=VARCHAR},
<if test="areaEffectiveIds != null" >
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
</if>
<if test="cfg.functionId != null" >
function_id = #{cfg.functionId,jdbcType=INTEGER},
<if test="functionId != null" >
function_id = #{functionId,jdbcType=INTEGER},
</if>
<if test="cfg.serviceId != null" >
service_id = #{cfg.serviceId,jdbcType=INTEGER},
<if test="serviceId != null" >
service_id = #{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 test="voipAccount != null and voipAccount.district != null and voipAccount.district != ''" >
district = #{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 test="voipAccount != null and voipAccount.cfgKeywords != null and voipAccount.cfgKeywords != ''" >
cfg_keywords = #{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 test="voipAccount != null and voipAccount.cfgType != null and voipAccount.cfgType != ''" >
cfg_type = #{voipAccount.cfgType,jdbcType=VARCHAR},
</if>
<if test="cfg.voipAccount != null and cfg.voipAccount.cfgRegionCode != null " >
cfg_region_code = #{cfg.voipAccount.cfgRegionCode,jdbcType=INTEGER},
<if test="voipAccount != null and voipAccount.cfgRegionCode != null " >
cfg_region_code = #{voipAccount.cfgRegionCode,jdbcType=INTEGER},
</if>
<if test="cfg.voipAccount != null and cfg.voipAccount.exprType != null " >
expr_type = #{cfg.voipAccount.exprType,jdbcType=INTEGER},
<if test="voipAccount != null and voipAccount.exprType != null " >
expr_type = #{voipAccount.exprType,jdbcType=INTEGER},
</if>
<if test="cfg.voipAccount != null and cfg.voipAccount.matchMethod != null " >
match_method = #{cfg.voipAccount.matchMethod,jdbcType=INTEGER},
<if test="voipAccount != null and voipAccount.matchMethod != null " >
match_method = #{voipAccount.matchMethod,jdbcType=INTEGER},
</if>
<if test="cfg.voipAccount != null and cfg.voipAccount.isHexbin != null " >
is_hexbin = #{cfg.voipAccount.isHexbin,jdbcType=INTEGER},
<if test="voipAccount != null and voipAccount.isHexbin != null " >
is_hexbin = #{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 test="voipAccount != null and voipAccount.cfgId != null" >
and cfg_id = #{voipAccount.cfgId,jdbcType=INTEGER}
</if>
<if test="cfg.compileId != null" >
and compile_id = #{cfg.compileId,jdbcType=INTEGER}
<if test="compileId != null" >
and compile_id = #{compileId,jdbcType=INTEGER}
</if>
<if test="cfg.functionId != null" >
and function_id = #{cfg.functionId,jdbcType=INTEGER}
<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>

View File

@@ -20,6 +20,7 @@ import com.nis.domain.configuration.AvSignSampleCfg;
import com.nis.domain.configuration.AvVoipAccountCfg;
import com.nis.domain.configuration.AvVoipIpCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.maat.ToMaatResult;
import com.nis.exceptions.MaatConvertException;
import com.nis.util.ConfigServiceUtil;
import com.nis.util.FileUtils;
@@ -97,64 +98,6 @@ public class AvContentCfgService extends BaseService{
return cfg;
}
/**
* 审核
* @param isAudit
* @param isValid
* @param ids **编译Id
* @param functionId 业务id
*/
public void auditAvVoip(Integer isAudit,Integer isValid,String ids){
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
List<CfgIndexInfo> list = new ArrayList();
Gson gson=new GsonBuilder().disableHtmlEscaping()
.excludeFieldsWithoutExposeAnnotation()
.create();
//多域配置审核时间为同一个时间
Date auditTime=new Date();
for(String id :idArray){
CfgIndexInfo cfgSearch=new CfgIndexInfo();
cfgSearch.setCfgId(Long.parseLong(id));
entity = avContentCfgDao.getCfgIndexInfo(cfgSearch);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());
entity.setAuditTime(auditTime);
/*avCfgDao.auditAvFileSample(entity);
list.add(entity);*/
}
/*if(isAudit==1){
//调用服务接口下发配置数据
String json=gson.toJson(list);
logger.info("音视频文件样例下发配置参数:"+json);
//调用服务接口下发配置
try {
String result = ConfigServiceUtil.postCallbackCfg(json);
logger.info("音视频文件样例配置下发响应信息:"+result);
} catch (Exception e) {
e.printStackTrace();
logger.info("音视频文件样例配置下发失败");
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
}
}else if(isAudit==3){
//调用服务接口取消配置
String json=gson.toJson(list);
logger.info("音视频文件样例下发配置参数:"+json);
//调用服务接口下发配置
try {
String result = ConfigServiceUtil.put(json,2);
logger.info("音视频文件样例取消配置响应信息:"+result);
} catch (Exception e) {
e.printStackTrace();
logger.info("音视频文件样取消配置失败");
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
}
}*/
}
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
public void saveOrUpdateAvVoip(CfgIndexInfo entity,String voipIpIds,String voipAccountIds){
@@ -249,33 +192,27 @@ public class AvContentCfgService extends BaseService{
}
}
}
//将删除后的ACCOUNT置为删除1,1,1,
//delete 真是删除voipAccount信息
if(!StringUtil.isEmpty(voipAccountIds.replaceAll(",", ""))){
voipAccountIds=voipAccountIds.substring(1,voipAccountIds.length());
for (String cfgId : voipAccountIds.split(",")) {
CfgIndexInfo cfg=new CfgIndexInfo();
cfg.setEditorId(UserUtils.getUser().getId());
cfg.setEditTime(editTime);
cfg.setIsValid(-1);
AvVoipAccountCfg voipAccountCfg=new AvVoipAccountCfg();
voipAccountCfg.setCfgId(Long.parseLong(cfgId));
cfg.setVoipAccount(voipAccountCfg);
avContentCfgDao.updateAvVoipAccount(cfg);
avContentCfgDao.deleteAvVoipAccount(cfg);
}
}
//将删除后的IP置为删除 [is_valid=-1]
//delete 真是删除voipAccount信息
if(!StringUtil.isEmpty(voipIpIds.replaceAll(",", ""))){
voipIpIds=voipIpIds.substring(1,voipIpIds.length());
for (String cfgId : voipIpIds.split(",")) {
CfgIndexInfo cfg=new CfgIndexInfo();
cfg.setEditorId(UserUtils.getUser().getId());
cfg.setEditTime(editTime);
cfg.setIsValid(-1);
AvVoipIpCfg voipIpCfg=new AvVoipIpCfg();
voipIpCfg.setCfgId(Long.parseLong(cfgId));
cfg.setVoipIp(voipIpCfg);
avContentCfgDao.updateAvVoipIp(cfg);
avContentCfgDao.deleteAvVoipIp(cfg);
}
}
//修改
@@ -306,4 +243,66 @@ public class AvContentCfgService extends BaseService{
avContentCfgDao.updateCfgIndexInfo(entity);
}
}
/**
*
* @param isAudit
* @param isValid
* @param ids 编译Id
* @param functionId
*/
public void auditAvVoip(Integer isAudit,Integer isValid,String ids,Integer functionId){
CfgIndexInfo entity = new CfgIndexInfo();
String[] idArray = ids.split(",");
List<CfgIndexInfo> list = new ArrayList();
List<AvVoipIpCfg> voipIpList = new ArrayList();
List<AvVoipAccountCfg> voipAccountList = new ArrayList();
Map<String, Object> childMap=new HashMap<>();
CfgIndexInfo searchCfg=new CfgIndexInfo();
Date auditTime=new Date();
for(String id :idArray){
searchCfg.setCompileId(Integer.parseInt(id));
entity = avContentCfgDao.getCfgIndexInfo(searchCfg);
entity.setIsAudit(isAudit);
entity.setIsValid(isValid);
entity.setAuditorId(UserUtils.getUser().getId());
entity.setAuditTime(auditTime);
voipIpList=avContentCfgDao.findVoipIpCfgList(entity);
voipAccountList=avContentCfgDao.findVoipAccountCfgList(entity);
avContentCfgDao.updateAvVoipIp(entity);
avContentCfgDao.updateAvVoipAccount(entity);
avContentCfgDao.updateCfgIndexInfo(entity);
childMap.put("voipIp", voipIpList);
childMap.put("voipAccount", voipAccountList);
list.add(entity);
}
/*if(isAudit==1){
//调用服务接口下发配置数据
String json=gsonToJson(list);
logger.info("文件样例下发配置参数:"+json);
//调用服务接口下发配置
try {
ToMaatResult result = ConfigServiceUtil.postCallbackCfg(json);
logger.info("音视频VOIP配置下发响应信息"+result.getMsg());
} catch (Exception e) {
e.printStackTrace();
logger.info("音视频VOIP配置下发失败");
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
}
}else if(isAudit==3){
//调用服务接口取消配置
String json=gsonToJson(list);
logger.info("音视频VOIP配置参数"+json);
//调用服务接口取消配置
try {
ToMaatResult result = ConfigServiceUtil.put(json, 2);
logger.info("音视频VOIP取消配置响应信息"+result.getMsg());
} catch (Exception e) {
e.printStackTrace();
logger.info("音视频VOIP消配置失败");
throw new MaatConvertException("<spring:message code=\"request_service_failed\"/>:"+e.getMessage());
}
}*/
}
}