admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?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.OrderTeamRewardDebtRepayHistoryMapper">
    <resultMap id="BaseResultMap"
        type="com.yeshi.fanli.entity.money.OrderTeamRewardDebtRepayHistory">
        <id column="drh_id" property="id" jdbcType="BIGINT" />
        <result column="drh_money" property="money" jdbcType="DECIMAL" />
        <result column="drh_uid" property="uid" jdbcType="BIGINT" />
        <result column="drh_beizhu" property="beiZhu" jdbcType="VARCHAR" />
        <result column="drh_create_time" property="createTime" jdbcType="TIMESTAMP" />
        <association property="debt" column="drh_debt_id"
            javaType="com.yeshi.fanli.entity.money.OrderTeamRewardDebt">
            <id column="drh_debt_id" property="id" jdbcType="BIGINT" />
        </association>
    </resultMap>
    <sql id="Base_Column_List">drh_id,drh_debt_id,drh_money,drh_uid,drh_beizhu,drh_create_time
    </sql>
    <select id="selectByPrimaryKey" resultMap="BaseResultMap"
        parameterType="java.lang.Long">
        select
        <include refid="Base_Column_List" />
        from yeshi_ec_order_team_reward_debt_repay_history where drh_id =
        #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from
        yeshi_ec_order_team_reward_debt_repay_history where drh_id =
        #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert"
        parameterType="com.yeshi.fanli.entity.money.OrderTeamRewardDebtRepayHistory"
        useGeneratedKeys="true" keyProperty="id">insert into
        yeshi_ec_order_team_reward_debt_repay_history
        (drh_id,drh_debt_id,drh_money,drh_uid,drh_beizhu,drh_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.OrderTeamRewardDebtRepayHistory"
        useGeneratedKeys="true" keyProperty="id">
        insert into yeshi_ec_order_team_reward_debt_repay_history
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">drh_id,</if>
            <if test="debt != null">drh_debt_id,</if>
            <if test="money != null">drh_money,</if>
            <if test="uid != null">drh_uid,</if>
            <if test="beiZhu != null">drh_beizhu,</if>
            <if test="createTime != null">drh_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.OrderTeamRewardDebtRepayHistory">update yeshi_ec_order_team_reward_debt_repay_history
        set
        drh_debt_id = #{debt.id,jdbcType=BIGINT},drh_money =
        #{money,jdbcType=DECIMAL},drh_uid = #{uid,jdbcType=BIGINT},drh_beizhu =
        #{beiZhu,jdbcType=VARCHAR},drh_create_time =
        #{createTime,jdbcType=TIMESTAMP} where drh_id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKeySelective"
        parameterType="com.yeshi.fanli.entity.money.OrderTeamRewardDebtRepayHistory">
        update yeshi_ec_order_team_reward_debt_repay_history
        <set>
            <if test="debt != null">drh_debt_id=#{debt.id,jdbcType=BIGINT},</if>
            <if test="money != null">drh_money=#{money,jdbcType=DECIMAL},</if>
            <if test="uid != null">drh_uid=#{uid,jdbcType=BIGINT},</if>
            <if test="beiZhu != null">drh_beizhu=#{beiZhu,jdbcType=VARCHAR},</if>
            <if test="createTime != null">drh_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
        </set>
        where drh_id = #{id,jdbcType=BIGINT}
    </update>
</mapper>