|
|
@@ -0,0 +1,123 @@
|
|
|
+<?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.goafanti.common.dao.StandardDocumentMapper">
|
|
|
+
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.StandardDocument">
|
|
|
+ <id property="id" column="id" jdbcType="INTEGER"/>
|
|
|
+ <result property="url" column="url" jdbcType="VARCHAR"/>
|
|
|
+ <result property="serialNumber" column="serial_number" jdbcType="VARCHAR"/>
|
|
|
+ <result property="name" column="name" jdbcType="VARCHAR"/>
|
|
|
+ <result property="reference" column="reference" jdbcType="VARCHAR"/>
|
|
|
+ <result property="depId" column="dep_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="aid" column="aid" jdbcType="VARCHAR"/>
|
|
|
+ <result property="status" column="status" jdbcType="INTEGER"/>
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id,url,serial_number,
|
|
|
+ name,reference,dep_id,
|
|
|
+ aid,status,create_time,
|
|
|
+ update_time
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from standard_document
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
|
+ delete from standard_document
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.StandardDocument" useGeneratedKeys="true">
|
|
|
+ insert into standard_document
|
|
|
+ ( id,url,serial_number
|
|
|
+ ,name,reference,dep_id
|
|
|
+ ,aid,status,create_time
|
|
|
+ ,update_time)
|
|
|
+ values (#{id,jdbcType=INTEGER},#{url,jdbcType=VARCHAR},#{serialNumber,jdbcType=VARCHAR}
|
|
|
+ ,#{name,jdbcType=VARCHAR},#{reference,jdbcType=VARCHAR},#{depId,jdbcType=VARCHAR}
|
|
|
+ ,#{aid,jdbcType=VARCHAR},#{status,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP}
|
|
|
+ ,#{updateTime,jdbcType=TIMESTAMP})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.StandardDocument" useGeneratedKeys="true">
|
|
|
+ insert into standard_document
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="url != null">url,</if>
|
|
|
+ <if test="serialNumber != null">serial_number,</if>
|
|
|
+ <if test="name != null">name,</if>
|
|
|
+ <if test="reference != null">reference,</if>
|
|
|
+ <if test="depId != null">dep_id,</if>
|
|
|
+ <if test="aid != null">aid,</if>
|
|
|
+ <if test="status != null">status,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id,jdbcType=INTEGER},</if>
|
|
|
+ <if test="url != null">#{url,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="serialNumber != null">#{serialNumber,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="name != null">#{name,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="reference != null">#{reference,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="depId != null">#{depId,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="aid != null">#{aid,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="status != null">#{status,jdbcType=INTEGER},</if>
|
|
|
+ <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.StandardDocument">
|
|
|
+ update standard_document
|
|
|
+ <set>
|
|
|
+ <if test="url != null">
|
|
|
+ url = #{url,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="serialNumber != null">
|
|
|
+ serial_number = #{serialNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="reference != null">
|
|
|
+ reference = #{reference,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="depId != null">
|
|
|
+ dep_id = #{depId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="aid != null">
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.StandardDocument">
|
|
|
+ update standard_document
|
|
|
+ set
|
|
|
+ url = #{url,jdbcType=VARCHAR},
|
|
|
+ serial_number = #{serialNumber,jdbcType=VARCHAR},
|
|
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
+ reference = #{reference,jdbcType=VARCHAR},
|
|
|
+ dep_id = #{depId,jdbcType=VARCHAR},
|
|
|
+ aid = #{aid,jdbcType=VARCHAR},
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
|
+ where id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+</mapper>
|