<?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.yeshi.fanli.dao.mybatis.money.InviteOrderSubsidyDebtRepayHistoryMapper">
|
<resultMap id="BaseResultMap"
|
type="com.yeshi.fanli.entity.money.InviteOrderSubsidyDebtRepayHistory">
|
<id column="rh_id" property="id" jdbcType="BIGINT" />
|
<result column="rh_money" property="money" jdbcType="DECIMAL" />
|
<result column="rh_uid" property="uid" jdbcType="BIGINT" />
|
<result column="rh_beizhu" property="beiZhu" jdbcType="VARCHAR" />
|
<result column="rh_create_time" property="createTime" jdbcType="TIMESTAMP" />
|
<association property="debt" column="rh_debt_id"
|
javaType="com.yeshi.fanli.entity.money.InviteOrderSubsidyDebt">
|
<id column="rh_debt_id" property="id" jdbcType="BIGINT" />
|
</association>
|
</resultMap>
|
<sql id="Base_Column_List">rh_id,rh_debt_id,rh_money,rh_uid,rh_beizhu,rh_create_time
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
parameterType="java.lang.Long">
|
select
|
<include refid="Base_Column_List" />
|
from yeshi_ec_invite_order_subsidy_debt_repay_history where rh_id =
|
#{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
|
yeshi_ec_invite_order_subsidy_debt_repay_history where rh_id =
|
#{id,jdbcType=BIGINT}
|
</delete>
|
<insert id="insert"
|
parameterType="com.yeshi.fanli.entity.money.InviteOrderSubsidyDebtRepayHistory"
|
useGeneratedKeys="true" keyProperty="id">insert into
|
yeshi_ec_invite_order_subsidy_debt_repay_history
|
(rh_id,rh_debt_id,rh_money,rh_uid,rh_beizhu,rh_create_time) values
|
(#{id,jdbcType=BIGINT},#{debt.id,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{uid,jdbcType=BIGINT},#{beiZhu,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP})
|
</insert>
|
<insert id="insertSelective"
|
parameterType="com.yeshi.fanli.entity.money.InviteOrderSubsidyDebtRepayHistory"
|
useGeneratedKeys="true" keyProperty="id">
|
insert into yeshi_ec_invite_order_subsidy_debt_repay_history
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">rh_id,</if>
|
<if test="debt != null">rh_debt_id,</if>
|
<if test="money != null">rh_money,</if>
|
<if test="uid != null">rh_uid,</if>
|
<if test="beiZhu != null">rh_beizhu,</if>
|
<if test="createTime != null">rh_create_time,</if>
|
</trim>
|
values
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">#{id,jdbcType=BIGINT},</if>
|
<if test="debt != null">#{debt.id,jdbcType=BIGINT},</if>
|
<if test="money != null">#{money,jdbcType=DECIMAL},</if>
|
<if test="uid != null">#{uid,jdbcType=BIGINT},</if>
|
<if test="beiZhu != null">#{beiZhu,jdbcType=VARCHAR},</if>
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKey"
|
parameterType="com.yeshi.fanli.entity.money.InviteOrderSubsidyDebtRepayHistory">update yeshi_ec_invite_order_subsidy_debt_repay_history
|
set rh_debt_id = #{debt.id,jdbcType=BIGINT},rh_money =
|
#{money,jdbcType=DECIMAL},rh_uid = #{uid,jdbcType=BIGINT},rh_beizhu =
|
#{beiZhu,jdbcType=VARCHAR},rh_create_time =
|
#{createTime,jdbcType=TIMESTAMP} where rh_id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKeySelective"
|
parameterType="com.yeshi.fanli.entity.money.InviteOrderSubsidyDebtRepayHistory">
|
update yeshi_ec_invite_order_subsidy_debt_repay_history
|
<set>
|
<if test="debt != null">rh_debt_id=#{debt.id,jdbcType=BIGINT},</if>
|
<if test="money != null">rh_money=#{money,jdbcType=DECIMAL},</if>
|
<if test="uid != null">rh_uid=#{uid,jdbcType=BIGINT},</if>
|
<if test="beiZhu != null">rh_beizhu=#{beiZhu,jdbcType=VARCHAR},</if>
|
<if test="createTime != null">rh_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
|
</set>
|
where rh_id = #{id,jdbcType=BIGINT}
|
</update>
|
</mapper>
|