|
|
@@ -0,0 +1,125 @@
|
|
|
+<?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.usoftchina.saas.document.mapper.ProducttypeMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Producttype">
|
|
|
+ <id column="pt_id" jdbcType="INTEGER" property="id" />
|
|
|
+ <result column="pt_name" jdbcType="VARCHAR" property="pt_name" />
|
|
|
+ <result column="pt_recordid" jdbcType="INTEGER" property="pt_recordid" />
|
|
|
+ <result column="pt_recorder" jdbcType="VARCHAR" property="pt_recorder" />
|
|
|
+ <result column="pt_date" jdbcType="TIMESTAMP" property="pt_date" />
|
|
|
+ <result column="companyId" jdbcType="INTEGER" property="companyId" />
|
|
|
+ <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
|
|
|
+ <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ pt_id, pt_name, pt_recordid, pt_recorder, pt_date, companyId, updaterId, updateTime
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from producttype
|
|
|
+ where pt_id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
+ delete from producttype
|
|
|
+ where pt_id = #{id}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Producttype">
|
|
|
+ insert into producttype (pt_name, pt_recordid,
|
|
|
+ pt_recorder, pt_date, companyId,
|
|
|
+ updaterId, updateTime)
|
|
|
+ values (#{pt_name,jdbcType=VARCHAR}, #{pt_recordid,jdbcType=INTEGER},
|
|
|
+ #{pt_recorder,jdbcType=VARCHAR}, #{pt_date,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER},
|
|
|
+ #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Producttype">
|
|
|
+ insert into producttype
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="pt_name != null">
|
|
|
+ pt_name,
|
|
|
+ </if>
|
|
|
+ <if test="pt_recordid != null">
|
|
|
+ pt_recordid,
|
|
|
+ </if>
|
|
|
+ <if test="pt_recorder != null">
|
|
|
+ pt_recorder,
|
|
|
+ </if>
|
|
|
+ <if test="pt_date != null">
|
|
|
+ pt_date,
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null">
|
|
|
+ companyId,
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null">
|
|
|
+ updaterId,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ updateTime,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="pt_name != null">
|
|
|
+ #{pt_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pt_recordid != null">
|
|
|
+ #{pt_recordid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="pt_recorder != null">
|
|
|
+ #{pt_recorder,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pt_date != null">
|
|
|
+ #{pt_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null">
|
|
|
+ #{companyId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null">
|
|
|
+ #{updaterId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Producttype">
|
|
|
+ update producttype
|
|
|
+ <set>
|
|
|
+ <if test="pt_name != null">
|
|
|
+ pt_name = #{pt_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pt_recordid != null">
|
|
|
+ pt_recordid = #{pt_recordid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="pt_recorder != null">
|
|
|
+ pt_recorder = #{pt_recorder,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="pt_date != null">
|
|
|
+ pt_date = #{pt_date,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null">
|
|
|
+ companyId = #{companyId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null">
|
|
|
+ updaterId = #{updaterId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where pt_id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Producttype">
|
|
|
+ update producttype
|
|
|
+ set pt_name = #{pt_name,jdbcType=VARCHAR},
|
|
|
+ pt_recordid = #{pt_recordid,jdbcType=INTEGER},
|
|
|
+ pt_recorder = #{pt_recorder,jdbcType=VARCHAR},
|
|
|
+ pt_date = #{pt_date,jdbcType=TIMESTAMP},
|
|
|
+ companyId = #{companyId,jdbcType=INTEGER},
|
|
|
+ updaterId = #{updaterId,jdbcType=INTEGER},
|
|
|
+ updateTime = #{updateTime,jdbcType=TIMESTAMP}
|
|
|
+ where pt_id = #{id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <select id="selectAll" resultMap="com.usoftchina.saas.document.entities.Producttype">
|
|
|
+ SELECT * FROM PRODUCTTYPE
|
|
|
+ </select>
|
|
|
+</mapper>
|