| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293 |
- <?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.CustomeraddressMapper">
- <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Customeraddress">
- <id column="ca_id" jdbcType="INTEGER" property="id" />
- <result column="ca_cuid" jdbcType="INTEGER" property="ca_cuid" />
- <result column="ca_detno" jdbcType="INTEGER" property="ca_detno" />
- <result column="ca_person" jdbcType="VARCHAR" property="ca_person" />
- <result column="ca_phone" jdbcType="VARCHAR" property="ca_phone" />
- <result column="ca_default" jdbcType="INTEGER" property="ca_default" />
- <result column="companyid" jdbcType="INTEGER" property="companyId" />
- <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
- <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="ca_text1" jdbcType="VARCHAR" property="ca_text1" />
- <result column="ca_text2" jdbcType="VARCHAR" property="ca_text2" />
- <result column="ca_text3" jdbcType="VARCHAR" property="ca_text3" />
- <result column="ca_text4" jdbcType="VARCHAR" property="ca_text4" />
- <result column="ca_text5" jdbcType="VARCHAR" property="ca_text5" />
- </resultMap>
- <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.document.entities.Customeraddress">
- <result column="ca_address" jdbcType="LONGVARCHAR" property="ca_address" />
- </resultMap>
- <sql id="Base_Column_List">
- ca_id, ca_cuid, ca_detno, ca_person, ca_phone, ca_default, companyid, updaterid,
- updatetime, ca_text1, ca_text2, ca_text3, ca_text4, ca_text5
- </sql>
- <sql id="Blob_Column_List">
- ca_address
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
- select
- *
- from customeraddress
- where ca_id = #{ca_id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
- delete from customeraddress
- where ca_id = #{ca_id,jdbcType=INTEGER}
- </delete>
- <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
- <selectKey resultType="java.lang.Long" keyProperty="id">
- SELECT LAST_INSERT_ID() AS ID
- </selectKey>
- insert into customeraddress
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="ca_cuid != null">
- ca_cuid,
- </if>
- <if test="ca_detno != null">
- ca_detno,
- </if>
- <if test="ca_person != null">
- ca_person,
- </if>
- <if test="ca_phone != null">
- ca_phone,
- </if>
- <if test="ca_default != null">
- ca_default,
- </if>
- <if test="companyId != null">
- companyid,
- </if>
- <if test="updaterId != null">
- updaterid,
- </if>
- <if test="updateTime != null">
- updatetime,
- </if>
- <if test="ca_text1 != null">
- ca_text1,
- </if>
- <if test="ca_text2 != null">
- ca_text2,
- </if>
- <if test="ca_text3 != null">
- ca_text3,
- </if>
- <if test="ca_text4 != null">
- ca_text4,
- </if>
- <if test="ca_text5 != null">
- ca_text5,
- </if>
- <if test="ca_address != null">
- ca_address,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="ca_cuid != null">
- #{ca_cuid,jdbcType=INTEGER},
- </if>
- <if test="ca_detno != null">
- #{ca_detno,jdbcType=INTEGER},
- </if>
- <if test="ca_person != null">
- #{ca_person,jdbcType=VARCHAR},
- </if>
- <if test="ca_phone != null">
- #{ca_phone,jdbcType=VARCHAR},
- </if>
- <if test="ca_default != null">
- #{ca_default,jdbcType=INTEGER},
- </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="ca_text1 != null">
- #{ca_text1,jdbcType=VARCHAR},
- </if>
- <if test="ca_text2 != null">
- #{ca_text2,jdbcType=VARCHAR},
- </if>
- <if test="ca_text3 != null">
- #{ca_text3,jdbcType=VARCHAR},
- </if>
- <if test="ca_text4 != null">
- #{ca_text4,jdbcType=VARCHAR},
- </if>
- <if test="ca_text5 != null">
- #{ca_text5,jdbcType=VARCHAR},
- </if>
- <if test="ca_address != null">
- #{ca_address,jdbcType=LONGVARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
- update customeraddress
- <set>
- <if test="id != null">
- ca_cuid = #{id,jdbcType=INTEGER},
- </if>
- <if test="ca_detno != null">
- ca_detno = #{ca_detno,jdbcType=INTEGER},
- </if>
- <if test="ca_person != null">
- ca_person = #{ca_person,jdbcType=VARCHAR},
- </if>
- <if test="ca_phone != null">
- ca_phone = #{ca_phone,jdbcType=VARCHAR},
- </if>
- <if test="ca_default != null">
- ca_default = #{ca_default,jdbcType=INTEGER},
- </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="ca_text1 != null">
- ca_text1 = #{ca_text1,jdbcType=VARCHAR},
- </if>
- <if test="ca_text2 != null">
- ca_text2 = #{ca_text2,jdbcType=VARCHAR},
- </if>
- <if test="ca_text3 != null">
- ca_text3 = #{ca_text3,jdbcType=VARCHAR},
- </if>
- <if test="ca_text4 != null">
- ca_text4 = #{ca_text4,jdbcType=VARCHAR},
- </if>
- <if test="ca_text5 != null">
- ca_text5 = #{ca_text5,jdbcType=VARCHAR},
- </if>
- <if test="ca_address != null">
- ca_address = #{ca_address,jdbcType=LONGVARCHAR},
- </if>
- </set>
- where ca_id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.document.entities.Customeraddress">
- update customeraddress
- set ca_cuid = #{ca_cuid,jdbcType=INTEGER},
- ca_detno = #{ca_detno,jdbcType=INTEGER},
- ca_person = #{ca_person,jdbcType=VARCHAR},
- ca_phone = #{ca_phone,jdbcType=VARCHAR},
- ca_default = #{ca_default,jdbcType=INTEGER},
- companyid = #{companyId,jdbcType=INTEGER},
- updaterid = #{updaterId,jdbcType=INTEGER},
- updatetime = #{updateTime,jdbcType=TIMESTAMP},
- ca_text1 = #{ca_text1,jdbcType=VARCHAR},
- ca_text2 = #{ca_text2,jdbcType=VARCHAR},
- ca_text3 = #{ca_text3,jdbcType=VARCHAR},
- ca_text4 = #{ca_text4,jdbcType=VARCHAR},
- ca_text5 = #{ca_text5,jdbcType=VARCHAR},
- ca_address = #{ca_address,jdbcType=LONGVARCHAR}
- where ca_id = #{id,jdbcType=INTEGER}
- </update>
- <select id="selectByFK" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
- select
- <include refid="Base_Column_List" />
- ,
- <include refid="Blob_Column_List" />
- from customeraddress
- where ca_cuid = #{fk_i,jdbcType=INTEGER}
- </select>
- <insert id="batchInsert" parameterType="java.util.List" >
- insert into customeraddress
- (ca_cuid,ca_detno,ca_person,ca_address,ca_phone,
- ca_default,companyid,updaterid,updatetime,ca_text1,
- ca_text2,ca_text3,ca_text4,ca_text5) VALUES
- <foreach collection="list" item="item" index="index" open="" close="" separator=",">
- (
- #{item.ca_cuid,jdbcType=INTEGER},
- #{item.ca_detno,jdbcType=INTEGER},
- #{item.ca_person,jdbcType=VARCHAR},
- #{item.ca_address,jdbcType=LONGVARCHAR},
- #{item.ca_phone,jdbcType=VARCHAR},
- #{item.ca_default,jdbcType=INTEGER},
- #{item.companyId,jdbcType=INTEGER},
- #{item.updaterId,jdbcType=INTEGER},
- #{item.updateTime,jdbcType=TIMESTAMP},
- #{item.ca_text1,jdbcType=VARCHAR},
- #{item.ca_text2,jdbcType=VARCHAR},
- #{item.ca_text3,jdbcType=VARCHAR},
- #{item.ca_text4,jdbcType=VARCHAR},
- #{item.ca_text5,jdbcType=VARCHAR}
- )
- </foreach>
- </insert>
- <update id="batchUpdate" parameterType="com.usoftchina.saas.document.entities.Customeraddress" >
- <foreach collection="list" item="item" index="index" open="" close="" separator=";">
- update customeraddress
- <set>
- <if test="item.ca_detno != null">
- ca_detno = #{item.ca_detno,jdbcType=INTEGER},
- </if>
- <if test="item.ca_person != null">
- ca_person = #{item.ca_person,jdbcType=VARCHAR},
- </if>
- <if test="item.ca_phone != null">
- ca_phone = #{item.ca_phone,jdbcType=VARCHAR},
- </if>
- <if test="item.ca_default != null">
- ca_default = #{item.ca_default,jdbcType=INTEGER},
- </if>
- <if test="item.companyId != null">
- companyid = #{item.companyId,jdbcType=INTEGER},
- </if>
- <if test="item.updaterId != null">
- updaterid = #{item.updaterId,jdbcType=INTEGER},
- </if>
- <if test="item.updateTime != null">
- updatetime = #{item.updateTime,jdbcType=TIMESTAMP},
- </if>
- <if test="item.ca_text1 != null">
- ca_text1 = #{item.ca_text1,jdbcType=VARCHAR},
- </if>
- <if test="item.ca_text2 != null">
- ca_text2 = #{item.ca_text2,jdbcType=VARCHAR},
- </if>
- <if test="item.ca_text3 != null">
- ca_text3 = #{item.ca_text3,jdbcType=VARCHAR},
- </if>
- <if test="item.ca_text4 != null">
- ca_text4 = #{item.ca_text4,jdbcType=VARCHAR},
- </if>
- <if test="item.ca_text5 != null">
- ca_text5 = #{item.ca_text5,jdbcType=VARCHAR},
- </if>
- <if test="item.ca_address != null">
- ca_address = #{item.ca_address,jdbcType=LONGVARCHAR},
- </if>
- </set>
- where ca_id = #{item.id,jdbcType=INTEGER}
- </foreach>
- </update>
- <delete id="deleteByFK" parameterType="java.lang.Long">
- delete from customeraddress
- where ca_cuid = #{id,jdbcType=INTEGER}
- </delete>
- </mapper>
|