1 <?xml version="1.0" encoding="UTF-8"?>
2
3
4
5
6
7
8
9
10
11
12
13
17
18 insert into t_user(id,user_name,sex) values (null,#{u.userName},#{u.sex})19
20
21
22 insert into t_user (user_name,sex) values23
24
25
26
29
30 (#{u.userName},#{u.sex})31
32
33
34
35
38
39 update t_user40
41
42 user_name = #{u.userName},43
44
45
46 sex = #{u.sex}47
48
49
50
51
52 id = #{id}53
54
55
56
57 delete from t_user where id = #{id}58
59
60
61 delete from t_user where id in (62
63 #{id}64
65 )66
67
72
73
74
75 select * from t_user where id = #{id}76
77
78
79
80 select u.user_name as userName,u.sex as sex from t_user as u where u.user_name like CONCAT('%',#{name},'%')81
82
83
84 select u.user_name as userName,u.sex as sex from t_user as u left join t_dept as d on u.fk_dept_id = d.id where d.dept_name like CONCAT('%',#{name},'%')85
86
87
88
89 select u.user_name as userName,u.sex as sex from t_user as u left join t_dept as d on u.fk_dept_id = d.id where d.dept_name like CONCAT('%',#{u.dept.deptName},'%')90
91
92
93
94 select count(u.id) from t_user as u left join t_dept as d on u.fk_dept_id = d.id95
96
97
98
99
100
101 select u.id as id,u.user_name as userName,u.sex as sex from t_user as u left join t_dept as d on u.fk_dept_id = d.id102
103
104 limit ${page.index},${page.rows}105
106
107
108
109
110
111
112 and u.user_name like CONCAT('%',#{userName},'%')113
114
115
116 and d.dept_name like CONCAT('%',#{deptName},'%')117
118
119
120
121
122
123 select count(u.id) from t_user as u left join t_dept as d on u.fk_dept_id = d.id124
125
126
127
128
129
130 select u.id as id,u.user_name as userName,u.sex as sex from t_user as u left join t_dept as d on u.fk_dept_id = d.id131
132
133
134
135 u.id desc limit ${index},${rows}136
137
138
139 select id as id,user_name as userName,sex as sex from t_user140
141
142
144
145
146 user_name like CONCAT('%',#{name},'%')147
148
149 and sex like CONCAT('%',#{sex},'%')150
151 1=1
152
153
154
155
156