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
k18-ntcs-web-argus-service/src/main/java/com/nis/web/dao/DmbPortDao.xml
zhangdongxu 13acafd43d 上传代码
2017-12-19 14:55:52 +08:00

176 lines
6.1 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.DmbPortDao">
<resultMap id="BaseResultMap" type="com.nis.domain.restful.DmbPort">
<id column="ID" jdbcType="BIGINT" property="id" />
<result column="ENTRANCE_ID" jdbcType="BIGINT" property="entranceId" />
<result column="PORT_NAME" jdbcType="VARCHAR" property="portName" />
<result column="IS_USED" jdbcType="INTEGER" property="isUsed" />
<result column="IP_DZ" jdbcType="VARCHAR" property="ipDz" />
<result column="PORT_EQUIPMENT" jdbcType="VARCHAR" property="portEquipment" />
<result column="ODF_PORT" jdbcType="VARCHAR" property="odfPort" />
<result column="ADDR" jdbcType="VARCHAR" property="addr" />
<result column="CK_PORT" jdbcType="VARCHAR" property="ckPort" />
<result column="CZYID" jdbcType="BIGINT" property="czyid" />
<result column="OP_TIME" jdbcType="TIMESTAMP" property="opTime" />
<result property="lastUpdate" jdbcType="TIMESTAMP" column="LAST_UPDATE"/>
</resultMap>
<sql id="Base_Column_List">
ID, ENTRANCE_ID, PORT_NAME, IS_USED, IP_DZ, PORT_EQUIPMENT, ODF_PORT, ADDR, CK_PORT,
CZYID, OP_TIME,LAST_UPDATE
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from DMB_PORT
where ID = #{id,jdbcType=BIGINT}
</select>
<delete id="delete" parameterType="java.lang.Long">
delete from DMB_PORT
where ID = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="com.nis.domain.restful.DmbPort">
<!--
<selectKey resultType="java.lang.Long" order="BEFORE" keyProperty="id">
SELECT SEQ_DMB_PORT.Nextval as ID from DUAL
</selectKey> -->
insert into DMB_PORT (ID, ENTRANCE_ID, PORT_NAME,
IS_USED, IP_DZ, PORT_EQUIPMENT,
ODF_PORT, ADDR, CK_PORT,
CZYID, OP_TIME,LAST_UPDATE)
values (#{id,jdbcType=BIGINT}, #{entranceId,jdbcType=BIGINT}, #{portName,jdbcType=VARCHAR},
#{isUsed,jdbcType=INTEGER}, #{ipDz,jdbcType=VARCHAR}, #{portEquipment,jdbcType=VARCHAR},
#{odfPort,jdbcType=VARCHAR}, #{addr,jdbcType=VARCHAR}, #{ckPort,jdbcType=VARCHAR},
#{czyid,jdbcType=BIGINT}, #{opTime,jdbcType=TIMESTAMP}, #{lastUpdate,jdbcType=TIMESTAMP})
</insert>
<!--
<insert id="insertSelective" parameterType="com.nis.domain.restful.DmbPort">
insert into DMB_PORT
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
ID,
</if>
<if test="entranceId != null">
ENTRANCE_ID,
</if>
<if test="portName != null">
PORT_NAME,
</if>
<if test="isUsed != null">
IS_USED,
</if>
<if test="ipDz != null">
IP_DZ,
</if>
<if test="portEquipment != null">
PORT_EQUIPMENT,
</if>
<if test="odfPort != null">
ODF_PORT,
</if>
<if test="addr != null">
ADDR,
</if>
<if test="ckPort != null">
CK_PORT,
</if>
<if test="czyid != null">
CZYID,
</if>
<if test="opTime != null">
OP_TIME,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="entranceId != null">
#{entranceId,jdbcType=BIGINT},
</if>
<if test="portName != null">
#{portName,jdbcType=VARCHAR},
</if>
<if test="isUsed != null">
#{isUsed,jdbcType=INTGER},
</if>
<if test="ipDz != null">
#{ipDz,jdbcType=VARCHAR},
</if>
<if test="portEquipment != null">
#{portEquipment,jdbcType=VARCHAR},
</if>
<if test="odfPort != null">
#{odfPort,jdbcType=VARCHAR},
</if>
<if test="addr != null">
#{addr,jdbcType=VARCHAR},
</if>
<if test="ckPort != null">
#{ckPort,jdbcType=VARCHAR},
</if>
<if test="czyid != null">
#{czyid,jdbcType=BIGINT},
</if>
<if test="opTime != null">
#{opTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
-->
<update id="update" parameterType="com.nis.domain.restful.DmbPort">
update DMB_PORT
<set>
<if test="entranceId != null">
ENTRANCE_ID = #{entranceId,jdbcType=BIGINT},
</if>
<if test="portName != null">
PORT_NAME = #{portName,jdbcType=VARCHAR},
</if>
<if test="isUsed != null">
IS_USED = #{isUsed,jdbcType=INTEGER},
</if>
<if test="ipDz != null">
IP_DZ = #{ipDz,jdbcType=VARCHAR},
</if>
<if test="portEquipment != null">
PORT_EQUIPMENT = #{portEquipment,jdbcType=VARCHAR},
</if>
<if test="odfPort != null">
ODF_PORT = #{odfPort,jdbcType=VARCHAR},
</if>
<if test="addr != null">
ADDR = #{addr,jdbcType=VARCHAR},
</if>
<if test="ckPort != null">
CK_PORT = #{ckPort,jdbcType=VARCHAR},
</if>
<if test="czyid != null">
CZYID = #{czyid,jdbcType=BIGINT},
</if>
<if test="opTime != null">
OP_TIME = #{opTime,jdbcType=TIMESTAMP},
</if>
<if test="lastUpdate != null">
LAST_UPDATE = #{lastUpdate,jdbcType=TIMESTAMP},
</if>
</set>
where ID = #{id,jdbcType=BIGINT}
</update>
<!--
<update id="updateByPrimaryKey" parameterType="com.nis.domain.restful.DmbPort">
update DMB_PORT
set ENTRANCE_ID = #{entranceId,jdbcType=BIGINT},
PORT_NAME = #{portName,jdbcType=VARCHAR},
IS_USED = #{isUsed,jdbcType=INTEGER},
IP_DZ = #{ipDz,jdbcType=VARCHAR},
PORT_EQUIPMENT = #{portEquipment,jdbcType=VARCHAR},
ODF_PORT = #{odfPort,jdbcType=VARCHAR},
ADDR = #{addr,jdbcType=VARCHAR},
CK_PORT = #{ckPort,jdbcType=VARCHAR},
CZYID = #{czyid,jdbcType=BIGINT},
OP_TIME = #{opTime,jdbcType=TIMESTAMP}
where ID = #{id,jdbcType=BIGINT}
</update>
-->
</mapper>