CustomercouponMapper.xml
2.54 KB
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
<?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="cn.runsa.crmapp.customer.mapper.CustomercouponMapper" >
<resultMap id="BaseResultMap" type="cn.runsa.crmapp.customer.entity.Customercoupon" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="CST_ID" property="cstId" jdbcType="BIGINT" />
<result column="CPN_ID" property="cpnId" jdbcType="BIGINT" />
<result column="CST_FROM" property="cstFrom" jdbcType="BIGINT" />
<result column="RCV_TIME" property="rcvTime" jdbcType="TIMESTAMP" />
<result column="ENABLE" property="enable" jdbcType="BIT" />
</resultMap>
<insert id="insert" parameterType="cn.runsa.crmapp.customer.entity.Customercoupon" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into crm_coupons_customer (`CST_ID`, `CPN_ID`, `CST_FROM`,
`RCV_TIME`, `ENABLE`)
values (#{cstId,jdbcType=BIGINT}, #{cpnId,jdbcType=BIGINT}, #{cstFrom,jdbcType=BIGINT},
#{rcvTime,jdbcType=TIMESTAMP}, #{enable,jdbcType=BIT})
</insert>
<insert id="insertSelective" parameterType="cn.runsa.crmapp.customer.entity.Customercoupon" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into crm_coupons_customer
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="cstId != null" >
`CST_ID`,
</if>
<if test="cpnId != null" >
`CPN_ID`,
</if>
<if test="cstFrom != null" >
`CST_FROM`,
</if>
<if test="rcvTime != null" >
`RCV_TIME`,
</if>
<if test="enable != null" >
`ENABLE`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="cstId != null" >
#{cstId,jdbcType=BIGINT},
</if>
<if test="cpnId != null" >
#{cpnId,jdbcType=BIGINT},
</if>
<if test="cstFrom != null" >
#{cstFrom,jdbcType=BIGINT},
</if>
<if test="rcvTime != null" >
#{rcvTime,jdbcType=TIMESTAMP},
</if>
<if test="enable != null" >
#{enable,jdbcType=BIT},
</if>
</trim>
</insert>
<update id="updateByCustid">
update crm_customer_weixin
set `CST_ID` = #{target,jdbcType=BIGINT}
where `CST_ID` = #{source,jdbcType=BIGINT}
</update>
</mapper>