|
|
@@ -0,0 +1,156 @@
|
|
|
+<?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.commons.mapper.EnterpriseMapper" >
|
|
|
+ <resultMap id="BaseResultMap" type="com.usoftchina.saas.commons.po.Enterprise" >
|
|
|
+ <id column="companyId" property="companyId" jdbcType="INTEGER" />
|
|
|
+ <result column="en_name" property="en_name" jdbcType="VARCHAR" />
|
|
|
+ <result column="en_address" property="en_address" jdbcType="VARCHAR" />
|
|
|
+ <result column="en_tel" property="en_tel" jdbcType="VARCHAR" />
|
|
|
+ <result column="en_fax" property="en_fax" jdbcType="VARCHAR" />
|
|
|
+ <result column="en_postcodes" property="en_postcodes" jdbcType="VARCHAR" />
|
|
|
+ <result column="en_begindate" property="en_begindate" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="en_pricemethod" property="en_pricemethod" jdbcType="VARCHAR" />
|
|
|
+ <result column="en_recorderid" property="en_recorderid" jdbcType="INTEGER" />
|
|
|
+ <result column="en_recorder" property="en_recorder" jdbcType="VARCHAR" />
|
|
|
+ <result column="en_recorddate" property="en_recorddate" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
|
+ <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
+ </resultMap>
|
|
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap">
|
|
|
+ SELECT * FROM ENTERPRISE WHERE companyId=#{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.Enterprise" >
|
|
|
+ <selectKey resultType="java.lang.Long" keyProperty="id">
|
|
|
+ SELECT LAST_INSERT_ID() AS ID
|
|
|
+ </selectKey>
|
|
|
+ insert into enterprise
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="en_name != null" >
|
|
|
+ en_name,
|
|
|
+ </if>
|
|
|
+ <if test="en_address != null" >
|
|
|
+ en_address,
|
|
|
+ </if>
|
|
|
+ <if test="en_tel != null" >
|
|
|
+ en_tel,
|
|
|
+ </if>
|
|
|
+ <if test="en_fax != null" >
|
|
|
+ en_fax,
|
|
|
+ </if>
|
|
|
+ <if test="en_postcodes != null" >
|
|
|
+ en_postcodes,
|
|
|
+ </if>
|
|
|
+ <if test="en_begindate != null" >
|
|
|
+ en_begindate,
|
|
|
+ </if>
|
|
|
+ <if test="en_pricemethod != null" >
|
|
|
+ en_pricemethod,
|
|
|
+ </if>
|
|
|
+ <if test="en_recorderid != null" >
|
|
|
+ en_recorderid,
|
|
|
+ </if>
|
|
|
+ <if test="en_recorder != null" >
|
|
|
+ en_recorder,
|
|
|
+ </if>
|
|
|
+ <if test="en_recorddate != null" >
|
|
|
+ en_recorddate,
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null" >
|
|
|
+ updaterId,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null" >
|
|
|
+ updateTime,
|
|
|
+ </if>
|
|
|
+ <if test="en_signet != null" >
|
|
|
+ en_signet,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
+ <if test="en_name != null" >
|
|
|
+ #{en_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="en_address != null" >
|
|
|
+ #{en_address,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="en_tel != null" >
|
|
|
+ #{en_tel,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="en_fax != null" >
|
|
|
+ #{en_fax,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="en_postcodes != null" >
|
|
|
+ #{en_postcodes,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="en_begindate != null" >
|
|
|
+ #{en_begindate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="en_pricemethod != null" >
|
|
|
+ #{en_pricemethod,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="en_recorderid != null" >
|
|
|
+ #{en_recorderid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="en_recorder != null" >
|
|
|
+ #{en_recorder,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="en_recorddate != null" >
|
|
|
+ #{en_recorddate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null" >
|
|
|
+ #{updaterId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null" >
|
|
|
+ #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="en_signet != null" >
|
|
|
+ #{en_signet,jdbcType=LONGVARBINARY},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.commons.po.Enterprise" >
|
|
|
+ update enterprise
|
|
|
+ <set >
|
|
|
+ <if test="en_name != null" >
|
|
|
+ en_name = #{en_name,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="en_address != null" >
|
|
|
+ en_address = #{en_address,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="en_tel != null" >
|
|
|
+ en_tel = #{en_tel,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="en_fax != null" >
|
|
|
+ en_fax = #{en_fax,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="en_postcodes != null" >
|
|
|
+ en_postcodes = #{en_postcodes,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="en_begindate != null" >
|
|
|
+ en_begindate = #{en_begindate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="en_pricemethod != null" >
|
|
|
+ en_pricemethod = #{en_pricemethod,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="en_recorderid != null" >
|
|
|
+ en_recorderid = #{en_recorderid,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="en_recorder != null" >
|
|
|
+ en_recorder = #{en_recorder,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="en_recorddate != null" >
|
|
|
+ en_recorddate = #{en_recorddate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updaterId != null" >
|
|
|
+ updaterId = #{updaterId,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null" >
|
|
|
+ updateTime = #{updateTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="en_signet != null" >
|
|
|
+ en_signet = #{en_signet,jdbcType=LONGVARBINARY},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where companyId = #{companyId}
|
|
|
+ </update>
|
|
|
+</mapper>
|