<?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.ks.lucky.mapper.LuckySponsorMoneyRecordMapper" >
|
<resultMap id="BaseResultMap" type="com.ks.lucky.pojo.DO.LuckySponsorMoneyRecord" >
|
<id column="id" property="id" jdbcType="BIGINT" />
|
<result column="sponsor_id" property="sponsorId" jdbcType="BIGINT" />
|
<result column="type" property="type" jdbcType="VARCHAR" />
|
<result column="money" property="money" jdbcType="DECIMAL" />
|
<result column="activity_id" property="activityId" jdbcType="BIGINT" />
|
<result column="extra_params" property="extraParams" jdbcType="VARCHAR" />
|
<result column="remarks" property="remarks" jdbcType="VARCHAR" />
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
id, sponsor_id, type, money, activity_id, extra_params, remarks, create_time, update_time
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
select
|
<include refid="Base_Column_List" />
|
from lucky_sponsor_money_record
|
where id = #{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
delete from lucky_sponsor_money_record
|
where id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" parameterType="com.ks.lucky.pojo.DO.LuckySponsorMoneyRecord" >
|
insert into lucky_sponsor_money_record (id, sponsor_id, type,
|
money, activity_id, extra_params,
|
remarks, create_time, update_time
|
)
|
values (#{id,jdbcType=BIGINT}, #{sponsorId,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR},
|
#{money,jdbcType=DECIMAL}, #{activityId,jdbcType=BIGINT}, #{extraParams,jdbcType=VARCHAR},
|
#{remarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
|
)
|
</insert>
|
<insert id="insertSelective" parameterType="com.ks.lucky.pojo.DO.LuckySponsorMoneyRecord" >
|
insert into lucky_sponsor_money_record
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
id,
|
</if>
|
<if test="sponsorId != null" >
|
sponsor_id,
|
</if>
|
<if test="type != null" >
|
type,
|
</if>
|
<if test="money != null" >
|
money,
|
</if>
|
<if test="activityId != null" >
|
activity_id,
|
</if>
|
<if test="extraParams != null" >
|
extra_params,
|
</if>
|
<if test="remarks != null" >
|
remarks,
|
</if>
|
<if test="createTime != null" >
|
create_time,
|
</if>
|
<if test="updateTime != null" >
|
update_time,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
#{id,jdbcType=BIGINT},
|
</if>
|
<if test="sponsorId != null" >
|
#{sponsorId,jdbcType=BIGINT},
|
</if>
|
<if test="type != null" >
|
#{type,jdbcType=VARCHAR},
|
</if>
|
<if test="money != null" >
|
#{money,jdbcType=DECIMAL},
|
</if>
|
<if test="activityId != null" >
|
#{activityId,jdbcType=BIGINT},
|
</if>
|
<if test="extraParams != null" >
|
#{extraParams,jdbcType=VARCHAR},
|
</if>
|
<if test="remarks != null" >
|
#{remarks,jdbcType=VARCHAR},
|
</if>
|
<if test="createTime != null" >
|
#{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateTime != null" >
|
#{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.ks.lucky.pojo.DO.LuckySponsorMoneyRecord" >
|
update lucky_sponsor_money_record
|
<set >
|
<if test="sponsorId != null" >
|
sponsor_id = #{sponsorId,jdbcType=BIGINT},
|
</if>
|
<if test="type != null" >
|
type = #{type,jdbcType=VARCHAR},
|
</if>
|
<if test="money != null" >
|
money = #{money,jdbcType=DECIMAL},
|
</if>
|
<if test="activityId != null" >
|
activity_id = #{activityId,jdbcType=BIGINT},
|
</if>
|
<if test="extraParams != null" >
|
extra_params = #{extraParams,jdbcType=VARCHAR},
|
</if>
|
<if test="remarks != null" >
|
remarks = #{remarks,jdbcType=VARCHAR},
|
</if>
|
<if test="createTime != null" >
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updateTime != null" >
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
</set>
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.ks.lucky.pojo.DO.LuckySponsorMoneyRecord" >
|
update lucky_sponsor_money_record
|
set sponsor_id = #{sponsorId,jdbcType=BIGINT},
|
type = #{type,jdbcType=VARCHAR},
|
money = #{money,jdbcType=DECIMAL},
|
activity_id = #{activityId,jdbcType=BIGINT},
|
extra_params = #{extraParams,jdbcType=VARCHAR},
|
remarks = #{remarks,jdbcType=VARCHAR},
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|