仿冒功能

仿冒地址池ip
来函和任务修改
样例新增界面增加631业务
This commit is contained in:
段冬梅
2018-12-17 00:21:27 +08:00
parent 23bfe1c136
commit f3e4844f92
33 changed files with 2076 additions and 99 deletions

View File

@@ -0,0 +1,21 @@
package com.nis.web.dao.configuration;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.nis.domain.configuration.PxyObjKeyring;
import com.nis.domain.configuration.PxyObjSpoofingIpPool;
import com.nis.domain.configuration.PxyObjTrustedCaCert;
import com.nis.domain.configuration.PxyObjTrustedCaCrl;
import com.nis.web.dao.CrudDao;
import com.nis.web.dao.MyBatisDao;
@MyBatisDao
public interface PxyObjSpoofingIpPoolDao extends CrudDao<PxyObjSpoofingIpPool>{
List<PxyObjSpoofingIpPool> findPage(PxyObjSpoofingIpPool spoofingPool);
List<PxyObjSpoofingIpPool> findList(PxyObjSpoofingIpPool spoofingPool);
PxyObjSpoofingIpPool getPxyObjSpoofingIpPool(Long cfgId);
int insert(PxyObjSpoofingIpPool spoofingPool);
int update(PxyObjSpoofingIpPool spoofingPool);
}

View File

@@ -0,0 +1,288 @@
<?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.PxyObjSpoofingIpPoolDao" >
<resultMap id="PxyObjSpoofingPoolMap" type="com.nis.domain.configuration.PxyObjSpoofingIpPool" >
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
<result column="ip_type" property="ipType" jdbcType="INTEGER" />
<result column="ip_address" property="ipAddress" jdbcType="VARCHAR" />
<result column="direction" property="direction" jdbcType="INTEGER" />
<result column="protocol" property="protocol" jdbcType="INTEGER" />
<result column="location" property="location" jdbcType="INTEGER" />
<result column="port" property="port" 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="location" property="location" 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="group_id" property="groupId" jdbcType="INTEGER" />
<result column="group_name" property="groupName" jdbcType="INTEGER" />
<result column="user_region" property="userRegion" jdbcType="VARCHAR" />
</resultMap>
<sql id="PxyObjSpoofingIpPoolColumns">
r.CFG_ID, r.CFG_DESC,r.CFG_REGION_CODE, r.IP_TYPE, r.IP_ADDRESS,
r.DIRECTION,r.PROTOCOL,r.IS_VALID,r.IS_AUDIT,r.location,r.port,
r.CREATOR_ID,r.CREATE_TIME,r.EDITOR_ID,r.EDIT_TIME,r.AUDITOR_ID,r.AUDIT_TIME,
r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY,
r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.FUNCTION_ID,r.GROUP_ID,r.user_region
</sql>
<!-- 查出所有 有效数据-->
<select id="findPage" resultMap="PxyObjSpoofingPoolMap">
SELECT
<include refid="PxyObjSpoofingIpPoolColumns"/>
<trim prefix="," prefixOverrides=",">
,s.name as creator_name,e.name as editor_name,u.name as auditor_name
,ri.request_title as requestName,p.group_name as group_name
</trim>
FROM pxy_obj_spoofing_ip_pool r
left join policy_group_info p on p.group_id=r.group_id
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="compileId != null">
AND r.compile_id=#{compileId,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="editorName != null and editorName != ''">
AND r.EDITOR_NAME like concat(concat('%',#{editorName,jdbcType=VARCHAR}),'%')
</if>
<if test="auditorName != null and auditorName != ''">
AND AUDITOR_NAME like concat(concat('%',#{auditorName,jdbcType=VARCHAR}),'%')
</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="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="functionId != null">
AND r.function_id=#{functionId,jdbcType=INTEGER}
</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>
<select id="getPxyObjSpoofingIpPool" resultMap="PxyObjSpoofingPoolMap" >
SELECT
<include refid="PxyObjSpoofingIpPoolColumns"/>
FROM pxy_obj_spoofing_ip_pool r
where r.CFG_ID=#{cfgId,jdbcType=BIGINT}
</select>
<!-- 查出所有 有效数据-->
<select id="findList" resultMap="PxyObjSpoofingPoolMap" parameterType="com.nis.domain.configuration.PxyObjSpoofingIpPool">
SELECT
<include refid="PxyObjSpoofingIpPoolColumns"/>
FROM pxy_obj_spoofing_ip_pool r where (r.is_valid!=-1 and r.is_audit!=3) AND r.group_id =#{groupId,jdbcType=INTEGER}
<if test="cfgId != null">
AND r.CFG_ID!=#{cfgId,jdbcType=BIGINT}
</if>
</select>
<insert id="insert" parameterType="com.nis.domain.configuration.PxyObjSpoofingIpPool" >
insert into pxy_obj_spoofing_ip_pool (
CFG_ID,
CFG_DESC,
ACTION,
IS_VALID,
IS_AUDIT,
CREATOR_ID,
CREATE_TIME,
EDITOR_ID,
EDIT_TIME,
AUDITOR_ID,
AUDIT_TIME,
SERVICE_ID,
REQUEST_ID,
IS_AREA_EFFECTIVE,
CLASSIFY,
ATTRIBUTE,
LABLE,
AREA_EFFECTIVE_IDS,
function_id,
ip_type,
ip_address,
direction,
protocol,
location,
group_id,
compile_Id,
cfg_region_code,
user_region
)values (
#{cfgId,jdbcType=VARCHAR},
#{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},
#{isAreaEffective,jdbcType=INTEGER},
#{classify,jdbcType=VARCHAR},
#{attribute,jdbcType=VARCHAR},
#{lable,jdbcType=VARCHAR},
#{areaEffectiveIds,jdbcType=VARCHAR},
#{functionId,jdbcType=INTEGER},
#{ipType, jdbcType=INTEGER},
#{ipAddress, jdbcType=VARCHAR},
#{direction, jdbcType=INTEGER},
#{protocol, jdbcType=INTEGER},
0,
#{groupId, jdbcType=INTEGER},
#{compileId,jdbcType=INTEGER},
#{cfgRegionCode,jdbcType=INTEGER},
#{userRegion,jdbcType=VARCHAR}
)
</insert>
<update id="update" parameterType="com.nis.domain.configuration.PxyObjSpoofingIpPool" >
update pxy_obj_spoofing_ip_pool
<set >
<trim suffixOverrides=",">
<if test="cfgDesc != null and cfgDesc != ''" >
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
</if>
<if test="compileId != null " >
compile_Id = #{compileId,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="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="port != null and port!=''" >
port=#{port, jdbcType=VARCHAR},
</if>
<if test="ipType != null" >
ip_type=#{ipType, jdbcType=INTEGER},
</if>
<if test="ipAddress != null and ipAddress!=''" >
ip_address=#{ipAddress, jdbcType=VARCHAR},
</if>
<if test="groupId != null" >
group_id=#{groupId, jdbcType=INTEGER},
</if>
<if test="serviceId != null" >
service_id = #{serviceId,jdbcType=INTEGER},
</if>
<if test="userRegion != null and userRegion!=''" >
user_region=#{userRegion, jdbcType=VARCHAR},
</if>
</trim>
</set>
<where>
and cfg_id = #{cfgId,jdbcType=INTEGER}
<if test="functionId != null" >
and function_id = #{functionId,jdbcType=INTEGER}
</if>
</where>
</update>
</mapper>

View File

@@ -18,6 +18,7 @@ public interface RequestInfoDao extends CrudDao {
RequestInfo getRequestInfoByRequestNumber(@Param("requestNumber") String requestNumber);
RequestInfo getRequestInfoById(@Param("id") Long id);
List<RequestInfo> getRequestInfoByIds(@Param("ids") String ids);
int deleteByPrimaryKey(Long id);

View File

@@ -129,6 +129,33 @@
where r.is_valid!=-1 and r.is_audit !=3
and r.id = #{id,jdbcType=BIGINT}
</select>
<select id="getRequestInfoByIds" parameterType="java.lang.String" resultMap="BaseResultMap">
select
r.id AS id,
r.task_id AS taskId,
r.request_number AS requestNumber,
r.request_org AS requestOrg,
r.request_time AS requestTime,
r.request_title AS requestTitle,
r.request_content AS requestContent,
r.is_valid AS isValid,
r.is_audit AS isAudit,
s.name AS creatorName,
r.create_time AS createTime,
u.name AS editorName,
r.edit_time AS editTime,
e.name AS currentName,
e.name AS auditorName,
r.audit_time AS auditTime,
t.task_name AS taskName
from request_info r
left join sys_user s on r.creator_id=s.id
left join sys_user u on r.editor_id=u.id
left join sys_user e on r.auditor_id=e.id
left join task_info t on r.task_id=t.id
where r.is_valid!=-1 and r.is_audit !=3
and r.id in(${ids})
</select>
<!-- 新增 -->
<insert id="insert" parameterType="com.nis.domain.configuration.RequestInfo">
insert into request_info (

View File

@@ -14,6 +14,7 @@ public interface TaskInfoDao extends CrudDao<TaskInfo>{
TaskInfo getTaskInfoByTaskName(@Param("taskName") String taskName);
TaskInfo getTaskInfoById(@Param("id") Long id);
List<TaskInfo> getTaskInfoByIds(@Param("ids") String ids);
void delete(@Param("id") Long id);

View File

@@ -105,6 +105,13 @@
from task_info
where id = #{id,jdbcType=BIGINT}
</select>
<!-- 根据来id查询 -->
<select id="getTaskInfoByIds" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from task_info
where id in (${ids})
</select>
<insert id="insert" parameterType="com.nis.domain.configuration.TaskInfo">
insert into task_info (id, task_name, task_org,
task_time, task_desc, is_valid,