ab
2024-11-04 09d882262f530ded672f1c01fb65a1fefa00d52d
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
<?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.nova.sankuai.infra.mapper.AlipayChannelRecordMapper">
  <resultMap id="BaseResultMap" type="com.nova.sankuai.domain.entity.AlipayChannelRecord">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="channel_id" jdbcType="VARCHAR" property="channelId" />
    <result column="channel_desc" jdbcType="VARCHAR" property="channelDesc" />
    <result column="app_time" jdbcType="TIMESTAMP" property="appTime" />
    <result column="channel_status" jdbcType="VARCHAR" property="channelStatus" />
    <result column="daily_limit" jdbcType="DECIMAL" property="dailyLimit" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    id, channel_id, channel_desc, app_time, channel_status, daily_limit
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    select 
    <include refid="Base_Column_List" />
    from alipay_channel_record
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    delete from alipay_channel_record
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.nova.sankuai.domain.entity.AlipayChannelRecord">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into alipay_channel_record (id, channel_id, channel_desc, 
      app_time, channel_status, daily_limit
      )
    values (#{id,jdbcType=BIGINT}, #{channelId,jdbcType=VARCHAR}, #{channelDesc,jdbcType=VARCHAR}, 
      #{appTime,jdbcType=TIMESTAMP}, #{channelStatus,jdbcType=VARCHAR}, #{dailyLimit,jdbcType=DECIMAL}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.nova.sankuai.domain.entity.AlipayChannelRecord">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    insert into alipay_channel_record
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="channelId != null">
        channel_id,
      </if>
      <if test="channelDesc != null">
        channel_desc,
      </if>
      <if test="appTime != null">
        app_time,
      </if>
      <if test="channelStatus != null">
        channel_status,
      </if>
      <if test="dailyLimit != null">
        daily_limit,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="channelId != null">
        #{channelId,jdbcType=VARCHAR},
      </if>
      <if test="channelDesc != null">
        #{channelDesc,jdbcType=VARCHAR},
      </if>
      <if test="appTime != null">
        #{appTime,jdbcType=TIMESTAMP},
      </if>
      <if test="channelStatus != null">
        #{channelStatus,jdbcType=VARCHAR},
      </if>
      <if test="dailyLimit != null">
        #{dailyLimit,jdbcType=DECIMAL},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.nova.sankuai.domain.entity.AlipayChannelRecord">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update alipay_channel_record
    <set>
      <if test="channelId != null">
        channel_id = #{channelId,jdbcType=VARCHAR},
      </if>
      <if test="channelDesc != null">
        channel_desc = #{channelDesc,jdbcType=VARCHAR},
      </if>
      <if test="appTime != null">
        app_time = #{appTime,jdbcType=TIMESTAMP},
      </if>
      <if test="channelStatus != null">
        channel_status = #{channelStatus,jdbcType=VARCHAR},
      </if>
      <if test="dailyLimit != null">
        daily_limit = #{dailyLimit,jdbcType=DECIMAL},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.nova.sankuai.domain.entity.AlipayChannelRecord">
    <!--
      WARNING - @mbg.generated
      This element is automatically generated by MyBatis Generator, do not modify.
    -->
    update alipay_channel_record
    set channel_id = #{channelId,jdbcType=VARCHAR},
      channel_desc = #{channelDesc,jdbcType=VARCHAR},
      app_time = #{appTime,jdbcType=TIMESTAMP},
      channel_status = #{channelStatus,jdbcType=VARCHAR},
      daily_limit = #{dailyLimit,jdbcType=DECIMAL}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <select id="selectByChannelIdAndStatus" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from alipay_channel_record
    where channel_id = #{channelId} and channel_status = #{status}
  </select>
</mapper>