ApprovalProcessMapper.xml
3.8 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
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
<?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.common.mapper.ApprovalProcessMapper" >
<resultMap id="BaseResultMap" type="cn.runsa.crmapp.common.entity.ApprovalProcess" >
<id column="ID" property="id" jdbcType="BIGINT" />
<result column="TYPE" property="type" jdbcType="INTEGER" />
<result column="TYPEID" property="typeid" jdbcType="VARCHAR" />
<result column="DESC" property="desc" jdbcType="VARCHAR" />
<result column="STATUS" property="status" jdbcType="INTEGER" />
<result column="REC_TIME" property="recTime" jdbcType="TIMESTAMP" />
<result column="REC_USER" property="recUser" jdbcType="BIGINT" />
</resultMap>
<sql id="Base_Column_List" >
ID, TYPE, TYPEID, `DESC`, STATUS, REC_TIME, REC_USER
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
select
<include refid="Base_Column_List" />
from crm_approval_process
where ID = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
delete from crm_approval_process
where ID = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" parameterType="cn.runsa.crmapp.common.entity.ApprovalProcess" >
insert into crm_approval_process (ID, TYPE, TYPEID,
`DESC`, STATUS, REC_TIME,
REC_USER)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=INTEGER}, #{typeid,jdbcType=VARCHAR},
#{desc,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{recTime,jdbcType=TIMESTAMP},
#{recUser,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="cn.runsa.crmapp.common.entity.ApprovalProcess" >
insert into crm_approval_process
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
ID,
</if>
<if test="type != null" >
TYPE,
</if>
<if test="typeid != null" >
TYPEID,
</if>
<if test="desc != null" >
`DESC`,
</if>
<if test="status != null" >
STATUS,
</if>
<if test="recTime != null" >
REC_TIME,
</if>
<if test="recUser != null" >
REC_USER,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=BIGINT},
</if>
<if test="type != null" >
#{type,jdbcType=INTEGER},
</if>
<if test="typeid != null" >
#{typeid,jdbcType=VARCHAR},
</if>
<if test="desc != null" >
#{desc,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=INTEGER},
</if>
<if test="recTime != null" >
#{recTime,jdbcType=TIMESTAMP},
</if>
<if test="recUser != null" >
#{recUser,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.runsa.crmapp.common.entity.ApprovalProcess" >
update crm_approval_process
<set >
<if test="type != null" >
TYPE = #{type,jdbcType=INTEGER},
</if>
<if test="typeid != null" >
TYPEID = #{typeid,jdbcType=VARCHAR},
</if>
<if test="desc != null" >
`DESC` = #{desc,jdbcType=VARCHAR},
</if>
<if test="status != null" >
STATUS = #{status,jdbcType=INTEGER},
</if>
<if test="recTime != null" >
REC_TIME = #{recTime,jdbcType=TIMESTAMP},
</if>
<if test="recUser != null" >
REC_USER = #{recUser,jdbcType=BIGINT},
</if>
</set>
where ID = #{id,jdbcType=BIGINT}
</update>
<select id="getCounts" parameterType="cn.runsa.crmapp.common.entity.ApprovalProcess" resultType="java.lang.Integer" >
select count(*) from crm_approval_process
</select>
</mapper>