This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
galaxy-k18-galaxy-service/src/main/java/com/nis/web/dao/DfIpPortUdpDao.xml
zhangdongxu 13acafd43d 上传代码
2017-12-19 14:55:52 +08:00

240 lines
8.5 KiB
XML

<?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.DfIpPortUdpDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.DfIpPortUdp">
<id column="CFG_ID" jdbcType="BIGINT" property="cfgId" />
<result column="ADDR_TYPE" jdbcType="INTEGER" property="addrType" />
<result column="SRC_IP" jdbcType="VARCHAR" property="srcIp" />
<result column="MASK_SRC_IP" jdbcType="VARCHAR" property="maskSrcIp" />
<result column="SRC_PORT" jdbcType="VARCHAR" property="srcPort" />
<result column="MASK_SRC_PORT" jdbcType="VARCHAR" property="maskSrcPort" />
<result column="DST_IP" jdbcType="VARCHAR" property="dstIp" />
<result column="MASK_DST_IP" jdbcType="VARCHAR" property="maskDstIp" />
<result column="DST_PORT" jdbcType="VARCHAR" property="dstPort" />
<result column="MASK_DST_PORT" jdbcType="VARCHAR" property="maskDstPort" />
<result column="PROTOCOL" jdbcType="INTEGER" property="protocol" />
<result column="DIRECTION" jdbcType="INTEGER" property="direction" />
<result column="IS_VALID" jdbcType="INTEGER" property="isValid" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result property="lastUpdate" column="LAST_UPDATE"/>
<result property="effectiveRange" column="EFFECTIVE_RANGE"/>
<result property="activeSys" column="ACTIVE_SYS"/>
</resultMap>
<sql id="Base_Column_List">
CFG_ID, ADDR_TYPE, SRC_IP, MASK_SRC_IP, SRC_PORT, MASK_SRC_PORT, DST_IP, MASK_DST_IP,
DST_PORT, MASK_DST_PORT, PROTOCOL, DIRECTION, IS_VALID, OP_TIME,lastUpdate,effectiveRange,activeSys
</sql>
<!--
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from DF_IP_PORT_UDP
where CFG_ID = #{cfgId,jdbcType=BIGINT}
</select>
-->
<delete id="delete" parameterType="java.lang.Long">
delete from DF_IP_PORT_UDP
where CFG_ID = #{cfgId,jdbcType=BIGINT}
</delete>
<!--
<insert id="insert" parameterType="com.nis.domain.restful.DfIpPortUdp">
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_DF_IP_PORT_UDP.Nextval as ID from DUAL
</selectKey>
insert into DF_IP_PORT_UDP (CFG_ID, ADDR_TYPE, SRC_IP,
MASK_SRC_IP, SRC_PORT, MASK_SRC_PORT,
DST_IP, MASK_DST_IP, DST_PORT,
MASK_DST_PORT, PROTOCOL, DIRECTION,
IS_VALID, OP_TIME)
values (#{id,jdbcType=BIGINT}, #{addrType,jdbcType=INTEGER}, #{srcIp,jdbcType=VARCHAR},
#{maskSrcIp,jdbcType=VARCHAR}, #{srcPort,jdbcType=VARCHAR}, #{maskSrcPort,jdbcType=VARCHAR},
#{dstIp,jdbcType=VARCHAR}, #{maskDstIp,jdbcType=VARCHAR}, #{dstPort,jdbcType=VARCHAR},
#{maskDstPort,jdbcType=VARCHAR}, #{protocol,jdbcType=INTEGER}, #{direction,jdbcType=INTEGER},
#{isValid,jdbcType=INTEGER}, #{opTime,jdbcType=TIMESTAMP})
</insert>
-->
<insert id="insert" parameterType="com.nis.domain.restful.DfIpPortUdp">
<!--
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="cfgId">
SELECT SEQ_DF_IP_PORT_UDP.Nextval as ID from DUAL
</selectKey>
-->
insert into DF_IP_PORT_UDP
<trim prefix="(" suffix=")" suffixOverrides=",">
CFG_ID,
<if test="addrType != null">
ADDR_TYPE,
</if>
<if test="srcIp != null">
SRC_IP,
</if>
<if test="maskSrcIp != null">
MASK_SRC_IP,
</if>
<if test="srcPort != null">
SRC_PORT,
</if>
<if test="maskSrcPort != null">
MASK_SRC_PORT,
</if>
<if test="dstIp != null">
DST_IP,
</if>
<if test="maskDstIp != null">
MASK_DST_IP,
</if>
<if test="dstPort != null">
DST_PORT,
</if>
<if test="maskDstPort != null">
MASK_DST_PORT,
</if>
<if test="protocol != null">
PROTOCOL,
</if>
<if test="direction != null">
DIRECTION,
</if>
<if test="isValid != null">
IS_VALID,
</if>
<if test="opTime != null">
OP_TIME,
</if>
<if test="opTime != null">
LAST_UPDATE,
</if>
<if test="effectiveRange != null">
EFFECTIVE_RANGE,
</if>
<if test="activeSys != null">
ACTIVE_SYS,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
#{cfgId,jdbcType=BIGINT},
<if test="addrType != null">
#{addrType,jdbcType=INTEGER},
</if>
<if test="srcIp != null">
#{srcIp,jdbcType=VARCHAR},
</if>
<if test="maskSrcIp != null">
#{maskSrcIp,jdbcType=VARCHAR},
</if>
<if test="srcPort != null">
#{srcPort,jdbcType=VARCHAR},
</if>
<if test="maskSrcPort != null">
#{maskSrcPort,jdbcType=VARCHAR},
</if>
<if test="dstIp != null">
#{dstIp,jdbcType=VARCHAR},
</if>
<if test="maskDstIp != null">
#{maskDstIp,jdbcType=VARCHAR},
</if>
<if test="dstPort != null">
#{dstPort,jdbcType=VARCHAR},
</if>
<if test="maskDstPort != null">
#{maskDstPort,jdbcType=VARCHAR},
</if>
<if test="protocol != null">
#{protocol,jdbcType=INTEGER},
</if>
<if test="direction != null">
#{direction,jdbcType=INTEGER},
</if>
<if test="isValid != null">
#{isValid,jdbcType=INTEGER},
</if>
<if test="opTime != null">
#{opTime,jdbcType=TIMESTAMP},
</if>
<if test="lastUpdate != null">
#{lastUpdate,jdbcType=TIMESTAMP},
</if>
<if test="effectiveRange != null">
#{effectiveRange,jdbcType=VARCHAR},
</if>
<if test="activeSys != null">
#{activeSys,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="update" parameterType="com.nis.domain.restful.DfIpPortUdp">
update DF_IP_PORT_UDP
<set>
<if test="addrType != null">
ADDR_TYPE = #{addrType,jdbcType=INTEGER},
</if>
<if test="srcIp != null">
SRC_IP = #{srcIp,jdbcType=VARCHAR},
</if>
<if test="maskSrcIp != null">
MASK_SRC_IP = #{maskSrcIp,jdbcType=VARCHAR},
</if>
<if test="srcPort != null">
SRC_PORT = #{srcPort,jdbcType=VARCHAR},
</if>
<if test="maskSrcPort != null">
MASK_SRC_PORT = #{maskSrcPort,jdbcType=VARCHAR},
</if>
<if test="dstIp != null">
DST_IP = #{dstIp,jdbcType=VARCHAR},
</if>
<if test="maskDstIp != null">
MASK_DST_IP = #{maskDstIp,jdbcType=VARCHAR},
</if>
<if test="dstPort != null">
DST_PORT = #{dstPort,jdbcType=VARCHAR},
</if>
<if test="maskDstPort != null">
MASK_DST_PORT = #{maskDstPort,jdbcType=VARCHAR},
</if>
<if test="protocol != null">
PROTOCOL = #{protocol,jdbcType=INTEGER},
</if>
<if test="direction != null">
DIRECTION = #{direction,jdbcType=INTEGER},
</if>
<if test="isValid != null">
IS_VALID = #{isValid,jdbcType=INTEGER},
</if>
<if test="opTime != null">
OP_TIME = #{opTime,jdbcType=TIMESTAMP},
</if>
<if test="lastUpdate != null">
LAST_UPDATE = #{lastUpdate,jdbcType=TIMESTAMP},
</if>
<if test="effectiveRange != null">
EFFECTIVE_RANGE=#{effectiveRange,jdbcType=VARCHAR},
</if>
<if test="activeSys != null">
ACTIVE_SYS=#{activeSys,jdbcType=INTEGER},
</if>
</set>
where CFG_ID = #{cfgId,jdbcType=BIGINT}
</update>
<!--
<update id="updateByPrimaryKey" parameterType="com.nis.domain.restful.DfIpPortUdp">
update DF_IP_PORT_UDP
set ADDR_TYPE = #{addrType,jdbcType=INTEGER},
SRC_IP = #{srcIp,jdbcType=VARCHAR},
MASK_SRC_IP = #{maskSrcIp,jdbcType=VARCHAR},
SRC_PORT = #{srcPort,jdbcType=VARCHAR},
MASK_SRC_PORT = #{maskSrcPort,jdbcType=VARCHAR},
DST_IP = #{dstIp,jdbcType=VARCHAR},
MASK_DST_IP = #{maskDstIp,jdbcType=VARCHAR},
DST_PORT = #{dstPort,jdbcType=VARCHAR},
MASK_DST_PORT = #{maskDstPort,jdbcType=VARCHAR},
PROTOCOL = #{protocol,jdbcType=INTEGER},
DIRECTION = #{direction,jdbcType=INTEGER},
IS_VALID = #{isValid,jdbcType=INTEGER},
OP_TIME = #{opTime,jdbcType=TIMESTAMP}
where CFG_ID = #{cfgId,jdbcType=BIGINT}
</update>
-->
</mapper>