|
|
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.yoho.unions.dal.IProfileDAO">
|
|
|
4
|
+ <resultMap id="BaseResultMap"
|
|
|
5
|
+ type="com.yoho.unions.dal.model.Profile">
|
|
|
6
|
+ <id column="pid" property="pid" jdbcType="INTEGER" />
|
|
|
7
|
+ <result column="account" property="account" jdbcType="VARCHAR" />
|
|
|
8
|
+ <result column="truename" property="truename" jdbcType="VARCHAR" />
|
|
|
9
|
+ <result column="staff_code" property="staffCode" jdbcType="VARCHAR" />
|
|
|
10
|
+ <result column="email" property="email" jdbcType="VARCHAR" />
|
|
|
11
|
+ <result column="password" property="password" jdbcType="VARCHAR" />
|
|
|
12
|
+ <result column="phone" property="phone" jdbcType="VARCHAR" />
|
|
|
13
|
+ <result column="create_time" property="createTime" jdbcType="INTEGER" />
|
|
|
14
|
+ <result column="expires" property="expires" jdbcType="INTEGER" />
|
|
|
15
|
+ <result column="login_time" property="loginTime" jdbcType="INTEGER" />
|
|
|
16
|
+ <result column="status" property="status" jdbcType="TINYINT" />
|
|
|
17
|
+ <result column="identity" property="identity" jdbcType="TINYINT" />
|
|
|
18
|
+ <result column="auth_site" property="authSite" jdbcType="VARCHAR" />
|
|
|
19
|
+ <result column="role_id" property="roleId" jdbcType="INTEGER" />
|
|
|
20
|
+ <result column="dept_id" property="deptId" jdbcType="INTEGER" />
|
|
|
21
|
+ </resultMap>
|
|
|
22
|
+ <sql id="Base_Column_List">
|
|
|
23
|
+ pid, account, truename, staff_code, email, password, phone, create_time,
|
|
|
24
|
+ expires,
|
|
|
25
|
+ login_time, status, identity, auth_site, role_id, dept_id
|
|
|
26
|
+ </sql>
|
|
|
27
|
+ <select id="selectByPrimaryKey" resultMap="BaseResultMap"
|
|
|
28
|
+ parameterType="java.lang.Integer">
|
|
|
29
|
+ select
|
|
|
30
|
+ <include refid="Base_Column_List" />
|
|
|
31
|
+ from profile
|
|
|
32
|
+ where pid = #{pid,jdbcType=INTEGER}
|
|
|
33
|
+ </select>
|
|
|
34
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
|
35
|
+ delete from profile
|
|
|
36
|
+ where pid = #{pid,jdbcType=INTEGER}
|
|
|
37
|
+ </delete>
|
|
|
38
|
+ <insert id="insert" parameterType="com.yoho.unions.dal.model.Profile">
|
|
|
39
|
+ insert into profile (pid, account, truename,
|
|
|
40
|
+ staff_code, email, password,
|
|
|
41
|
+ phone, create_time, expires,
|
|
|
42
|
+ login_time, status, identity,
|
|
|
43
|
+ auth_site)
|
|
|
44
|
+ values (#{pid,jdbcType=INTEGER}, #{account,jdbcType=VARCHAR},
|
|
|
45
|
+ #{truename,jdbcType=VARCHAR},
|
|
|
46
|
+ #{staffCode,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
|
|
|
47
|
+ #{phone,jdbcType=VARCHAR}, #{createTime,jdbcType=INTEGER},
|
|
|
48
|
+ #{expires,jdbcType=INTEGER},
|
|
|
49
|
+ #{loginTime,jdbcType=INTEGER}, #{status,jdbcType=TINYINT}, #{identity,jdbcType=TINYINT},
|
|
|
50
|
+ #{authSite,jdbcType=VARCHAR})
|
|
|
51
|
+ </insert>
|
|
|
52
|
+ <insert id="insertSelective" parameterType="com.yoho.unions.dal.model.Profile">
|
|
|
53
|
+ insert into profile
|
|
|
54
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
55
|
+ <if test="pid != null">
|
|
|
56
|
+ pid,
|
|
|
57
|
+ </if>
|
|
|
58
|
+ <if test="account != null">
|
|
|
59
|
+ account,
|
|
|
60
|
+ </if>
|
|
|
61
|
+ <if test="truename != null">
|
|
|
62
|
+ truename,
|
|
|
63
|
+ </if>
|
|
|
64
|
+ <if test="staffCode != null">
|
|
|
65
|
+ staff_code,
|
|
|
66
|
+ </if>
|
|
|
67
|
+ <if test="email != null">
|
|
|
68
|
+ email,
|
|
|
69
|
+ </if>
|
|
|
70
|
+ <if test="password != null">
|
|
|
71
|
+ password,
|
|
|
72
|
+ </if>
|
|
|
73
|
+ <if test="phone != null">
|
|
|
74
|
+ phone,
|
|
|
75
|
+ </if>
|
|
|
76
|
+ <if test="createTime != null">
|
|
|
77
|
+ create_time,
|
|
|
78
|
+ </if>
|
|
|
79
|
+ <if test="expires != null">
|
|
|
80
|
+ expires,
|
|
|
81
|
+ </if>
|
|
|
82
|
+ <if test="loginTime != null">
|
|
|
83
|
+ login_time,
|
|
|
84
|
+ </if>
|
|
|
85
|
+ <if test="status != null">
|
|
|
86
|
+ status,
|
|
|
87
|
+ </if>
|
|
|
88
|
+ <if test="identity != null">
|
|
|
89
|
+ identity,
|
|
|
90
|
+ </if>
|
|
|
91
|
+ <if test="authSite != null">
|
|
|
92
|
+ auth_site,
|
|
|
93
|
+ </if>
|
|
|
94
|
+ </trim>
|
|
|
95
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
96
|
+ <if test="pid != null">
|
|
|
97
|
+ #{pid,jdbcType=INTEGER},
|
|
|
98
|
+ </if>
|
|
|
99
|
+ <if test="account != null">
|
|
|
100
|
+ #{account,jdbcType=VARCHAR},
|
|
|
101
|
+ </if>
|
|
|
102
|
+ <if test="truename != null">
|
|
|
103
|
+ #{truename,jdbcType=VARCHAR},
|
|
|
104
|
+ </if>
|
|
|
105
|
+ <if test="staffCode != null">
|
|
|
106
|
+ #{staffCode,jdbcType=VARCHAR},
|
|
|
107
|
+ </if>
|
|
|
108
|
+ <if test="email != null">
|
|
|
109
|
+ #{email,jdbcType=VARCHAR},
|
|
|
110
|
+ </if>
|
|
|
111
|
+ <if test="password != null">
|
|
|
112
|
+ #{password,jdbcType=VARCHAR},
|
|
|
113
|
+ </if>
|
|
|
114
|
+ <if test="phone != null">
|
|
|
115
|
+ #{phone,jdbcType=VARCHAR},
|
|
|
116
|
+ </if>
|
|
|
117
|
+ <if test="createTime != null">
|
|
|
118
|
+ #{createTime,jdbcType=INTEGER},
|
|
|
119
|
+ </if>
|
|
|
120
|
+ <if test="expires != null">
|
|
|
121
|
+ #{expires,jdbcType=INTEGER},
|
|
|
122
|
+ </if>
|
|
|
123
|
+ <if test="loginTime != null">
|
|
|
124
|
+ #{loginTime,jdbcType=INTEGER},
|
|
|
125
|
+ </if>
|
|
|
126
|
+ <if test="status != null">
|
|
|
127
|
+ #{status,jdbcType=TINYINT},
|
|
|
128
|
+ </if>
|
|
|
129
|
+ <if test="identity != null">
|
|
|
130
|
+ #{identity,jdbcType=TINYINT},
|
|
|
131
|
+ </if>
|
|
|
132
|
+ <if test="authSite != null">
|
|
|
133
|
+ #{authSite,jdbcType=VARCHAR},
|
|
|
134
|
+ </if>
|
|
|
135
|
+ </trim>
|
|
|
136
|
+ </insert>
|
|
|
137
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.yoho.unions.dal.model.Profile">
|
|
|
138
|
+ update profile
|
|
|
139
|
+ <set>
|
|
|
140
|
+ <if test="account != null">
|
|
|
141
|
+ account = #{account,jdbcType=VARCHAR},
|
|
|
142
|
+ </if>
|
|
|
143
|
+ <if test="truename != null">
|
|
|
144
|
+ truename = #{truename,jdbcType=VARCHAR},
|
|
|
145
|
+ </if>
|
|
|
146
|
+ <if test="staffCode != null">
|
|
|
147
|
+ staff_code = #{staffCode,jdbcType=VARCHAR},
|
|
|
148
|
+ </if>
|
|
|
149
|
+ <if test="email != null">
|
|
|
150
|
+ email = #{email,jdbcType=VARCHAR},
|
|
|
151
|
+ </if>
|
|
|
152
|
+ <if test="password != null">
|
|
|
153
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
154
|
+ </if>
|
|
|
155
|
+ <if test="phone != null">
|
|
|
156
|
+ phone = #{phone,jdbcType=VARCHAR},
|
|
|
157
|
+ </if>
|
|
|
158
|
+ <if test="createTime != null">
|
|
|
159
|
+ create_time = #{createTime,jdbcType=INTEGER},
|
|
|
160
|
+ </if>
|
|
|
161
|
+ <if test="expires != null">
|
|
|
162
|
+ expires = #{expires,jdbcType=INTEGER},
|
|
|
163
|
+ </if>
|
|
|
164
|
+ <if test="loginTime != null">
|
|
|
165
|
+ login_time = #{loginTime,jdbcType=INTEGER},
|
|
|
166
|
+ </if>
|
|
|
167
|
+ <if test="status != null">
|
|
|
168
|
+ status = #{status,jdbcType=TINYINT},
|
|
|
169
|
+ </if>
|
|
|
170
|
+ <if test="identity != null">
|
|
|
171
|
+ identity = #{identity,jdbcType=TINYINT},
|
|
|
172
|
+ </if>
|
|
|
173
|
+ <if test="authSite != null">
|
|
|
174
|
+ auth_site = #{authSite,jdbcType=VARCHAR},
|
|
|
175
|
+ </if>
|
|
|
176
|
+ </set>
|
|
|
177
|
+ where pid = #{pid,jdbcType=INTEGER}
|
|
|
178
|
+ </update>
|
|
|
179
|
+ <update id="updateByPrimaryKey" parameterType="com.yoho.unions.dal.model.Profile">
|
|
|
180
|
+ update profile
|
|
|
181
|
+ set account = #{account,jdbcType=VARCHAR},
|
|
|
182
|
+ truename = #{truename,jdbcType=VARCHAR},
|
|
|
183
|
+ staff_code = #{staffCode,jdbcType=VARCHAR},
|
|
|
184
|
+ email = #{email,jdbcType=VARCHAR},
|
|
|
185
|
+ password = #{password,jdbcType=VARCHAR},
|
|
|
186
|
+ phone = #{phone,jdbcType=VARCHAR},
|
|
|
187
|
+ create_time = #{createTime,jdbcType=INTEGER},
|
|
|
188
|
+ expires = #{expires,jdbcType=INTEGER},
|
|
|
189
|
+ login_time = #{loginTime,jdbcType=INTEGER},
|
|
|
190
|
+ status = #{status,jdbcType=TINYINT},
|
|
|
191
|
+ identity = #{identity,jdbcType=TINYINT},
|
|
|
192
|
+ auth_site = #{authSite,jdbcType=VARCHAR}
|
|
|
193
|
+ where pid = #{pid,jdbcType=INTEGER}
|
|
|
194
|
+ </update>
|
|
|
195
|
+ <select id="batchSelectByPrimaryKey" resultMap="BaseResultMap"
|
|
|
196
|
+ parameterType="java.util.List" >
|
|
|
197
|
+ select
|
|
|
198
|
+ <include refid="Base_Column_List" />
|
|
|
199
|
+ from profile
|
|
|
200
|
+ where pid in
|
|
|
201
|
+ <foreach collection="list" item="item" open="(" close=")" separator=",">
|
|
|
202
|
+ #{item}
|
|
|
203
|
+ </foreach>
|
|
|
204
|
+ </select>
|
|
|
205
|
+</mapper> |