AV-VOIP 列表功能完成,新增界面整体搭建完成

This commit is contained in:
duandongmei
2018-05-22 17:30:52 +08:00
parent c6a9ac126d
commit b87cb3ca26
13 changed files with 1776 additions and 17 deletions

View File

@@ -0,0 +1,24 @@
package com.nis.web.dao.configuration;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.configuration.AvVoipAccountCfg;
import com.nis.domain.configuration.AvVoipIpCfg;
import com.nis.domain.configuration.BaseIpCfg;
import com.nis.domain.configuration.CfgIndexInfo;
import com.nis.domain.configuration.AvFileSampleCfg;
import com.nis.domain.configuration.AvSignSampleCfg;
import com.nis.web.dao.CrudDao;
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);
}

View File

@@ -0,0 +1,275 @@
<?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="district" property="district" 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" >
a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id
</sql>
<sql id="AvVoipIp_Column" >
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable
,a.area_effective_ids,a.function_id,a.cfg_region_code
</sql>
<sql id="AvVoipAccount_Column" >
a.cfg_id,a.cfg_desc,a.district,a.cfg_keywords,a.cfg_type,
a.action,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id,a.edit_time, a.auditor_id,
a.audit_time,a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
</sql>
<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 a
left join sys_user s on a.creator_id=s.id
left join sys_user e on a.editor_id=e.id
left join sys_user u on a.auditor_id=u.id
left join request_info ri on a.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>
<if test="cfg.cfgId != null">
AND a.CFG_ID=#{cfgId,jdbcType=BIGINT}
</if>
<if test="cfg.cfgDesc != null and cfg.cfgDesc != ''">
AND a.CFG_DESC like concat(concat('%',#{cfg.cfgDesc,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.action != null">
AND a.ACTION=#{cfg.action,jdbcType=INTEGER}
</if>
<if test="cfg.isValid != null">
AND a.IS_VALID=#{cfg.isValid,jdbcType=INTEGER}
</if>
<if test="cfg.isValid == null">
AND a.IS_VALID != -1
</if>
<if test="cfg.isAudit != null">
AND a.IS_AUDIT=#{cfg.isAudit,jdbcType=INTEGER}
</if>
<if test="cfg.creatorName != null and cfg.creatorName != ''">
AND CREATOR_NAME like concat(concat('%',#{cfg.creatorName,jdbcType=VARCHAR}),'%')
</if>
<!-- <if test="cfg.search_create_time_start != null and cfg.search_create_time_start != ''">
<![CDATA[AND a.CREATE_TIME >= #{cfg.search_create_time_start,jdbcType=TIMESTAMP}]]>
</if>
<if test="cfg.search_create_time_end != null and cfg.search_create_time_end != ''">
<![CDATA[AND a.CREATE_TIME <= #{cfg.search_create_time_end,jdbcType=TIMESTAMP}]]>
</if> -->
<if test="cfg.editorName != null and cfg.editorName != ''">
AND EDITOR_NAME like concat(concat('%',#{cfg.editorName,jdbcType=VARCHAR}),'%')
</if>
<!-- <if test="cfg.search_edit_time_start != null and cfg.search_edit_time_start != ''">
<![CDATA[AND a.EDIT_TIME >= #{cfg.search_edit_time_start,jdbcType=TIMESTAMP}]]>
</if>
<if test="cfg.search_edit_time_end != null and cfg.search_edit_time_end != ''">
<![CDATA[AND a.EDIT_TIME <= #{cfg.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>
<!-- <if test="cfg.search_audit_time_start != null and cfg.search_audit_time_start != ''">
<![CDATA[AND a.AUDIT_TIME >= #{cfg.search_audit_time_start,jdbcType=TIMESTAMP}]]>
</if>
<if test="cfg.search_audit_time_end != null and cfg.search_audit_time_end != ''">
<![CDATA[AND a.AUDIT_TIME <= #{cfg.search_audit_time_end,jdbcType=TIMESTAMP}]]>
</if> -->
<if test="cfg.serviceId != null">
AND a.SERVICE_ID=#{cfg.serviceId,jdbcType=INTEGER}
</if>
<if test="cfg.requestId != null">
AND a.REQUEST_ID=#{cfg.requestId,jdbcType=INTEGER}
</if>
<if test="cfg.compileId != null">
AND a.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
</if>
<if test="cfg.isAreaEffective != null">
AND a.IS_AREA_EFFECTIVE=#{cfg.isAreaEffective,jdbcType=INTEGER}
</if>
<if test="cfg.classify != null and cfg.classify != ''">
AND a.classify like concat(concat('%',#{cfg.classify,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.attribute != null and cfg.attribute != ''">
AND a.attribute like concat(concat('%',#{cfg.attribute,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.lable != null and cfg.lable != ''">
AND a.lable like concat(concat('%',#{cfg.lable,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.areaEffectiveIds != null and cfg.areaEffectiveIds != ''">
AND a.AREA_EFFECTIVE_IDS like concat(concat('%',#{cfg.areaEffectiveIds,jdbcType=VARCHAR}),'%')
</if>
<if test="cfg.functionId != null">
AND a.function_id=#{cfg.functionId,jdbcType=INTEGER}
</if>
<if test="(cfg.voipIp.srcIpAddress != null and (cfg.voipIp.srcIpAddress != '') or cfg.voipIp.srcPort != null and cfg.voipIp.srcPort != '')">
AND a.compile_id = (select t.compile_id from av_voip_ip_cfg t
<where>
<if test="cfg.voipIp.ipAddress != null and cfg.voipIp.ipAddress != ''">
and t.src_ip_address =#{(cfg.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>
</where>
)
</if>
<if test="(cfg.voipAccount.cfgKeywords != null and cfg.voipAccount.cfgKeywords != '') or (cfg.voipAccount.district != null and cfg.voipAccount.district != '') ">
AND a.compile_id = (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>
<if test="cfg.voipAccount.district != null and cfg.voipAccount.district != ''">
and f.district =#{cfg.voipAccount.district,jdbcType=VARCHAR}
</if>
</where>
)
</if>
<!-- 数据范围过滤 -->
${cfg.sqlMap.dsf}
</trim>
<choose>
<when test="cfg.page !=null and cfg.page.orderBy != null and cfg.page.orderBy != ''">
ORDER BY ${cfg.page.orderBy}
</when>
<otherwise>
ORDER BY a.CFG_ID desc
</otherwise>
</choose>
</select>
<select id="findVoipIpCfgList" resultMap="AvVoipIpCfgMap">
select
<include refid="AvVoipIp_Column" />
from av_voip_ip_cfg a
<where>
<if test="cfg.compileId != null">
and a.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
</if>
</where>
</select>
<select id="findVoipAccountCfgList" resultMap="AvVoipAccountCfgMap">
select
<include refid="AvVoipAccount_Column" />
from av_voip_account_cfg a
<where>
<if test="cfg.compileId != null">
and a.COMPILE_ID=#{cfg.compileId,jdbcType=INTEGER}
</if>
</where>
</select>
<select id="getCfgIndexInfo" resultMap="CfgIndexInfoMap" parameterType="com.nis.domain.configuration.CfgIndexInfo">
SELECT
*
FROM cfg_index_info a
<where>
<if test="cfg.cfgId != null">
and a.CFG_ID=#{cfg.cfgId,jdbcType=INTEGER}
</if>
<!-- <if test="cfg.compileId != null">
and a.compileId=#{cfg.compileId,jdbcType=INTEGER}
</if> -->
</where>
</select>
</mapper>