<?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.nuvole.four.mapper.ActivityShopRecordMapper" >
|
<resultMap id="BaseResultMap" type="com.nuvole.four.domain.ActivityShopRecord" >
|
<id column="id" property="id" jdbcType="BIGINT" />
|
<result column="activity_id" property="activityId" jdbcType="BIGINT" />
|
<result column="merchant_shop_id" property="merchantShopId" jdbcType="BIGINT" />
|
<result column="channel_id" property="channelId" jdbcType="BIGINT" />
|
<result column="channel_name" property="channelName" jdbcType="VARCHAR" />
|
<result column="total_fee" property="totalFee" jdbcType="BIGINT" />
|
<result column="third_shop_no" property="thirdShopNo" jdbcType="VARCHAR" />
|
<result column="use_fee" property="useFee" jdbcType="BIGINT" />
|
<result column="surplus_fee" property="surplusFee" jdbcType="BIGINT" />
|
<result column="status" property="status" jdbcType="INTEGER" />
|
<result column="deleted" property="deleted" jdbcType="INTEGER" />
|
<result column="create_by" property="createBy" jdbcType="BIGINT" />
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
<result column="update_by" property="updateBy" jdbcType="BIGINT" />
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
id, activity_id, merchant_shop_id, channel_id, channel_name, total_fee, third_shop_no, use_fee, surplus_fee, status, deleted, create_by, create_time, update_by, update_time
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
select
|
<include refid="Base_Column_List" />
|
from activity_shop_record
|
where id = #{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
update activity_shop_record set deleted = 1
|
where id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" parameterType="com.nuvole.four.domain.ActivityShopRecord" >
|
insert into activity_shop_record (
|
id,
|
activity_id,
|
merchant_shop_id,
|
channel_id,
|
channel_name,
|
total_fee,
|
third_shop_no,
|
use_fee,
|
surplus_fee,
|
status,
|
deleted,
|
create_by,
|
create_time,
|
update_by,
|
update_time
|
)
|
values (
|
#{id,jdbcType=BIGINT},
|
#{activityId,jdbcType=BIGINT},
|
#{merchantShopId,jdbcType=BIGINT},
|
#{channelId,jdbcType=BIGINT},
|
#{channelName,jdbcType=VARCHAR},
|
#{totalFee,jdbcType=BIGINT},
|
#{thirdShopNo,jdbcType=VARCHAR},
|
#{useFee,jdbcType=BIGINT},
|
#{surplusFee,jdbcType=BIGINT},
|
#{status,jdbcType=INTEGER},
|
#{deleted,jdbcType=INTEGER},
|
#{createBy,jdbcType=BIGINT},
|
#{createTime,jdbcType=TIMESTAMP},
|
#{updateBy,jdbcType=BIGINT},
|
#{updateTime,jdbcType=TIMESTAMP}
|
)
|
</insert>
|
<insert id="insertSelective" parameterType="com.nuvole.four.domain.ActivityShopRecord" >
|
insert into activity_shop_record
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
id,
|
</if>
|
<if test="activityId != null" >
|
activity_id,
|
</if>
|
<if test="merchantShopId != null" >
|
merchant_shop_id,
|
</if>
|
<if test="channelId != null" >
|
channel_id,
|
</if>
|
<if test="channelName != null" >
|
channel_name,
|
</if>
|
<if test="totalFee != null" >
|
total_fee,
|
</if>
|
<if test="thirdShopNo != null" >
|
third_shop_no,
|
</if>
|
<if test="useFee != null" >
|
use_fee,
|
</if>
|
<if test="surplusFee != null" >
|
surplus_fee,
|
</if>
|
<if test="status != null" >
|
status,
|
</if>
|
<if test="deleted != null" >
|
deleted,
|
</if>
|
<if test="createBy != null" >
|
create_by,
|
</if>
|
<if test="createTime != null" >
|
create_time,
|
</if>
|
<if test="updateBy != null" >
|
update_by,
|
</if>
|
<if test="updateTime != null" >
|
update_time,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
#{id,jdbcType=BIGINT},
|
</if>
|
<if test="activityId != null" >
|
#{activityId,jdbcType=BIGINT},
|
</if>
|
<if test="merchantShopId != null" >
|
#{merchantShopId,jdbcType=BIGINT},
|
</if>
|
<if test="channelId != null" >
|
#{channelId,jdbcType=BIGINT},
|
</if>
|
<if test="channelName != null" >
|
#{channelName,jdbcType=VARCHAR},
|
</if>
|
<if test="totalFee != null" >
|
#{totalFee,jdbcType=BIGINT},
|
</if>
|
<if test="thirdShopNo != null" >
|
#{thirdShopNo,jdbcType=VARCHAR},
|
</if>
|
<if test="useFee != null" >
|
#{useFee,jdbcType=BIGINT},
|
</if>
|
<if test="surplusFee != null" >
|
#{surplusFee,jdbcType=BIGINT},
|
</if>
|
<if test="status != null" >
|
#{status,jdbcType=INTEGER},
|
</if>
|
<if test="deleted != null" >
|
#{deleted,jdbcType=INTEGER},
|
</if>
|
<if test="createBy != null" >
|
#{createBy,jdbcType=BIGINT},
|
</if>
|
<if test="createTime != null" >
|
#{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateBy != null" >
|
#{updateBy,jdbcType=BIGINT},
|
</if>
|
<if test="updateTime != null" >
|
#{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.nuvole.four.domain.ActivityShopRecord" >
|
update activity_shop_record
|
<set >
|
<if test="activityId != null" >
|
activity_id = #{activityId,jdbcType=BIGINT},
|
</if>
|
<if test="merchantShopId != null" >
|
merchant_shop_id = #{merchantShopId,jdbcType=BIGINT},
|
</if>
|
<if test="channelId != null" >
|
channel_id = #{channelId,jdbcType=BIGINT},
|
</if>
|
<if test="channelName != null" >
|
channel_name = #{channelName,jdbcType=VARCHAR},
|
</if>
|
<if test="totalFee != null" >
|
total_fee = #{totalFee,jdbcType=BIGINT},
|
</if>
|
<if test="thirdShopNo != null" >
|
third_shop_no = #{thirdShopNo,jdbcType=VARCHAR},
|
</if>
|
<if test="useFee != null" >
|
use_fee = #{useFee,jdbcType=BIGINT},
|
</if>
|
<if test="surplusFee != null" >
|
surplus_fee = #{surplusFee,jdbcType=BIGINT},
|
</if>
|
<if test="status != null" >
|
status = #{status,jdbcType=INTEGER},
|
</if>
|
<if test="deleted != null" >
|
deleted = #{deleted,jdbcType=INTEGER},
|
</if>
|
<if test="createBy != null" >
|
create_by = #{createBy,jdbcType=BIGINT},
|
</if>
|
<if test="createTime != null" >
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateBy != null" >
|
update_by = #{updateBy,jdbcType=BIGINT},
|
</if>
|
<if test="updateTime != null" >
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
</set>
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.nuvole.four.domain.ActivityShopRecord" >
|
update activity_shop_record
|
set
|
activity_id = #{activityId,jdbcType=BIGINT},
|
merchant_shop_id = #{merchantShopId,jdbcType=BIGINT},
|
channel_id = #{channelId,jdbcType=BIGINT},
|
channel_name = #{channelName,jdbcType=VARCHAR},
|
total_fee = #{totalFee,jdbcType=BIGINT},
|
third_shop_no = #{thirdShopNo,jdbcType=VARCHAR},
|
use_fee = #{useFee,jdbcType=BIGINT},
|
surplus_fee = #{surplusFee,jdbcType=BIGINT},
|
status = #{status,jdbcType=INTEGER},
|
deleted = #{deleted,jdbcType=INTEGER},
|
create_by = #{createBy,jdbcType=BIGINT},
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
update_by = #{updateBy,jdbcType=BIGINT},
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|