|
|
1
|
+<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
2
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
3
|
+<mapper namespace="com.tianbo.warehouse.dao.KakoUserMapper" >
|
|
|
4
|
+ <resultMap id="BaseResultMap" type="com.tianbo.warehouse.model.KakoUser" >
|
|
|
5
|
+ <id column="id" property="id" jdbcType="VARCHAR" />
|
|
|
6
|
+ <result column="company_id" property="companyId" jdbcType="VARCHAR" />
|
|
|
7
|
+ <result column="office_id" property="officeId" jdbcType="VARCHAR" />
|
|
|
8
|
+ <result column="login_name" property="loginName" jdbcType="VARCHAR" />
|
|
|
9
|
+ <result column="password" property="password" jdbcType="VARCHAR" />
|
|
|
10
|
+ <result column="no" property="no" jdbcType="VARCHAR" />
|
|
|
11
|
+ <result column="name" property="name" jdbcType="VARCHAR" />
|
|
|
12
|
+ <result column="email" property="email" jdbcType="VARCHAR" />
|
|
|
13
|
+ <result column="phone" property="phone" jdbcType="VARCHAR" />
|
|
|
14
|
+ <result column="mobile" property="mobile" jdbcType="VARCHAR" />
|
|
|
15
|
+ <result column="user_type" property="userType" jdbcType="CHAR" />
|
|
|
16
|
+ <result column="photo" property="photo" jdbcType="VARCHAR" />
|
|
|
17
|
+ <result column="login_ip" property="loginIp" jdbcType="VARCHAR" />
|
|
|
18
|
+ <result column="login_date" property="loginDate" jdbcType="TIMESTAMP" />
|
|
|
19
|
+ <result column="login_flag" property="loginFlag" jdbcType="VARCHAR" />
|
|
|
20
|
+ <result column="create_by" property="createBy" jdbcType="VARCHAR" />
|
|
|
21
|
+ <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
|
|
|
22
|
+ <result column="update_by" property="updateBy" jdbcType="VARCHAR" />
|
|
|
23
|
+ <result column="update_date" property="updateDate" jdbcType="TIMESTAMP" />
|
|
|
24
|
+ <result column="remarks" property="remarks" jdbcType="VARCHAR" />
|
|
|
25
|
+ <result column="del_flag" property="delFlag" jdbcType="CHAR" />
|
|
|
26
|
+ </resultMap>
|
|
|
27
|
+ <sql id="Base_Column_List" >
|
|
|
28
|
+ id, company_id, office_id, login_name, password, no, name, email, phone, mobile,
|
|
|
29
|
+ user_type, photo, login_ip, login_date, login_flag, create_by, create_date, update_by,
|
|
|
30
|
+ update_date, remarks, del_flag
|
|
|
31
|
+ </sql>
|
|
|
32
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
33
|
+ select
|
|
|
34
|
+ <include refid="Base_Column_List" />
|
|
|
35
|
+ from sys_user
|
|
|
36
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
37
|
+ </select>
|
|
|
38
|
+ <select id="selectByUsername" resultMap="BaseResultMap" parameterType="java.lang.String" >
|
|
|
39
|
+ select
|
|
|
40
|
+ <include refid="Base_Column_List" />
|
|
|
41
|
+ from sys_user
|
|
|
42
|
+ where login_name = #{login_name,jdbcType=VARCHAR}
|
|
|
43
|
+ </select>
|
|
|
44
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
|
|
|
45
|
+ delete from sys_user
|
|
|
46
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
47
|
+ </delete>
|
|
|
48
|
+ <insert id="insert" parameterType="com.tianbo.warehouse.model.KakoUser" >
|
|
|
49
|
+ insert into sys_user (id, company_id, office_id,
|
|
|
50
|
+ login_name, password, no,
|
|
|
51
|
+ name, email, phone,
|
|
|
52
|
+ mobile, user_type, photo,
|
|
|
53
|
+ login_ip, login_date, login_flag,
|
|
|
54
|
+ create_by, create_date, update_by,
|
|
|
55
|
+ update_date, remarks, del_flag
|
|
|
56
|
+ )
|
|
|
57
|
+ values (#{id,jdbcType=VARCHAR}, #{companyId,jdbcType=VARCHAR}, #{officeId,jdbcType=VARCHAR},
|
|
|
58
|
+ #{loginName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{no,jdbcType=VARCHAR},
|
|
|
59
|
+ #{name,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR},
|
|
|
60
|
+ #{mobile,jdbcType=VARCHAR}, #{userType,jdbcType=CHAR}, #{photo,jdbcType=VARCHAR},
|
|
|
61
|
+ #{loginIp,jdbcType=VARCHAR}, #{loginDate,jdbcType=TIMESTAMP}, #{loginFlag,jdbcType=VARCHAR},
|
|
|
62
|
+ #{createBy,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR},
|
|
|
63
|
+ #{updateDate,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, #{delFlag,jdbcType=CHAR}
|
|
|
64
|
+ )
|
|
|
65
|
+ </insert>
|
|
|
66
|
+ <insert id="insertSelective" parameterType="com.tianbo.warehouse.model.KakoUser" >
|
|
|
67
|
+ insert into sys_user
|
|
|
68
|
+ <trim prefix="(" suffix=")" suffixOverrides="," >
|
|
|
69
|
+ <if test="id != null" >
|
|
|
70
|
+ id,
|
|
|
71
|
+ </if>
|
|
|
72
|
+ <if test="companyId != null" >
|
|
|
73
|
+ company_id,
|
|
|
74
|
+ </if>
|
|
|
75
|
+ <if test="officeId != null" >
|
|
|
76
|
+ office_id,
|
|
|
77
|
+ </if>
|
|
|
78
|
+ <if test="loginName != null" >
|
|
|
79
|
+ login_name,
|
|
|
80
|
+ </if>
|
|
|
81
|
+ <if test="password != null" >
|
|
|
82
|
+ password,
|
|
|
83
|
+ </if>
|
|
|
84
|
+ <if test="no != null" >
|
|
|
85
|
+ no,
|
|
|
86
|
+ </if>
|
|
|
87
|
+ <if test="name != null" >
|
|
|
88
|
+ name,
|
|
|
89
|
+ </if>
|
|
|
90
|
+ <if test="email != null" >
|
|
|
91
|
+ email,
|
|
|
92
|
+ </if>
|
|
|
93
|
+ <if test="phone != null" >
|
|
|
94
|
+ phone,
|
|
|
95
|
+ </if>
|
|
|
96
|
+ <if test="mobile != null" >
|
|
|
97
|
+ mobile,
|
|
|
98
|
+ </if>
|
|
|
99
|
+ <if test="userType != null" >
|
|
|
100
|
+ user_type,
|
|
|
101
|
+ </if>
|
|
|
102
|
+ <if test="photo != null" >
|
|
|
103
|
+ photo,
|
|
|
104
|
+ </if>
|
|
|
105
|
+ <if test="loginIp != null" >
|
|
|
106
|
+ login_ip,
|
|
|
107
|
+ </if>
|
|
|
108
|
+ <if test="loginDate != null" >
|
|
|
109
|
+ login_date,
|
|
|
110
|
+ </if>
|
|
|
111
|
+ <if test="loginFlag != null" >
|
|
|
112
|
+ login_flag,
|
|
|
113
|
+ </if>
|
|
|
114
|
+ <if test="createBy != null" >
|
|
|
115
|
+ create_by,
|
|
|
116
|
+ </if>
|
|
|
117
|
+ <if test="createDate != null" >
|
|
|
118
|
+ create_date,
|
|
|
119
|
+ </if>
|
|
|
120
|
+ <if test="updateBy != null" >
|
|
|
121
|
+ update_by,
|
|
|
122
|
+ </if>
|
|
|
123
|
+ <if test="updateDate != null" >
|
|
|
124
|
+ update_date,
|
|
|
125
|
+ </if>
|
|
|
126
|
+ <if test="remarks != null" >
|
|
|
127
|
+ remarks,
|
|
|
128
|
+ </if>
|
|
|
129
|
+ <if test="delFlag != null" >
|
|
|
130
|
+ del_flag,
|
|
|
131
|
+ </if>
|
|
|
132
|
+ </trim>
|
|
|
133
|
+ <trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
|
134
|
+ <if test="id != null" >
|
|
|
135
|
+ #{id,jdbcType=VARCHAR},
|
|
|
136
|
+ </if>
|
|
|
137
|
+ <if test="companyId != null" >
|
|
|
138
|
+ #{companyId,jdbcType=VARCHAR},
|
|
|
139
|
+ </if>
|
|
|
140
|
+ <if test="officeId != null" >
|
|
|
141
|
+ #{officeId,jdbcType=VARCHAR},
|
|
|
142
|
+ </if>
|
|
|
143
|
+ <if test="loginName != null" >
|
|
|
144
|
+ #{loginName,jdbcType=VARCHAR},
|
|
|
145
|
+ </if>
|
|
|
146
|
+ <if test="password != null" >
|
|
|
147
|
+ #{password,jdbcType=VARCHAR},
|
|
|
148
|
+ </if>
|
|
|
149
|
+ <if test="no != null" >
|
|
|
150
|
+ #{no,jdbcType=VARCHAR},
|
|
|
151
|
+ </if>
|
|
|
152
|
+ <if test="name != null" >
|
|
|
153
|
+ #{name,jdbcType=VARCHAR},
|
|
|
154
|
+ </if>
|
|
|
155
|
+ <if test="email != null" >
|
|
|
156
|
+ #{email,jdbcType=VARCHAR},
|
|
|
157
|
+ </if>
|
|
|
158
|
+ <if test="phone != null" >
|
|
|
159
|
+ #{phone,jdbcType=VARCHAR},
|
|
|
160
|
+ </if>
|
|
|
161
|
+ <if test="mobile != null" >
|
|
|
162
|
+ #{mobile,jdbcType=VARCHAR},
|
|
|
163
|
+ </if>
|
|
|
164
|
+ <if test="userType != null" >
|
|
|
165
|
+ #{userType,jdbcType=CHAR},
|
|
|
166
|
+ </if>
|
|
|
167
|
+ <if test="photo != null" >
|
|
|
168
|
+ #{photo,jdbcType=VARCHAR},
|
|
|
169
|
+ </if>
|
|
|
170
|
+ <if test="loginIp != null" >
|
|
|
171
|
+ #{loginIp,jdbcType=VARCHAR},
|
|
|
172
|
+ </if>
|
|
|
173
|
+ <if test="loginDate != null" >
|
|
|
174
|
+ #{loginDate,jdbcType=TIMESTAMP},
|
|
|
175
|
+ </if>
|
|
|
176
|
+ <if test="loginFlag != null" >
|
|
|
177
|
+ #{loginFlag,jdbcType=VARCHAR},
|
|
|
178
|
+ </if>
|
|
|
179
|
+ <if test="createBy != null" >
|
|
|
180
|
+ #{createBy,jdbcType=VARCHAR},
|
|
|
181
|
+ </if>
|
|
|
182
|
+ <if test="createDate != null" >
|
|
|
183
|
+ #{createDate,jdbcType=TIMESTAMP},
|
|
|
184
|
+ </if>
|
|
|
185
|
+ <if test="updateBy != null" >
|
|
|
186
|
+ #{updateBy,jdbcType=VARCHAR},
|
|
|
187
|
+ </if>
|
|
|
188
|
+ <if test="updateDate != null" >
|
|
|
189
|
+ #{updateDate,jdbcType=TIMESTAMP},
|
|
|
190
|
+ </if>
|
|
|
191
|
+ <if test="remarks != null" >
|
|
|
192
|
+ #{remarks,jdbcType=VARCHAR},
|
|
|
193
|
+ </if>
|
|
|
194
|
+ <if test="delFlag != null" >
|
|
|
195
|
+ #{delFlag,jdbcType=CHAR},
|
|
|
196
|
+ </if>
|
|
|
197
|
+ </trim>
|
|
|
198
|
+ </insert>
|
|
|
199
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.tianbo.warehouse.model.KakoUser" >
|
|
|
200
|
+ update sys_user
|
|
|
201
|
+ <set >
|
|
|
202
|
+ <if test="companyId != null" >
|
|
|
203
|
+ company_id = #{companyId,jdbcType=VARCHAR},
|
|
|
204
|
+ </if>
|
|
|
205
|
+ <if test="officeId != null" >
|
|
|
206
|
+ office_id = #{officeId,jdbcType=VARCHAR},
|
|
|
207
|
+ </if>
|
|
|
208
|
+ <if test="loginName != null" >
|
|
|
209
|
+ login_name = #{loginName,jdbcType=VARCHAR},
|
|
|
210
|
+ </if>
|
|
|
211
|
+ <if test="password != null" >
|
|
|
212
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
213
|
+ </if>
|
|
|
214
|
+ <if test="no != null" >
|
|
|
215
|
+ no = #{no,jdbcType=VARCHAR},
|
|
|
216
|
+ </if>
|
|
|
217
|
+ <if test="name != null" >
|
|
|
218
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
219
|
+ </if>
|
|
|
220
|
+ <if test="email != null" >
|
|
|
221
|
+ email = #{email,jdbcType=VARCHAR},
|
|
|
222
|
+ </if>
|
|
|
223
|
+ <if test="phone != null" >
|
|
|
224
|
+ phone = #{phone,jdbcType=VARCHAR},
|
|
|
225
|
+ </if>
|
|
|
226
|
+ <if test="mobile != null" >
|
|
|
227
|
+ mobile = #{mobile,jdbcType=VARCHAR},
|
|
|
228
|
+ </if>
|
|
|
229
|
+ <if test="userType != null" >
|
|
|
230
|
+ user_type = #{userType,jdbcType=CHAR},
|
|
|
231
|
+ </if>
|
|
|
232
|
+ <if test="photo != null" >
|
|
|
233
|
+ photo = #{photo,jdbcType=VARCHAR},
|
|
|
234
|
+ </if>
|
|
|
235
|
+ <if test="loginIp != null" >
|
|
|
236
|
+ login_ip = #{loginIp,jdbcType=VARCHAR},
|
|
|
237
|
+ </if>
|
|
|
238
|
+ <if test="loginDate != null" >
|
|
|
239
|
+ login_date = #{loginDate,jdbcType=TIMESTAMP},
|
|
|
240
|
+ </if>
|
|
|
241
|
+ <if test="loginFlag != null" >
|
|
|
242
|
+ login_flag = #{loginFlag,jdbcType=VARCHAR},
|
|
|
243
|
+ </if>
|
|
|
244
|
+ <if test="createBy != null" >
|
|
|
245
|
+ create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
246
|
+ </if>
|
|
|
247
|
+ <if test="createDate != null" >
|
|
|
248
|
+ create_date = #{createDate,jdbcType=TIMESTAMP},
|
|
|
249
|
+ </if>
|
|
|
250
|
+ <if test="updateBy != null" >
|
|
|
251
|
+ update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
252
|
+ </if>
|
|
|
253
|
+ <if test="updateDate != null" >
|
|
|
254
|
+ update_date = #{updateDate,jdbcType=TIMESTAMP},
|
|
|
255
|
+ </if>
|
|
|
256
|
+ <if test="remarks != null" >
|
|
|
257
|
+ remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
258
|
+ </if>
|
|
|
259
|
+ <if test="delFlag != null" >
|
|
|
260
|
+ del_flag = #{delFlag,jdbcType=CHAR},
|
|
|
261
|
+ </if>
|
|
|
262
|
+ </set>
|
|
|
263
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
264
|
+ </update>
|
|
|
265
|
+ <update id="updateByPrimaryKey" parameterType="com.tianbo.warehouse.model.KakoUser" >
|
|
|
266
|
+ update sys_user
|
|
|
267
|
+ set company_id = #{companyId,jdbcType=VARCHAR},
|
|
|
268
|
+ office_id = #{officeId,jdbcType=VARCHAR},
|
|
|
269
|
+ login_name = #{loginName,jdbcType=VARCHAR},
|
|
|
270
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
271
|
+ no = #{no,jdbcType=VARCHAR},
|
|
|
272
|
+ name = #{name,jdbcType=VARCHAR},
|
|
|
273
|
+ email = #{email,jdbcType=VARCHAR},
|
|
|
274
|
+ phone = #{phone,jdbcType=VARCHAR},
|
|
|
275
|
+ mobile = #{mobile,jdbcType=VARCHAR},
|
|
|
276
|
+ user_type = #{userType,jdbcType=CHAR},
|
|
|
277
|
+ photo = #{photo,jdbcType=VARCHAR},
|
|
|
278
|
+ login_ip = #{loginIp,jdbcType=VARCHAR},
|
|
|
279
|
+ login_date = #{loginDate,jdbcType=TIMESTAMP},
|
|
|
280
|
+ login_flag = #{loginFlag,jdbcType=VARCHAR},
|
|
|
281
|
+ create_by = #{createBy,jdbcType=VARCHAR},
|
|
|
282
|
+ create_date = #{createDate,jdbcType=TIMESTAMP},
|
|
|
283
|
+ update_by = #{updateBy,jdbcType=VARCHAR},
|
|
|
284
|
+ update_date = #{updateDate,jdbcType=TIMESTAMP},
|
|
|
285
|
+ remarks = #{remarks,jdbcType=VARCHAR},
|
|
|
286
|
+ del_flag = #{delFlag,jdbcType=CHAR}
|
|
|
287
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
288
|
+ </update>
|
|
|
289
|
+
|
|
|
290
|
+ <update id="lockUser" parameterType="com.tianbo.warehouse.model.KakoUser" >
|
|
|
291
|
+ update sys_user
|
|
|
292
|
+ set
|
|
|
293
|
+ login_flag = #{loginFlag,jdbcType=VARCHAR}
|
|
|
294
|
+ where login_name = #{loginName,jdbcType=VARCHAR}
|
|
|
295
|
+ </update>
|
|
|
296
|
+</mapper> |