提交 | 用户 | 时间
|
1ac2bc
|
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="cn.stylefeng.guns.tenant.mapper.TenantInfoMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.base.tenant.entity.TenantInfo"> |
|
7 |
<id column="tenant_id" property="tenantId" /> |
|
8 |
<result column="name" property="name" /> |
|
9 |
<result column="code" property="code" /> |
|
10 |
<result column="db_name" property="dbName" /> |
|
11 |
<result column="create_time" property="createTime" /> |
|
12 |
<result column="create_user" property="createUser" /> |
|
13 |
<result column="update_time" property="updateTime" /> |
|
14 |
<result column="update_user" property="updateUser" /> |
|
15 |
</resultMap> |
|
16 |
|
|
17 |
<!-- 通用查询结果列 --> |
|
18 |
<sql id="Base_Column_List"> |
|
19 |
tenant_id AS "tenantId", name AS "name", code AS "code", db_name AS "dbName", create_time AS "createTime", create_user AS "createUser", update_time AS "updateTime", update_user AS "updateUser" |
|
20 |
</sql> |
|
21 |
|
|
22 |
|
|
23 |
<select id="customList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult" parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam"> |
|
24 |
select |
|
25 |
<include refid="Base_Column_List"/> |
|
26 |
from tenant_info where 1 = 1 |
|
27 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
28 |
and name like CONCAT('%',#{paramCondition.name},'%') |
|
29 |
</if> |
|
30 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
31 |
and code like CONCAT('%',#{paramCondition.code},'%') |
|
32 |
</if> |
|
33 |
</select> |
|
34 |
|
|
35 |
<select id="customList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult" |
|
36 |
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="mssql"> |
|
37 |
select |
|
38 |
<include refid="Base_Column_List"/> |
|
39 |
from tenant_info where 1 = 1 |
|
40 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
41 |
and name like CONCAT('%',#{paramCondition.name},'%') |
|
42 |
</if> |
|
43 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
44 |
and code like CONCAT('%',#{paramCondition.code},'%') |
|
45 |
</if> |
|
46 |
</select> |
|
47 |
|
|
48 |
<select id="customList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult" |
|
49 |
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="pgsql"> |
|
50 |
select |
|
51 |
<include refid="Base_Column_List"/> |
|
52 |
from tenant_info where 1 = 1 |
|
53 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
54 |
and name like '%' || #{paramCondition.name} || '%' |
|
55 |
</if> |
|
56 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
57 |
and code like '%' || #{paramCondition.code} || '%' |
|
58 |
</if> |
|
59 |
</select> |
|
60 |
|
|
61 |
<select id="customList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult" |
|
62 |
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="oracle"> |
|
63 |
select |
|
64 |
<include refid="Base_Column_List"/> |
|
65 |
from tenant_info where 1 = 1 |
|
66 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
67 |
and name like '%' || #{paramCondition.name} || '%' |
|
68 |
</if> |
|
69 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
70 |
and code like '%' || #{paramCondition.code} || '%' |
|
71 |
</if> |
|
72 |
</select> |
|
73 |
|
|
74 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam"> |
|
75 |
select |
|
76 |
<include refid="Base_Column_List"/> |
|
77 |
from tenant_info where 1 = 1 |
|
78 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
79 |
and name like CONCAT('%',#{paramCondition.name},'%') |
|
80 |
</if> |
|
81 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
82 |
and code like CONCAT('%',#{paramCondition.code},'%') |
|
83 |
</if> |
|
84 |
</select> |
|
85 |
|
|
86 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="mssql"> |
|
87 |
select |
|
88 |
<include refid="Base_Column_List"/> |
|
89 |
from tenant_info where 1 = 1 |
|
90 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
91 |
and name like CONCAT('%',#{paramCondition.name},'%') |
|
92 |
</if> |
|
93 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
94 |
and code like CONCAT('%',#{paramCondition.code},'%') |
|
95 |
</if> |
|
96 |
</select> |
|
97 |
|
|
98 |
<select id="customMapList" resultType="map" |
|
99 |
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="pgsql"> |
|
100 |
select |
|
101 |
<include refid="Base_Column_List"/> |
|
102 |
from tenant_info where 1 = 1 |
|
103 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
104 |
and name like '%' || #{paramCondition.name} || '%' |
|
105 |
</if> |
|
106 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
107 |
and code like '%' || #{paramCondition.code} || '%' |
|
108 |
</if> |
|
109 |
</select> |
|
110 |
|
|
111 |
<select id="customMapList" resultType="map" |
|
112 |
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="oracle"> |
|
113 |
select |
|
114 |
<include refid="Base_Column_List"/> |
|
115 |
from tenant_info where 1 = 1 |
|
116 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
117 |
and name like '%' || #{paramCondition.name} || '%' |
|
118 |
</if> |
|
119 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
120 |
and code like '%' || #{paramCondition.code} || '%' |
|
121 |
</if> |
|
122 |
</select> |
|
123 |
|
|
124 |
<select id="customPageList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult" parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam"> |
|
125 |
select |
|
126 |
<include refid="Base_Column_List"/> |
|
127 |
from tenant_info where 1 = 1 |
|
128 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
129 |
and name like CONCAT('%',#{paramCondition.name},'%') |
|
130 |
</if> |
|
131 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
132 |
and code like CONCAT('%',#{paramCondition.code},'%') |
|
133 |
</if> |
|
134 |
</select> |
|
135 |
|
|
136 |
<select id="customPageList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult" |
|
137 |
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="mssql"> |
|
138 |
select |
|
139 |
<include refid="Base_Column_List"/> |
|
140 |
from tenant_info where 1 = 1 |
|
141 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
142 |
and name like CONCAT('%',#{paramCondition.name},'%') |
|
143 |
</if> |
|
144 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
145 |
and code like CONCAT('%',#{paramCondition.code},'%') |
|
146 |
</if> |
|
147 |
</select> |
|
148 |
|
|
149 |
<select id="customPageList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult" |
|
150 |
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="pgsql"> |
|
151 |
select |
|
152 |
<include refid="Base_Column_List"/> |
|
153 |
from tenant_info where 1 = 1 |
|
154 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
155 |
and name like '%' || #{paramCondition.name} || '%' |
|
156 |
</if> |
|
157 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
158 |
and code like '%' || #{paramCondition.code} || '%' |
|
159 |
</if> |
|
160 |
</select> |
|
161 |
|
|
162 |
<select id="customPageList" resultType="cn.stylefeng.guns.base.tenant.model.result.TenantInfoResult" |
|
163 |
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="oracle"> |
|
164 |
select |
|
165 |
<include refid="Base_Column_List"/> |
|
166 |
from tenant_info where 1 = 1 |
|
167 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
168 |
and name like '%' || #{paramCondition.name} || '%' |
|
169 |
</if> |
|
170 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
171 |
and code like '%' || #{paramCondition.code} || '%' |
|
172 |
</if> |
|
173 |
</select> |
|
174 |
|
|
175 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam"> |
|
176 |
select |
|
177 |
<include refid="Base_Column_List"/> |
|
178 |
from tenant_info where 1 = 1 |
|
179 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
180 |
and name like CONCAT('%',#{paramCondition.name},'%') |
|
181 |
</if> |
|
182 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
183 |
and code like CONCAT('%',#{paramCondition.code},'%') |
|
184 |
</if> |
|
185 |
</select> |
|
186 |
|
|
187 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="mssql"> |
|
188 |
select |
|
189 |
<include refid="Base_Column_List"/> |
|
190 |
from tenant_info where 1 = 1 |
|
191 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
192 |
and name like CONCAT('%',#{paramCondition.name},'%') |
|
193 |
</if> |
|
194 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
195 |
and code like CONCAT('%',#{paramCondition.code},'%') |
|
196 |
</if> |
|
197 |
</select> |
|
198 |
|
|
199 |
<select id="customPageMapList" resultType="map" |
|
200 |
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="pgsql"> |
|
201 |
select |
|
202 |
<include refid="Base_Column_List"/> |
|
203 |
from tenant_info where 1 = 1 |
|
204 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
205 |
and name like '%' || #{paramCondition.name} || '%' |
|
206 |
</if> |
|
207 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
208 |
and code like '%' || #{paramCondition.code} || '%' |
|
209 |
</if> |
|
210 |
</select> |
|
211 |
|
|
212 |
<select id="customPageMapList" resultType="map" |
|
213 |
parameterType="cn.stylefeng.guns.base.tenant.model.params.TenantInfoParam" databaseId="oracle"> |
|
214 |
select |
|
215 |
<include refid="Base_Column_List"/> |
|
216 |
from tenant_info where 1 = 1 |
|
217 |
<if test="paramCondition.name != null and paramCondition.name != ''"> |
|
218 |
and name like '%' || #{paramCondition.name} || '%' |
|
219 |
</if> |
|
220 |
<if test="paramCondition.code != null and paramCondition.code != ''"> |
|
221 |
and code like '%' || #{paramCondition.code} || '%' |
|
222 |
</if> |
|
223 |
</select> |
|
224 |
|
|
225 |
</mapper> |