You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
2.1 KiB
52 lines
2.1 KiB
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dqueryByidtd/mybatis-3-mapper.dtd">
|
|
|
|
|
|
<mapper namespace="com.rbs.springcloud.pojo.merchant.Merchant">
|
|
<resultMap id="BaseResultMap" type="com.rbs.springcloud.pojo.merchant.Merchant">
|
|
<id column="merchantId" property="merchant_id" jdbcType="varchar"/>
|
|
<id column="merchantName" property="merchant_name" jdbcType="varchar"/>
|
|
<id column="cityStoreName" property="city_store_name" jdbcType="varchar"/>
|
|
<id column="storeBrandName" property="store_brand_name" jdbcType="varchar"/>
|
|
<id column="timeStamp" property="time_stamp" jdbcType="varchar"/>
|
|
</resultMap>
|
|
|
|
<insert id="insert" parameterType="com.rbs.springcloud.pojo.merchant.Merchant" useGeneratedKeys="true"
|
|
keyProperty="merchantId">
|
|
insert into merchant
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="merchantId != null">
|
|
merchant_id,
|
|
</if>
|
|
<if test="merchantName != null">
|
|
merchant_name,
|
|
</if>
|
|
<if test="cityStoreName != null">
|
|
city_store_name,
|
|
</if>
|
|
<if test="storeBrandName != null">
|
|
store_brand_name,
|
|
</if>
|
|
<if test="timeStamp != null">
|
|
time_stamp,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="merchantId != null and merchantId != ''">
|
|
#{merchantId,jdbcType=varchar},
|
|
</if>
|
|
<if test="merchantName != null and merchantName != ''">
|
|
#{merchantName,jdbcType=varchar},
|
|
</if>
|
|
<if test="cityStoreName != null and cityStoreName != ''">
|
|
#{cityStoreName,jdbcType=varchar},
|
|
</if>
|
|
<if test="storeBrandName != null and storeBrandName != ''">
|
|
#{storeBrandName,jdbcType=varchar},
|
|
</if>
|
|
<if test="timeStamp != null and timeStamp != ''">
|
|
#{timeStamp,jdbcType=varchar},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
</mapper>
|