diff --git a/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java b/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java index c1860d20a..44f77203d 100644 --- a/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java +++ b/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java @@ -8,7 +8,6 @@ */ package com.nis.domain.configuration; -import java.util.Date; import java.util.List; diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java b/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java index a923432e3..b752d0659 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/AvContentController.java @@ -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; } diff --git a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.java b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.java index fd928a8e1..ebf7f43f6 100644 --- a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.java +++ b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.java @@ -16,15 +16,17 @@ import com.nis.web.dao.MyBatisDao; @MyBatisDao -public interface AvContentCfgDao extends CrudDao{ - public List findVoipList(@Param("cfg")CfgIndexInfo entity) ; - public List findVoipIpCfgList(@Param("cfg")CfgIndexInfo entity); - public List 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 findVoipList(CfgIndexInfo entity) ; + public List findVoipIpCfgList(CfgIndexInfo entity); + public List 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); } diff --git a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml index 4fc09c120..c41a2fdf2 100644 --- a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml @@ -124,115 +124,115 @@ left join request_info ri on r.request_id=ri.id - - AND ${cfg.page.where} + + AND ${page.where} - + AND r.CFG_ID=#{cfgId,jdbcType=BIGINT} - - AND r.CFG_DESC like concat(concat('%',#{cfg.cfgDesc,jdbcType=VARCHAR}),'%') + + AND r.CFG_DESC like concat(concat('%',#{cfgDesc,jdbcType=VARCHAR}),'%') - - AND r.ACTION=#{cfg.action,jdbcType=INTEGER} + + AND r.ACTION=#{action,jdbcType=INTEGER} - - AND r.IS_VALID=#{cfg.isValid,jdbcType=INTEGER} + + AND r.IS_VALID=#{isValid,jdbcType=INTEGER} - + AND r.IS_VALID != -1 - - AND r.IS_AUDIT=#{cfg.isAudit,jdbcType=INTEGER} + + AND r.IS_AUDIT=#{isAudit,jdbcType=INTEGER} - - AND CREATOR_NAME like concat(concat('%',#{cfg.creatorName,jdbcType=VARCHAR}),'%') + + AND CREATOR_NAME like concat(concat('%',#{creatorName,jdbcType=VARCHAR}),'%') - - - AND r.EDITOR_NAME like concat(concat('%',#{cfg.editorName,jdbcType=VARCHAR}),'%') + + AND r.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%') - - - AND AUDITOR_NAME like concat(concat('%',#{cfg.auditorName,jdbcType=VARCHAR}),'%') + + AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%') - - - AND r.SERVICE_ID=#{cfg.serviceId,jdbcType=INTEGER} + + AND r.SERVICE_ID=#{serviceId,jdbcType=INTEGER} - - AND r.REQUEST_ID=#{cfg.requestId,jdbcType=INTEGER} + + AND r.REQUEST_ID=#{requestId,jdbcType=INTEGER} - - AND r.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER} + + AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER} - - AND r.IS_AREA_EFFECTIVE=#{cfg.isAreaEffective,jdbcType=INTEGER} + + AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER} - - AND r.classify like concat(concat('%',#{cfg.classify,jdbcType=VARCHAR}),'%') + + AND r.classify like concat(concat('%',#{classify,jdbcType=VARCHAR}),'%') - - AND r.attribute like concat(concat('%',#{cfg.attribute,jdbcType=VARCHAR}),'%') + + AND r.attribute like concat(concat('%',#{attribute,jdbcType=VARCHAR}),'%') - - AND r.lable like concat(concat('%',#{cfg.lable,jdbcType=VARCHAR}),'%') + + AND r.lable like concat(concat('%',#{lable,jdbcType=VARCHAR}),'%') - - AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{cfg.areaEffectiveIds,jdbcType=VARCHAR}),'%') + + AND r.AREA_EFFECTIVE_IDS like concat(concat('%',#{areaEffectiveIds,jdbcType=VARCHAR}),'%') - - AND r.function_id=#{cfg.functionId,jdbcType=INTEGER} + + AND r.function_id=#{functionId,jdbcType=INTEGER} - + AND r.compile_id in (select t.compile_id from av_voip_ip_cfg t - - and t.src_ip_address =#{cfg.voipIp.srcIpAddress,jdbcType=VARCHAR} + + and t.src_ip_address =#{voipIp.srcIpAddress,jdbcType=VARCHAR} - - and t.src_port =#{cfg.voipIp.srcPort,jdbcType=VARCHAR} + + and t.src_port =#{voipIp.srcPort,jdbcType=VARCHAR} ) - + AND r.compile_id in (select f.compile_id from av_voip_account_cfg f - - and f.cfg_keywords like concat(concat('%',#{cfg.voipAccount.cfgKeywords,jdbcType=VARCHAR}),'%') + + and f.cfg_keywords like concat(concat('%',#{voipAccount.cfgKeywords,jdbcType=VARCHAR}),'%') - - and f.district =#{cfg.voipAccount.district,jdbcType=VARCHAR} + + and f.district =#{voipAccount.district,jdbcType=VARCHAR} - - and f.compile_id =#{cfg.compileId,jdbcType=INTEGER} + + and f.compile_id =#{compileId,jdbcType=INTEGER} ) - ${cfg.sqlMap.dsf} + ${sqlMap.dsf} - - ORDER BY ${cfg.page.orderBy} + + ORDER BY ${page.orderBy} ORDER BY r.CFG_ID desc @@ -245,10 +245,17 @@ from av_voip_ip_cfg r - - and r.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER} + + and r.COMPILE_ID=#{compileId,jdbcType=INTEGER} - and r.is_valid !=-1 + + + and r.is_valid=#{isValid,jdbcType=INTEGER} + + + and r.is_valid != -1 + + @@ -257,10 +264,17 @@ from av_voip_account_cfg r - - and r.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER} + + and r.COMPILE_ID=#{compileId,jdbcType=INTEGER} - and r.is_valid != -1 + + + and r.is_valid=#{isValid,jdbcType=INTEGER} + + + and r.is_valid != -1 + + @@ -270,13 +284,22 @@ * FROM cfg_index_info a - - and a.CFG_ID=#{cfg.cfgId,jdbcType=INTEGER} + + and a.CFG_ID=#{cfgId,jdbcType=INTEGER} - - and a.compile_Id=#{cfg.compileId,jdbcType=INTEGER} + + and a.compile_Id=#{compileId,jdbcType=INTEGER} - and a.is_valid != -1 + + + and a.is_valid=#{isValid,jdbcType=INTEGER} + + + and a.is_valid != -1 + + + + @@ -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} ) @@ -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} ) @@ -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} ) @@ -463,68 +486,68 @@ update cfg_index_info - - cfg_desc = #{cfg.cfgDesc,jdbcType=VARCHAR}, + + cfg_desc = #{cfgDesc,jdbcType=VARCHAR}, - - action = #{cfg.action,jdbcType=INTEGER}, + + action = #{action,jdbcType=INTEGER}, - - is_valid = #{cfg.isValid,jdbcType=INTEGER}, + + is_valid = #{isValid,jdbcType=INTEGER}, - - is_audit = #{cfg.isAudit,jdbcType=INTEGER}, + + is_audit = #{isAudit,jdbcType=INTEGER}, - - editor_id = #{cfg.editorId,jdbcType=INTEGER}, + + editor_id = #{editorId,jdbcType=INTEGER}, - - edit_time = #{cfg.editTime,jdbcType=TIMESTAMP}, + + edit_time = #{editTime,jdbcType=TIMESTAMP}, - - AUDITOR_ID = #{cfg.auditorId,jdbcType=INTEGER}, + + AUDITOR_ID = #{auditorId,jdbcType=INTEGER}, - - AUDIT_TIME = #{cfg.auditTime,jdbcType=TIMESTAMP}, + + AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP}, - - COMPILE_ID = #{cfg.compileId,jdbcType=TIMESTAMP}, + + COMPILE_ID = #{compileId,jdbcType=TIMESTAMP}, - - request_id = #{cfg.requestId,jdbcType=INTEGER}, + + request_id = #{requestId,jdbcType=INTEGER}, - - is_area_effective = #{cfg.isAreaEffective,jdbcType=INTEGER}, + + is_area_effective = #{isAreaEffective,jdbcType=INTEGER}, - - classify = #{cfg.classify,jdbcType=VARCHAR}, + + classify = #{classify,jdbcType=VARCHAR}, - - attribute = #{cfg.attribute,jdbcType=VARCHAR}, + + attribute = #{attribute,jdbcType=VARCHAR}, - - lable = #{cfg.lable,jdbcType=VARCHAR}, + + lable = #{lable,jdbcType=VARCHAR}, - - area_effective_ids = #{cfg.areaEffectiveIds,jdbcType=VARCHAR}, + + area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR}, - - function_id = #{cfg.functionId,jdbcType=INTEGER}, + + function_id = #{functionId,jdbcType=INTEGER}, - - service_id = #{cfg.serviceId,jdbcType=INTEGER}, + + service_id = #{serviceId,jdbcType=INTEGER}, - - and cfg_id = #{cfg.cfgId,jdbcType=INTEGER} + + and cfg_id = #{cfgId,jdbcType=INTEGER} - - and compile_id = #{cfg.compileId,jdbcType=INTEGER} + + and compile_id = #{compileId,jdbcType=INTEGER} - - and function_id = #{cfg.functionId,jdbcType=INTEGER} + + and function_id = #{functionId,jdbcType=INTEGER} @@ -533,104 +556,104 @@ update av_voip_ip_cfg - - cfg_desc = #{cfg.cfgDesc,jdbcType=VARCHAR}, + + cfg_desc = #{cfgDesc,jdbcType=VARCHAR}, - - action = #{cfg.action,jdbcType=INTEGER}, + + action = #{action,jdbcType=INTEGER}, - - is_valid = #{cfg.isValid,jdbcType=INTEGER}, + + is_valid = #{isValid,jdbcType=INTEGER}, - - is_audit = #{cfg.isAudit,jdbcType=INTEGER}, + + is_audit = #{isAudit,jdbcType=INTEGER}, - - editor_id = #{cfg.editorId,jdbcType=INTEGER}, + + editor_id = #{editorId,jdbcType=INTEGER}, - - edit_time = #{cfg.editTime,jdbcType=TIMESTAMP}, + + edit_time = #{editTime,jdbcType=TIMESTAMP}, - - AUDITOR_ID = #{cfg.auditorId,jdbcType=INTEGER}, + + AUDITOR_ID = #{auditorId,jdbcType=INTEGER}, - - AUDIT_TIME = #{cfg.auditTime,jdbcType=TIMESTAMP}, + + AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP}, - - COMPILE_ID = #{cfg.compileId,jdbcType=TIMESTAMP}, + + COMPILE_ID = #{compileId,jdbcType=TIMESTAMP}, - - request_id = #{cfg.requestId,jdbcType=INTEGER}, + + request_id = #{requestId,jdbcType=INTEGER}, - - is_area_effective = #{cfg.isAreaEffective,jdbcType=INTEGER}, + + is_area_effective = #{isAreaEffective,jdbcType=INTEGER}, - - classify = #{cfg.classify,jdbcType=VARCHAR}, + + classify = #{classify,jdbcType=VARCHAR}, - - attribute = #{cfg.attribute,jdbcType=VARCHAR}, + + attribute = #{attribute,jdbcType=VARCHAR}, - - lable = #{cfg.lable,jdbcType=VARCHAR}, + + lable = #{lable,jdbcType=VARCHAR}, - - area_effective_ids = #{cfg.areaEffectiveIds,jdbcType=VARCHAR}, + + area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR}, - - function_id = #{cfg.functionId,jdbcType=INTEGER}, + + function_id = #{functionId,jdbcType=INTEGER}, - - service_id = #{cfg.serviceId,jdbcType=INTEGER}, + + service_id = #{serviceId,jdbcType=INTEGER}, - - ip_type = #{cfg.voipIp.ipType,jdbcType=INTEGER}, + + ip_type = #{voipIp.ipType,jdbcType=INTEGER}, - - src_ip_address = #{cfg.voipIp.srcIpAddress,jdbcType=VARCHAR}, + + src_ip_address = #{voipIp.srcIpAddress,jdbcType=VARCHAR}, - - ip_pattern = #{cfg.voipIp.ipPattern,jdbcType=INTEGER}, + + ip_pattern = #{voipIp.ipPattern,jdbcType=INTEGER}, - - port_pattern = #{cfg.voipIp.portPattern,jdbcType=INTEGER}, + + port_pattern = #{voipIp.portPattern,jdbcType=INTEGER}, - - src_port = #{cfg.voipIp.srcPort,jdbcType=VARCHAR}, + + src_port = #{voipIp.srcPort,jdbcType=VARCHAR}, - - protocol = #{cfg.voipIp.protocol,jdbcType=INTEGER}, + + protocol = #{voipIp.protocol,jdbcType=INTEGER}, - - protocol_id = #{cfg.voipIp.protocolId,jdbcType=INTEGER}, + + protocol_id = #{voipIp.protocolId,jdbcType=INTEGER}, - - direction = #{cfg.voipIp.direction,jdbcType=INTEGER}, + + direction = #{voipIp.direction,jdbcType=INTEGER}, - - dest_port = #{cfg.voipIp.destPort,jdbcType=VARCHAR}, + + dest_port = #{voipIp.destPort,jdbcType=VARCHAR}, - - dest_ip_address = #{cfg.voipIp.destIpAddress,jdbcType=VARCHAR}, + + dest_ip_address = #{voipIp.destIpAddress,jdbcType=VARCHAR}, - - cfg_type = #{cfg.voipIp.cfgType,jdbcType=VARCHAR}, + + cfg_type = #{voipIp.cfgType,jdbcType=VARCHAR}, - - cfg_region_code = #{cfg.voipIp.cfgRegionCode,jdbcType=INTEGER}, + + cfg_region_code = #{voipIp.cfgRegionCode,jdbcType=INTEGER}, - - and cfg_id = #{cfg.voipIp.cfgId,jdbcType=INTEGER} + + and cfg_id = #{voipIp.cfgId,jdbcType=INTEGER} - - and compile_id = #{cfg.compileId,jdbcType=INTEGER} + + and compile_id = #{compileId,jdbcType=INTEGER} - - and function_id = #{cfg.functionId,jdbcType=INTEGER} + + and function_id = #{functionId,jdbcType=INTEGER} @@ -639,92 +662,122 @@ update av_voip_account_cfg - - cfg_desc = #{cfg.cfgDesc,jdbcType=VARCHAR}, + + cfg_desc = #{cfgDesc,jdbcType=VARCHAR}, - - action = #{cfg.action,jdbcType=INTEGER}, + + action = #{action,jdbcType=INTEGER}, - - is_valid = #{cfg.isValid,jdbcType=INTEGER}, + + is_valid = #{isValid,jdbcType=INTEGER}, - - is_audit = #{cfg.isAudit,jdbcType=INTEGER}, + + is_audit = #{isAudit,jdbcType=INTEGER}, - - editor_id = #{cfg.editorId,jdbcType=INTEGER}, + + editor_id = #{editorId,jdbcType=INTEGER}, - - edit_time = #{cfg.editTime,jdbcType=TIMESTAMP}, + + edit_time = #{editTime,jdbcType=TIMESTAMP}, - - AUDITOR_ID = #{cfg.auditorId,jdbcType=INTEGER}, + + AUDITOR_ID = #{auditorId,jdbcType=INTEGER}, - - AUDIT_TIME = #{cfg.auditTime,jdbcType=TIMESTAMP}, + + AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP}, - - COMPILE_ID = #{cfg.compileId,jdbcType=TIMESTAMP}, + + COMPILE_ID = #{compileId,jdbcType=TIMESTAMP}, - - request_id = #{cfg.requestId,jdbcType=INTEGER}, + + request_id = #{requestId,jdbcType=INTEGER}, - - is_area_effective = #{cfg.isAreaEffective,jdbcType=INTEGER}, + + is_area_effective = #{isAreaEffective,jdbcType=INTEGER}, - - classify = #{cfg.classify,jdbcType=VARCHAR}, + + classify = #{classify,jdbcType=VARCHAR}, - - attribute = #{cfg.attribute,jdbcType=VARCHAR}, + + attribute = #{attribute,jdbcType=VARCHAR}, - - lable = #{cfg.lable,jdbcType=VARCHAR}, + + lable = #{lable,jdbcType=VARCHAR}, - - area_effective_ids = #{cfg.areaEffectiveIds,jdbcType=VARCHAR}, + + area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR}, - - function_id = #{cfg.functionId,jdbcType=INTEGER}, + + function_id = #{functionId,jdbcType=INTEGER}, - - service_id = #{cfg.serviceId,jdbcType=INTEGER}, + + service_id = #{serviceId,jdbcType=INTEGER}, - - district = #{cfg.voipAccount.district,jdbcType=VARCHAR}, + + district = #{voipAccount.district,jdbcType=VARCHAR}, - - cfg_keywords = #{cfg.voipAccount.cfgKeywords,jdbcType=VARCHAR}, + + cfg_keywords = #{voipAccount.cfgKeywords,jdbcType=VARCHAR}, - - cfg_type = #{cfg.voipAccount.cfgType,jdbcType=VARCHAR}, + + cfg_type = #{voipAccount.cfgType,jdbcType=VARCHAR}, - - cfg_region_code = #{cfg.voipAccount.cfgRegionCode,jdbcType=INTEGER}, + + cfg_region_code = #{voipAccount.cfgRegionCode,jdbcType=INTEGER}, - - expr_type = #{cfg.voipAccount.exprType,jdbcType=INTEGER}, + + expr_type = #{voipAccount.exprType,jdbcType=INTEGER}, - - match_method = #{cfg.voipAccount.matchMethod,jdbcType=INTEGER}, + + match_method = #{voipAccount.matchMethod,jdbcType=INTEGER}, - - is_hexbin = #{cfg.voipAccount.isHexbin,jdbcType=INTEGER}, + + is_hexbin = #{voipAccount.isHexbin,jdbcType=INTEGER}, - - and cfg_id = #{cfg.voipAccount.cfgId,jdbcType=INTEGER} + + and cfg_id = #{voipAccount.cfgId,jdbcType=INTEGER} - - and compile_id = #{cfg.compileId,jdbcType=INTEGER} + + and compile_id = #{compileId,jdbcType=INTEGER} - - and function_id = #{cfg.functionId,jdbcType=INTEGER} + + and function_id = #{functionId,jdbcType=INTEGER} + + + delete from av_voip_ip_cfg + + + and cfg_id = #{voipAccount.cfgId,jdbcType=INTEGER} + + + and compile_id = #{compileId,jdbcType=INTEGER} + + + and function_id = #{functionId,jdbcType=INTEGER} + + + + + + delete from av_voip_account_cfg + + + and cfg_id = #{voipAccount.cfgId,jdbcType=INTEGER} + + + and compile_id = #{compileId,jdbcType=INTEGER} + + + and function_id = #{functionId,jdbcType=INTEGER} + + + diff --git a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java index b0710893c..b5325955e 100644 --- a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java @@ -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 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(":"+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(":"+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 list = new ArrayList(); + List voipIpList = new ArrayList(); + List voipAccountList = new ArrayList(); + Map 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(":"+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(":"+e.getMessage()); + } + }*/ + + } }