CustomerEventItemMapper.xml
2.78 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
<?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.CustomerEventItemMapper">
<resultMap id="BaseResultMap" type="cn.runsa.crmapp.customer.entity.CustomerEventItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="CST_ID" jdbcType="BIGINT" property="cstId" />
<result column="ACT_ID" jdbcType="BIGINT" property="actId" />
<result column="EVT_ID" jdbcType="VARCHAR" property="evtId" />
<result column="ACT_SCOPE" jdbcType="VARCHAR" property="actScope" />
<result column="EVT_TIME" jdbcType="TIMESTAMP" property="evtTime" />
</resultMap>
<insert id="insert" parameterType="cn.runsa.crmapp.customer.entity.CustomerEventItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into crm_customer_event_item (`CST_ID`, `ACT_ID`, `EVT_ID`,
`ACT_SCOPE`, `EVT_TIME`)
values (#{cstId,jdbcType=BIGINT}, #{actId,jdbcType=BIGINT}, #{evtId,jdbcType=VARCHAR},
#{actScope,jdbcType=VARCHAR}, #{evtTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="cn.runsa.crmapp.customer.entity.CustomerEventItem">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into crm_customer_event_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="cstId != null">
`CST_ID`,
</if>
<if test="actId != null">
`ACT_ID`,
</if>
<if test="evtId != null">
`EVT_ID`,
</if>
<if test="actScope != null">
`ACT_SCOPE`,
</if>
<if test="evtTime != null">
`EVT_TIME`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="cstId != null">
#{cstId,jdbcType=BIGINT},
</if>
<if test="actId != null">
#{actId,jdbcType=BIGINT},
</if>
<if test="evtId != null">
#{evtId,jdbcType=VARCHAR},
</if>
<if test="actScope != null">
#{actScope,jdbcType=VARCHAR},
</if>
<if test="evtTime != null">
#{evtTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="selectTimes" parameterType="cn.runsa.crmapp.customer.entity.CustomerEventItem" resultType="java.lang.Integer">
SELECT COUNT(*) FROM crm_customer_event_item
WHERE CST_ID = #{cstId,jdbcType=BIGINT} AND ACT_ID = #{actId,jdbcType=BIGINT} AND EVT_ID = #{evtId,jdbcType=VARCHAR} AND ACT_SCOPE = #{actScope,jdbcType=VARCHAR} AND EVT_TIME >= #{evtTime,jdbcType=TIMESTAMP}
</select>
</mapper>