|
|
@@ -0,0 +1,182 @@
|
|
|
+<?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.AddressMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Address">
|
|
|
+ <id column="ad_id" jdbcType="INTEGER" property="ad_id" />
|
|
|
+ <result column="ad_recorddate" jdbcType="TIMESTAMP" property="ad_recorddate" />
|
|
|
+ <result column="companyId" jdbcType="INTEGER" property="companyId" />
|
|
|
+ <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
|
|
|
+ <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
+ <result column="ad_text1" jdbcType="VARCHAR" property="ad_text1" />
|
|
|
+ <result column="ad_text2" jdbcType="VARCHAR" property="ad_text2" />
|
|
|
+ <result column="ad_text3" jdbcType="VARCHAR" property="ad_text3" />
|
|
|
+ <result column="ad_text4" jdbcType="VARCHAR" property="ad_text4" />
|
|
|
+ <result column="ad_text5" jdbcType="VARCHAR" property="ad_text5" />
|
|
|
+ </resultMap>
|
|
|
+ <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.document.entities.Address">
|
|
|
+ <result column="ad_address" jdbcType="LONGVARCHAR" property="ad_address" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ ad_id, ad_recorddate, companyId, updaterId, updateTime, ad_text1, ad_text2, ad_text3,
|
|
|
+ ad_text4, ad_text5
|
|
|
+ </sql>
|
|
|
+ <sql id="Blob_Column_List">
|
|
|
+ ad_address
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Address">
|
|
|
+ insert into address (ad_id, ad_recorddate, companyId,
|
|
|
+ updaterId, updateTime, ad_text1,
|
|
|
+ ad_text2, ad_text3, ad_text4,
|
|
|
+ ad_text5, ad_address)
|
|
|
+ values (#{ad_id,jdbcType=INTEGER}, #{ad_recorddate,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER},
|
|
|
+ #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{ad_text1,jdbcType=VARCHAR},
|
|
|
+ #{ad_text2,jdbcType=VARCHAR}, #{ad_text3,jdbcType=VARCHAR}, #{ad_text4,jdbcType=VARCHAR},
|
|
|
+ #{ad_text5,jdbcType=VARCHAR}, #{ad_address,jdbcType=LONGVARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Address">
|
|
|
+ insert into address
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="ad_id != null">
|
|
|
+ ad_id,
|
|
|
+ </if>
|
|
|
+ <if test="ad_recorddate != null">
|
|
|
+ ad_recorddate,
|
|
|
+ </if>
|
|
|
+ <if test="companyId != null">
|
|
|
+ companyId,
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null">
|
|
|
+ updaterId,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ updateTime,
|
|
|
+ </if>
|
|
|
+ <if test="ad_text1 != null">
|
|
|
+ ad_text1,
|
|
|
+ </if>
|
|
|
+ <if test="ad_text2 != null">
|
|
|
+ ad_text2,
|
|
|
+ </if>
|
|
|
+ <if test="ad_text3 != null">
|
|
|
+ ad_text3,
|
|
|
+ </if>
|
|
|
+ <if test="ad_text4 != null">
|
|
|
+ ad_text4,
|
|
|
+ </if>
|
|
|
+ <if test="ad_text5 != null">
|
|
|
+ ad_text5,
|
|
|
+ </if>
|
|
|
+ <if test="ad_address != null">
|
|
|
+ ad_address,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="ad_id != null">
|
|
|
+ #{ad_id,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="ad_recorddate != null">
|
|
|
+ #{ad_recorddate,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>
|
|
|
+ <if test="ad_text1 != null">
|
|
|
+ #{ad_text1,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ad_text2 != null">
|
|
|
+ #{ad_text2,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ad_text3 != null">
|
|
|
+ #{ad_text3,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ad_text4 != null">
|
|
|
+ #{ad_text4,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ad_text5 != null">
|
|
|
+ #{ad_text5,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ad_address != null">
|
|
|
+ #{ad_address,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Address">
|
|
|
+ update address
|
|
|
+ <set>
|
|
|
+ <if test="ad_recorddate != null">
|
|
|
+ ad_recorddate = #{ad_recorddate,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>
|
|
|
+ <if test="ad_text1 != null">
|
|
|
+ ad_text1 = #{ad_text1,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ad_text2 != null">
|
|
|
+ ad_text2 = #{ad_text2,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ad_text3 != null">
|
|
|
+ ad_text3 = #{ad_text3,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ad_text4 != null">
|
|
|
+ ad_text4 = #{ad_text4,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ad_text5 != null">
|
|
|
+ ad_text5 = #{ad_text5,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="ad_address != null">
|
|
|
+ ad_address = #{ad_address,jdbcType=LONGVARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where ad_id = #{ad_id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.document.entities.Address">
|
|
|
+ update address
|
|
|
+ set ad_recorddate = #{ad_recorddate,jdbcType=TIMESTAMP},
|
|
|
+ companyId = #{companyId,jdbcType=INTEGER},
|
|
|
+ updaterId = #{updaterId,jdbcType=INTEGER},
|
|
|
+ updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ ad_text1 = #{ad_text1,jdbcType=VARCHAR},
|
|
|
+ ad_text2 = #{ad_text2,jdbcType=VARCHAR},
|
|
|
+ ad_text3 = #{ad_text3,jdbcType=VARCHAR},
|
|
|
+ ad_text4 = #{ad_text4,jdbcType=VARCHAR},
|
|
|
+ ad_text5 = #{ad_text5,jdbcType=VARCHAR},
|
|
|
+ ad_address = #{ad_address,jdbcType=LONGVARCHAR}
|
|
|
+ where ad_id = #{ad_id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Address">
|
|
|
+ update address
|
|
|
+ set ad_recorddate = #{ad_recorddate,jdbcType=TIMESTAMP},
|
|
|
+ companyId = #{companyId,jdbcType=INTEGER},
|
|
|
+ updaterId = #{updaterId,jdbcType=INTEGER},
|
|
|
+ updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ ad_text1 = #{ad_text1,jdbcType=VARCHAR},
|
|
|
+ ad_text2 = #{ad_text2,jdbcType=VARCHAR},
|
|
|
+ ad_text3 = #{ad_text3,jdbcType=VARCHAR},
|
|
|
+ ad_text4 = #{ad_text4,jdbcType=VARCHAR},
|
|
|
+ ad_text5 = #{ad_text5,jdbcType=VARCHAR}
|
|
|
+ where ad_id = #{ad_id,jdbcType=INTEGER}
|
|
|
+ </update>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
+ delete from address
|
|
|
+ where ad_id = #{ad_id,jdbcType=INTEGER}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteByIds" parameterType="java.lang.String">
|
|
|
+ delete from address
|
|
|
+ where ad_id in (#{ids,jdbcType=VARCHAR})
|
|
|
+ </delete>
|
|
|
+
|
|
|
+</mapper>
|