<?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.ActivityDistributeRecordMapper" >
|
<resultMap id="BaseResultMap" type="com.nuvole.four.domain.ActivityDistributeRecord" >
|
<id column="id" property="id" jdbcType="BIGINT" />
|
<result column="org_id" property="orgId" jdbcType="BIGINT" />
|
<result column="org_name" property="orgName" jdbcType="VARCHAR" />
|
<result column="org_code" property="orgCode" jdbcType="VARCHAR" />
|
<result column="activity_id" property="activityId" jdbcType="BIGINT" />
|
<result column="total_fee" property="totalFee" jdbcType="BIGINT" />
|
<result column="use_fee" property="useFee" jdbcType="BIGINT" />
|
<result column="surplus_fee" property="surplusFee" jdbcType="BIGINT" />
|
<result column="lv1_id" property="lv1Id" jdbcType="BIGINT" />
|
<result column="lv2_id" property="lv2Id" jdbcType="BIGINT" />
|
<result column="lv3_id" property="lv3Id" jdbcType="BIGINT" />
|
<result column="lv4_id" property="lv4Id" 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, org_id, org_name, org_code, activity_id, total_fee, use_fee, surplus_fee, lv1_id, lv2_id, lv3_id, lv4_id, 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_distribute_record
|
where id = #{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
update activity_distribute_record set deleted = 1
|
where id = #{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert" parameterType="com.nuvole.four.domain.ActivityDistributeRecord" >
|
insert into activity_distribute_record (
|
id,
|
org_id,
|
org_name,
|
org_code,
|
activity_id,
|
total_fee,
|
use_fee,
|
surplus_fee,
|
lv1_id,
|
lv2_id,
|
lv3_id,
|
lv4_id,
|
status,
|
deleted,
|
create_by,
|
create_time,
|
update_by,
|
update_time
|
)
|
values (
|
#{id,jdbcType=BIGINT},
|
#{orgId,jdbcType=BIGINT},
|
#{orgName,jdbcType=VARCHAR},
|
#{orgCode,jdbcType=VARCHAR},
|
#{activityId,jdbcType=BIGINT},
|
#{totalFee,jdbcType=BIGINT},
|
#{useFee,jdbcType=BIGINT},
|
#{surplusFee,jdbcType=BIGINT},
|
#{lv1Id,jdbcType=BIGINT},
|
#{lv2Id,jdbcType=BIGINT},
|
#{lv3Id,jdbcType=BIGINT},
|
#{lv4Id,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.ActivityDistributeRecord" >
|
insert into activity_distribute_record
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
id,
|
</if>
|
<if test="orgId != null" >
|
org_id,
|
</if>
|
<if test="orgName != null" >
|
org_name,
|
</if>
|
<if test="orgCode != null" >
|
org_code,
|
</if>
|
<if test="activityId != null" >
|
activity_id,
|
</if>
|
<if test="totalFee != null" >
|
total_fee,
|
</if>
|
<if test="useFee != null" >
|
use_fee,
|
</if>
|
<if test="surplusFee != null" >
|
surplus_fee,
|
</if>
|
<if test="lv1Id != null" >
|
lv1_id,
|
</if>
|
<if test="lv2Id != null" >
|
lv2_id,
|
</if>
|
<if test="lv3Id != null" >
|
lv3_id,
|
</if>
|
<if test="lv4Id != null" >
|
lv4_id,
|
</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="orgId != null" >
|
#{orgId,jdbcType=BIGINT},
|
</if>
|
<if test="orgName != null" >
|
#{orgName,jdbcType=VARCHAR},
|
</if>
|
<if test="orgCode != null" >
|
#{orgCode,jdbcType=VARCHAR},
|
</if>
|
<if test="activityId != null" >
|
#{activityId,jdbcType=BIGINT},
|
</if>
|
<if test="totalFee != null" >
|
#{totalFee,jdbcType=BIGINT},
|
</if>
|
<if test="useFee != null" >
|
#{useFee,jdbcType=BIGINT},
|
</if>
|
<if test="surplusFee != null" >
|
#{surplusFee,jdbcType=BIGINT},
|
</if>
|
<if test="lv1Id != null" >
|
#{lv1Id,jdbcType=BIGINT},
|
</if>
|
<if test="lv2Id != null" >
|
#{lv2Id,jdbcType=BIGINT},
|
</if>
|
<if test="lv3Id != null" >
|
#{lv3Id,jdbcType=BIGINT},
|
</if>
|
<if test="lv4Id != null" >
|
#{lv4Id,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.ActivityDistributeRecord" >
|
update activity_distribute_record
|
<set >
|
<if test="orgId != null" >
|
org_id = #{orgId,jdbcType=BIGINT},
|
</if>
|
<if test="orgName != null" >
|
org_name = #{orgName,jdbcType=VARCHAR},
|
</if>
|
<if test="orgCode != null" >
|
org_code = #{orgCode,jdbcType=VARCHAR},
|
</if>
|
<if test="activityId != null" >
|
activity_id = #{activityId,jdbcType=BIGINT},
|
</if>
|
<if test="totalFee != null" >
|
total_fee = #{totalFee,jdbcType=BIGINT},
|
</if>
|
<if test="useFee != null" >
|
use_fee = #{useFee,jdbcType=BIGINT},
|
</if>
|
<if test="surplusFee != null" >
|
surplus_fee = #{surplusFee,jdbcType=BIGINT},
|
</if>
|
<if test="lv1Id != null" >
|
lv1_id = #{lv1Id,jdbcType=BIGINT},
|
</if>
|
<if test="lv2Id != null" >
|
lv2_id = #{lv2Id,jdbcType=BIGINT},
|
</if>
|
<if test="lv3Id != null" >
|
lv3_id = #{lv3Id,jdbcType=BIGINT},
|
</if>
|
<if test="lv4Id != null" >
|
lv4_id = #{lv4Id,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.ActivityDistributeRecord" >
|
update activity_distribute_record
|
set
|
org_id = #{orgId,jdbcType=BIGINT},
|
org_name = #{orgName,jdbcType=VARCHAR},
|
org_code = #{orgCode,jdbcType=VARCHAR},
|
activity_id = #{activityId,jdbcType=BIGINT},
|
total_fee = #{totalFee,jdbcType=BIGINT},
|
use_fee = #{useFee,jdbcType=BIGINT},
|
surplus_fee = #{surplusFee,jdbcType=BIGINT},
|
lv1_id = #{lv1Id,jdbcType=BIGINT},
|
lv2_id = #{lv2Id,jdbcType=BIGINT},
|
lv3_id = #{lv3Id,jdbcType=BIGINT},
|
lv4_id = #{lv4Id,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>
|