TemplateMapper.xml
7.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
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<?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.TemplateMapper">
<resultMap id="BaseResultMap" type="cn.runsa.crmapp.common.entity.Template">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="TPL_ID" jdbcType="VARCHAR" property="tplId" />
<result column="SCOPE" jdbcType="VARCHAR" property="scope" />
<result column="TPL_DESC" jdbcType="VARCHAR" property="tplDesc" />
<result column="EXE_TYPE" jdbcType="TINYINT" property="exeType" />
<result column="EXE_NAME" jdbcType="VARCHAR" property="exeName" />
<result column="PSR_TYPE" jdbcType="TINYINT" property="psrType" />
<result column="PSR_NAME" jdbcType="VARCHAR" property="psrName" />
<result column="REC_TIME" jdbcType="TIMESTAMP" property="recTime" />
</resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="cn.runsa.crmapp.common.entity.Template">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<result column="EXECUTER" jdbcType="LONGVARBINARY" property="executer" />
<result column="PARSER" jdbcType="LONGVARBINARY" property="parser" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
`TPL_ID`, `SCOPE`, `TPL_DESC`, `EXE_TYPE`, `EXE_NAME`, `PSR_TYPE`, `PSR_NAME`, `REC_TIME`
</sql>
<sql id="Blob_Column_List">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
`EXECUTER`, `PARSER`
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="ResultMapWithBLOBs">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
,
<include refid="Blob_Column_List" />
from crm_template
where `TPL_ID` = #{tplId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from crm_template
where `TPL_ID` = #{tplId,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="cn.runsa.crmapp.common.entity.Template">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into crm_template (`TPL_ID`, `SCOPE`, `TPL_DESC`,
`EXE_TYPE`, `EXE_NAME`, `PSR_TYPE`,
`PSR_NAME`, `REC_TIME`, `EXECUTER`,
`PARSER`)
values (#{tplId,jdbcType=VARCHAR}, #{scope,jdbcType=VARCHAR}, #{tplDesc,jdbcType=VARCHAR},
#{exeType,jdbcType=TINYINT}, #{exeName,jdbcType=VARCHAR}, #{psrType,jdbcType=TINYINT},
#{psrName,jdbcType=VARCHAR}, #{recTime,jdbcType=TIMESTAMP}, #{executer,jdbcType=LONGVARBINARY},
#{parser,jdbcType=LONGVARBINARY})
</insert>
<insert id="insertSelective" parameterType="cn.runsa.crmapp.common.entity.Template">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into crm_template
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="tplId != null">
`TPL_ID`,
</if>
<if test="scope != null">
`SCOPE`,
</if>
<if test="tplDesc != null">
`TPL_DESC`,
</if>
<if test="exeType != null">
`EXE_TYPE`,
</if>
<if test="exeName != null">
`EXE_NAME`,
</if>
<if test="psrType != null">
`PSR_TYPE`,
</if>
<if test="psrName != null">
`PSR_NAME`,
</if>
<if test="recTime != null">
`REC_TIME`,
</if>
<if test="executer != null">
`EXECUTER`,
</if>
<if test="parser != null">
`PARSER`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="tplId != null">
#{tplId,jdbcType=VARCHAR},
</if>
<if test="scope != null">
#{scope,jdbcType=VARCHAR},
</if>
<if test="tplDesc != null">
#{tplDesc,jdbcType=VARCHAR},
</if>
<if test="exeType != null">
#{exeType,jdbcType=TINYINT},
</if>
<if test="exeName != null">
#{exeName,jdbcType=VARCHAR},
</if>
<if test="psrType != null">
#{psrType,jdbcType=TINYINT},
</if>
<if test="psrName != null">
#{psrName,jdbcType=VARCHAR},
</if>
<if test="recTime != null">
#{recTime,jdbcType=TIMESTAMP},
</if>
<if test="executer != null">
#{executer,jdbcType=LONGVARBINARY},
</if>
<if test="parser != null">
#{parser,jdbcType=LONGVARBINARY},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="cn.runsa.crmapp.common.entity.Template">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update crm_template
<set>
<if test="scope != null">
`SCOPE` = #{scope,jdbcType=VARCHAR},
</if>
<if test="tplDesc != null">
`TPL_DESC` = #{tplDesc,jdbcType=VARCHAR},
</if>
<if test="exeType != null">
`EXE_TYPE` = #{exeType,jdbcType=TINYINT},
</if>
<if test="exeName != null">
`EXE_NAME` = #{exeName,jdbcType=VARCHAR},
</if>
<if test="psrType != null">
`PSR_TYPE` = #{psrType,jdbcType=TINYINT},
</if>
<if test="psrName != null">
`PSR_NAME` = #{psrName,jdbcType=VARCHAR},
</if>
<if test="recTime != null">
`REC_TIME` = #{recTime,jdbcType=TIMESTAMP},
</if>
<if test="executer != null">
`EXECUTER` = #{executer,jdbcType=LONGVARBINARY},
</if>
<if test="parser != null">
`PARSER` = #{parser,jdbcType=LONGVARBINARY},
</if>
</set>
where `TPL_ID` = #{tplId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKeyWithBLOBs" parameterType="cn.runsa.crmapp.common.entity.Template">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update crm_template
set `SCOPE` = #{scope,jdbcType=VARCHAR},
`TPL_DESC` = #{tplDesc,jdbcType=VARCHAR},
`EXE_TYPE` = #{exeType,jdbcType=TINYINT},
`EXE_NAME` = #{exeName,jdbcType=VARCHAR},
`PSR_TYPE` = #{psrType,jdbcType=TINYINT},
`PSR_NAME` = #{psrName,jdbcType=VARCHAR},
`REC_TIME` = #{recTime,jdbcType=TIMESTAMP},
`EXECUTER` = #{executer,jdbcType=LONGVARBINARY},
`PARSER` = #{parser,jdbcType=LONGVARBINARY}
where `TPL_ID` = #{tplId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="cn.runsa.crmapp.common.entity.Template">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update crm_template
set `SCOPE` = #{scope,jdbcType=VARCHAR},
`TPL_DESC` = #{tplDesc,jdbcType=VARCHAR},
`EXE_TYPE` = #{exeType,jdbcType=TINYINT},
`EXE_NAME` = #{exeName,jdbcType=VARCHAR},
`PSR_TYPE` = #{psrType,jdbcType=TINYINT},
`PSR_NAME` = #{psrName,jdbcType=VARCHAR},
`REC_TIME` = #{recTime,jdbcType=TIMESTAMP}
where `TPL_ID` = #{tplId,jdbcType=VARCHAR}
</update>
<select id="selectTemplatesByScope" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from crm_template
where SCOPE = #{scope}
</select>
</mapper>