提交 | 用户 | 时间
|
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.i18n.mapper.TranslationMapper"> |
|
4 |
|
|
5 |
<!-- 通用查询映射结果 --> |
|
6 |
<resultMap id="BaseResultMap" type="cn.stylefeng.guns.base.i18n.entity.Translation"> |
|
7 |
<id column="tran_id" property="tranId" /> |
|
8 |
<result column="tran_code" property="tranCode" /> |
|
9 |
<result column="tran_name" property="tranName" /> |
|
10 |
<result column="languages" property="languages" /> |
|
11 |
<result column="tran_value" property="tranValue" /> |
|
12 |
<result column="create_time" property="createTime" /> |
|
13 |
<result column="create_user" property="createUser" /> |
|
14 |
<result column="update_time" property="updateTime" /> |
|
15 |
<result column="update_user" property="updateUser" /> |
|
16 |
</resultMap> |
|
17 |
|
|
18 |
<!-- 通用查询结果列 --> |
|
19 |
<sql id="Base_Column_List"> |
|
20 |
tran_id AS "tranId", tran_code AS "tranCode", tran_name AS "tranName", languages AS "languages", tran_value AS "tranValue", create_time AS "createTime", create_user AS "createUser", update_time AS "updateTime", update_user AS "updateUser" |
|
21 |
</sql> |
|
22 |
|
|
23 |
|
|
24 |
<select id="customList" resultType="cn.stylefeng.guns.base.i18n.model.result.TranslationResult" parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam"> |
|
25 |
select |
|
26 |
<include refid="Base_Column_List"/> |
|
27 |
from sys_translation where 1 = 1 |
|
28 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
29 |
and tran_code like CONCAT('%',#{paramCondition.tranCode},'%') |
|
30 |
</if> |
|
31 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
32 |
and tran_name like CONCAT('%',#{paramCondition.tranName},'%') |
|
33 |
</if> |
|
34 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
35 |
and languages like CONCAT('%',#{paramCondition.languages},'%') |
|
36 |
</if> |
|
37 |
</select> |
|
38 |
|
|
39 |
<select id="customList" resultType="cn.stylefeng.guns.base.i18n.model.result.TranslationResult" |
|
40 |
parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam" databaseId="mssql"> |
|
41 |
select |
|
42 |
<include refid="Base_Column_List"/> |
|
43 |
from sys_translation where 1 = 1 |
|
44 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
45 |
and tran_code like CONCAT('%',#{paramCondition.tranCode},'%') |
|
46 |
</if> |
|
47 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
48 |
and tran_name like CONCAT('%',#{paramCondition.tranName},'%') |
|
49 |
</if> |
|
50 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
51 |
and languages like CONCAT('%',#{paramCondition.languages},'%') |
|
52 |
</if> |
|
53 |
</select> |
|
54 |
|
|
55 |
<select id="customList" resultType="cn.stylefeng.guns.base.i18n.model.result.TranslationResult" |
|
56 |
parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam" databaseId="pgsql"> |
|
57 |
select |
|
58 |
<include refid="Base_Column_List"/> |
|
59 |
from sys_translation where 1 = 1 |
|
60 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
61 |
and tran_code like '%' || #{paramCondition.tranCode} || '%' |
|
62 |
</if> |
|
63 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
64 |
and tran_name like '%' || #{paramCondition.tranName} || '%' |
|
65 |
</if> |
|
66 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
67 |
and languages like '%' || #{paramCondition.languages} || '%' |
|
68 |
</if> |
|
69 |
</select> |
|
70 |
|
|
71 |
<select id="customList" resultType="cn.stylefeng.guns.base.i18n.model.result.TranslationResult" |
|
72 |
parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam" databaseId="oracle"> |
|
73 |
select |
|
74 |
<include refid="Base_Column_List"/> |
|
75 |
from sys_translation where 1 = 1 |
|
76 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
77 |
and tran_code like '%' || #{paramCondition.tranCode} || '%' |
|
78 |
</if> |
|
79 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
80 |
and tran_name like '%' || #{paramCondition.tranName} || '%' |
|
81 |
</if> |
|
82 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
83 |
and languages like '%' || #{paramCondition.languages} || '%' |
|
84 |
</if> |
|
85 |
</select> |
|
86 |
|
|
87 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam"> |
|
88 |
select |
|
89 |
<include refid="Base_Column_List"/> |
|
90 |
from sys_translation where 1 = 1 |
|
91 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
92 |
and tran_code like CONCAT('%',#{paramCondition.tranCode},'%') |
|
93 |
</if> |
|
94 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
95 |
and tran_name like CONCAT('%',#{paramCondition.tranName},'%') |
|
96 |
</if> |
|
97 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
98 |
and languages like CONCAT('%',#{paramCondition.languages},'%') |
|
99 |
</if> |
|
100 |
</select> |
|
101 |
|
|
102 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam" databaseId="mssql"> |
|
103 |
select |
|
104 |
<include refid="Base_Column_List"/> |
|
105 |
from sys_translation where 1 = 1 |
|
106 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
107 |
and tran_code like CONCAT('%',#{paramCondition.tranCode},'%') |
|
108 |
</if> |
|
109 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
110 |
and tran_name like CONCAT('%',#{paramCondition.tranName},'%') |
|
111 |
</if> |
|
112 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
113 |
and languages like CONCAT('%',#{paramCondition.languages},'%') |
|
114 |
</if> |
|
115 |
</select> |
|
116 |
|
|
117 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam" databaseId="pgsql"> |
|
118 |
select |
|
119 |
<include refid="Base_Column_List"/> |
|
120 |
from sys_translation where 1 = 1 |
|
121 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
122 |
and tran_code like '%' || #{paramCondition.tranCode} || '%' |
|
123 |
</if> |
|
124 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
125 |
and tran_name like '%' || #{paramCondition.tranName} || '%' |
|
126 |
</if> |
|
127 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
128 |
and languages like '%' || #{paramCondition.languages} || '%' |
|
129 |
</if> |
|
130 |
</select> |
|
131 |
|
|
132 |
<select id="customMapList" resultType="map" parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam" databaseId="oracle"> |
|
133 |
select |
|
134 |
<include refid="Base_Column_List"/> |
|
135 |
from sys_translation where 1 = 1 |
|
136 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
137 |
and tran_code like '%' || #{paramCondition.tranCode} || '%' |
|
138 |
</if> |
|
139 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
140 |
and tran_name like '%' || #{paramCondition.tranName} || '%' |
|
141 |
</if> |
|
142 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
143 |
and languages like '%' || #{paramCondition.languages} || '%' |
|
144 |
</if> |
|
145 |
</select> |
|
146 |
|
|
147 |
<select id="customPageList" resultType="cn.stylefeng.guns.base.i18n.model.result.TranslationResult" parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam"> |
|
148 |
select |
|
149 |
<include refid="Base_Column_List"/> |
|
150 |
from sys_translation |
|
151 |
<where> |
|
152 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
153 |
tran_code like CONCAT('%',#{paramCondition.tranCode},'%') |
|
154 |
</if> |
|
155 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
156 |
or tran_name like CONCAT('%',#{paramCondition.tranName},'%') |
|
157 |
</if> |
|
158 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
159 |
or languages like CONCAT('%',#{paramCondition.languages},'%') |
|
160 |
</if> |
|
161 |
</where> |
|
162 |
</select> |
|
163 |
|
|
164 |
<select id="customPageList" resultType="cn.stylefeng.guns.base.i18n.model.result.TranslationResult" |
|
165 |
parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam" databaseId="mssql"> |
|
166 |
select |
|
167 |
<include refid="Base_Column_List"/> |
|
168 |
from sys_translation |
|
169 |
<where> |
|
170 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
171 |
tran_code like CONCAT('%',#{paramCondition.tranCode},'%') |
|
172 |
</if> |
|
173 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
174 |
or tran_name like CONCAT('%',#{paramCondition.tranName},'%') |
|
175 |
</if> |
|
176 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
177 |
or languages like CONCAT('%',#{paramCondition.languages},'%') |
|
178 |
</if> |
|
179 |
</where> |
|
180 |
</select> |
|
181 |
|
|
182 |
<select id="customPageList" resultType="cn.stylefeng.guns.base.i18n.model.result.TranslationResult" |
|
183 |
parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam" databaseId="pgsql"> |
|
184 |
select |
|
185 |
<include refid="Base_Column_List"/> |
|
186 |
from sys_translation |
|
187 |
<where> |
|
188 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
189 |
tran_code like '%' || #{paramCondition.tranCode} || '%' |
|
190 |
</if> |
|
191 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
192 |
or tran_name like '%' || #{paramCondition.tranName} || '%' |
|
193 |
</if> |
|
194 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
195 |
or languages like '%' || #{paramCondition.languages} || '%' |
|
196 |
</if> |
|
197 |
</where> |
|
198 |
</select> |
|
199 |
|
|
200 |
<select id="customPageList" resultType="cn.stylefeng.guns.base.i18n.model.result.TranslationResult" |
|
201 |
parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam" databaseId="oracle"> |
|
202 |
select |
|
203 |
<include refid="Base_Column_List"/> |
|
204 |
from sys_translation |
|
205 |
<where> |
|
206 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
207 |
tran_code like '%' || #{paramCondition.tranCode} || '%' |
|
208 |
</if> |
|
209 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
210 |
or tran_name like '%' || #{paramCondition.tranName} || '%' |
|
211 |
</if> |
|
212 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
213 |
or languages like '%' || #{paramCondition.languages} || '%' |
|
214 |
</if> |
|
215 |
</where> |
|
216 |
</select> |
|
217 |
|
|
218 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam"> |
|
219 |
select |
|
220 |
<include refid="Base_Column_List"/> |
|
221 |
from sys_translation where 1 = 1 |
|
222 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
223 |
and tran_code like CONCAT('%',#{paramCondition.tranCode},'%') |
|
224 |
</if> |
|
225 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
226 |
and tran_name like CONCAT('%',#{paramCondition.tranName},'%') |
|
227 |
</if> |
|
228 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
229 |
and languages like CONCAT('%',#{paramCondition.languages},'%') |
|
230 |
</if> |
|
231 |
</select> |
|
232 |
|
|
233 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam" databaseId="mssql"> |
|
234 |
select |
|
235 |
<include refid="Base_Column_List"/> |
|
236 |
from sys_translation where 1 = 1 |
|
237 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
238 |
and tran_code like CONCAT('%',#{paramCondition.tranCode},'%') |
|
239 |
</if> |
|
240 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
241 |
and tran_name like CONCAT('%',#{paramCondition.tranName},'%') |
|
242 |
</if> |
|
243 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
244 |
and languages like CONCAT('%',#{paramCondition.languages},'%') |
|
245 |
</if> |
|
246 |
</select> |
|
247 |
|
|
248 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam" databaseId="pgsql"> |
|
249 |
select |
|
250 |
<include refid="Base_Column_List"/> |
|
251 |
from sys_translation where 1 = 1 |
|
252 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
253 |
and tran_code like '%' || #{paramCondition.tranCode} || '%' |
|
254 |
</if> |
|
255 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
256 |
and tran_name like '%' || #{paramCondition.tranName} || '%' |
|
257 |
</if> |
|
258 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
259 |
and languages like '%' || #{paramCondition.languages} || '%' |
|
260 |
</if> |
|
261 |
</select> |
|
262 |
|
|
263 |
<select id="customPageMapList" resultType="map" parameterType="cn.stylefeng.guns.base.i18n.model.params.TranslationParam" databaseId="oracle"> |
|
264 |
select |
|
265 |
<include refid="Base_Column_List"/> |
|
266 |
from sys_translation where 1 = 1 |
|
267 |
<if test="paramCondition.tranCode != null and paramCondition.tranCode != ''"> |
|
268 |
and tran_code like '%' || #{paramCondition.tranCode} || '%' |
|
269 |
</if> |
|
270 |
<if test="paramCondition.tranName != null and paramCondition.tranName != ''"> |
|
271 |
and tran_name like '%' || #{paramCondition.tranName} || '%' |
|
272 |
</if> |
|
273 |
<if test="paramCondition.languages != null and paramCondition.languages != ''"> |
|
274 |
and languages like '%' || #{paramCondition.languages} || '%' |
|
275 |
</if> |
|
276 |
</select> |
|
277 |
|
|
278 |
</mapper> |