陶杰
2024-10-10 5a3e888042c61e37c2470930939c9edfdd41f7c9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.mzl.flower.mapper.report.OrderReportMapper">
 
    <select id="getOrderDateReport" resultType="com.mzl.flower.dto.response.report.OrderReportResultVO">
        select
        sum(order_total)  as order_total,
        sum(order_supplier_price_amount)  as order_supplier_price_amount,
        sum(order_markup_one_amount)  as order_markup_one_amount,
        sum(order_markup_two_amount)  as order_markup_two_amount,
        sum(order_markup_partner_amount)  as order_markup_partner_amount,
        sum(order_price_discount_amount)  as order_price_discount_amount,
        sum(order_coupon_amount_total)  as order_coupon_amount_total,
        sum(order_check_fee)  as order_check_fee,
        sum(order_lack_fee_supplier)  as order_lack_fee_supplier,
        sum(order_replace_fee)  as order_replace_fee,
        sum(order_fee_supplier)  as order_fee_supplier,
        sum(order_fee_partner)  as order_fee_partner,
        sum(order_fee_platform)  as order_fee_platform,
        sum(order_fee_platform_pack)  as order_fee_platform_pack,
        sum(order_fee_platform_check)  as order_fee_platform_check,
        sum(order_fee_platform_transport)  as order_fee_platform_transport,
        sum(order_total_fee)  as order_total_fee,
        sum(order_fee_packing_transport)  as order_fee_packing_transport,
        sum(order_num) as order_num,
        sum(order_replace_num) as order_replace_num,
        sum(order_reduce_num) as order_reduce_num,
        sum(order_lack_num) as order_lack_num,
        sum(order_num)-sum(order_lack_num) as real_sale_num
        from (
        select
        o.order_no,o.payment_time,o.status_backend,vor.*
        from t_order o
        left join (
            <include refid="baseSql"></include>
        ) vor
        on o.id =vor.order_id
        where o.deleted=0
        and o.status_backend not in ('PENDING','CANCEL','REFUND')
        <if test="dto.startDate != null">
            and o.payment_time &gt; #{dto.startDate}
        </if>
        <if test="dto.endDate != null">
            and o.payment_time &lt;= #{dto.endDate}
        </if>
        <if test="dto.partnerId != null">
            and o.create_by in (
            select user_id from t_customer_info where partner_id=#{dto.partnerId}
            )
        </if>
        ) t
 
    </select>
 
 
    <select id="getOrderDateReport2" resultType="com.mzl.flower.dto.response.report.OrderReportResultVO">
        select
            sum(order_total)  as order_total,
            sum(order_supplier_price_amount)  as order_supplier_price_amount,
            sum(order_markup_one_amount)  as order_markup_one_amount,
            sum(order_markup_two_amount)  as order_markup_two_amount,
            sum(order_markup_partner_amount)  as order_markup_partner_amount,
            sum(order_price_discount_amount)  as order_price_discount_amount,
            sum(order_coupon_amount_total)  as order_coupon_amount_total,
            sum(order_check_fee)  as order_check_fee,
            sum(order_lack_fee_supplier)  as order_lack_fee_supplier,
            sum(order_replace_fee)  as order_replace_fee,
            sum(order_fee_supplier)  as order_fee_supplier,
            sum(order_fee_partner)  as order_fee_partner,
            sum(order_fee_platform)  as order_fee_platform,
            sum(order_fee_platform_pack)  as order_fee_platform_pack,
            sum(order_fee_platform_check)  as order_fee_platform_check,
            sum(order_fee_platform_transport)  as order_fee_platform_transport,
            sum(order_total_fee)  as order_total_fee,
            sum(order_fee_packing_transport)  as order_fee_packing_transport,
            sum(order_num) as order_num,
            sum(order_replace_num) as order_replace_num,
            sum(order_reduce_num) as order_reduce_num,
            sum(order_lack_num) as order_lack_num,
            sum(order_num)-sum(order_lack_num) as real_sale_num
        from (
                 select
                     o.order_no,o.payment_time,o.status_backend,vor.*
                 from t_order o
                 left join v_order_report vor
                 on o.id =vor.order_id
                 where o.deleted=0
                 and o.status_backend not in ('PENDING','CANCEL','REFUND')
                <if test="dto.startDate != null">
                    and o.payment_time &gt; #{dto.startDate}
                </if>
                <if test="dto.endDate != null">
                    and o.payment_time &lt;= #{dto.endDate}
                </if>
                <if test="dto.partnerId != null">
                    and o.create_by in (
                        select user_id from t_customer_info where partner_id=#{dto.partnerId}
                    )
                </if>
        ) t
 
    </select>
 
    <select id="getOrderDetailReport" resultType="com.mzl.flower.dto.response.report.OrderDetailReportResultVO">
        select
        o.order_no,
        o.customer,
        CONCAT( o.customer_province, ' ', o.customer_city, ' ', o.customer_region, ' ', o.customer_address ) AS address,
        o.partner_name,
        o.create_time as orderDate,
        o.payment_time,
        o.status_backend as settleStatus,
        vor.order_num-vor.order_lack_num as real_sale_num,
        vor.*
        from t_order o
        left join (
            <include refid="baseSql"></include>
        ) vor
        on o.id =vor.order_id
        where o.deleted=0
        and o.status_backend not in ('PENDING','CANCEL','REFUND')
        <if test="dto.startDate != null">
            and o.payment_time &gt; #{dto.startDate}
        </if>
        <if test="dto.endDate != null">
            and o.payment_time &lt;= #{dto.endDate}
        </if>
        <if test="dto.partnerId != null">
            and o.create_by in (
            select user_id from t_customer_info where partner_id=#{dto.partnerId}
            )
        </if>
    </select>
 
    <select id="getOrderDetailReport2" resultType="com.mzl.flower.dto.response.report.OrderDetailReportResultVO">
        select
        o.order_no,
        o.customer,
        CONCAT( o.customer_province, ' ', o.customer_city, ' ', o.customer_region, ' ', o.customer_address ) AS address,
        o.partner_name,
        o.create_time as orderDate,
        o.payment_time,
        o.status_backend as settleStatus,
        vor.order_num-vor.order_lack_num as real_sale_num,
        vor.*
        from t_order o
        left join v_order_report vor
        on o.id =vor.order_id
        where o.deleted=0
        and o.status_backend not in ('PENDING','CANCEL','REFUND')
        <if test="dto.startDate != null">
            and o.payment_time &gt; #{dto.startDate}
        </if>
        <if test="dto.endDate != null">
            and o.payment_time &lt;= #{dto.endDate}
        </if>
        <if test="dto.partnerId != null">
            and o.create_by in (
            select user_id from t_customer_info where partner_id=#{dto.partnerId}
            )
        </if>
    </select>
 
    <select id="getPartnerOrderDateReportStatis"
            resultType="com.mzl.flower.dto.response.report.OrderPartnerReportResultVO">
        select
            sum(order_total)  as order_total,
            sum(order_partner_price_amount) as order_partner_price_amount,
            sum(order_supplier_price_amount)  as order_supplier_price_amount,
            sum(order_markup_one_amount)  as order_markup_one_amount,
            sum(order_markup_two_amount)  as order_markup_two_amount,
            sum(order_markup_partner_amount)  as order_markup_partner_amount,
            sum(order_price_discount_amount)  as order_price_discount_amount,
            sum(order_coupon_amount_total)  as order_coupon_amount_total,
            sum(order_check_fee)  as order_check_fee,
            sum(order_lack_fee_supplier)  as order_lack_fee_supplier,
            sum(order_replace_fee)  as order_replace_fee,
            sum(order_fee_supplier)  as order_fee_supplier,
            sum(order_fee_partner)  as order_fee_partner,
            sum(order_fee_platform)  as order_fee_platform,
            sum(order_fee_platform_pack)  as order_fee_platform_pack,
            sum(order_fee_platform_check)  as order_fee_platform_check,
            sum(order_fee_platform_transport)  as order_fee_platform_transport,
            sum(order_total_fee)  as order_total_fee,
            sum(order_fee_packing_transport)  as order_fee_packing_transport,
            sum(order_num) as order_num,
            sum(order_replace_num) as order_replace_num,
            sum(order_reduce_num) as order_reduce_num,
            sum(order_lack_num) as order_lack_num,
            sum(real_sale_num) as real_sale_num
        from ( <include refid="partnerBaseSqlWithDate"></include> ) t
    </select>
 
    <select id="getPartnerOrderDateReportPage"
            resultType="com.mzl.flower.dto.response.report.OrderPartnerReportResultVO">
        <include refid="partnerBaseSqlWithDate"></include>
    </select>
    <select id="getPartnerOrderDateReportList"
            resultType="com.mzl.flower.dto.response.report.OrderPartnerReportResultVO">
        <include refid="partnerBaseSqlWithDate"></include>
    </select>
 
 
    <sql id="partnerBaseSqlWithDate">
        select
        t3.payment_date as orderDate ,t3.partner_id,t3.partner_name,
        IFNULL(sum(order_total),0)  as order_total,
        IFNULL(sum(order_supplier_price_amount)+sum(order_markup_one_amount)+sum(order_markup_two_amount),0)  as order_partner_price_amount,
        IFNULL(sum(order_supplier_price_amount),0)  as order_supplier_price_amount,
        IFNULL(sum(order_markup_one_amount),0)  as order_markup_one_amount,
        IFNULL(sum(order_markup_two_amount),0)  as order_markup_two_amount,
        IFNULL(sum(order_markup_partner_amount),0)  as order_markup_partner_amount,
        IFNULL(sum(order_price_discount_amount),0)  as order_price_discount_amount,
        IFNULL(sum(order_coupon_amount_total),0)  as order_coupon_amount_total,
        IFNULL(sum(order_check_fee),0)  as order_check_fee,
        IFNULL(sum(order_lack_fee_supplier),0)  as order_lack_fee_supplier,
        IFNULL(sum(order_replace_fee),0)  as order_replace_fee,
        IFNULL(sum(order_fee_supplier),0)  as order_fee_supplier,
        IFNULL(sum(order_fee_partner),0)  as order_fee_partner,
        IFNULL(sum(order_fee_platform),0)  as order_fee_platform,
        IFNULL(sum(order_fee_platform_pack),0)  as order_fee_platform_pack,
        IFNULL(sum(order_fee_platform_check),0)  as order_fee_platform_check,
        IFNULL(sum(order_fee_platform_transport),0)  as order_fee_platform_transport,
        IFNULL(sum(order_total_fee),0)  as order_total_fee,
        IFNULL(sum(order_fee_packing_transport),0)  as order_fee_packing_transport,
        IFNULL(sum(order_num),0) as order_num,
        IFNULL(sum(order_replace_num),0) as order_replace_num,
        IFNULL(sum(order_reduce_num),0) as order_reduce_num,
        IFNULL(sum(order_lack_num),0) as order_lack_num,
        IFNULL(sum(order_num)-sum(order_lack_num),0) as real_sale_num
        from (
        select t2.payment_date,t2.id,t2.order_no,t2.create_by,ci.partner_id,p.name as partner_name,r2.* from (
            SELECT t.*,
            CASE
            WHEN t.payment_time > DATE(t.payment_time) + INTERVAL 17 HOUR THEN DATE(t.payment_time) + INTERVAL 1 DAY
            ELSE DATE(t.payment_time)
            END AS payment_date,
            t.payment_time as payment_time2
            FROM t_order t
            WHERE t.deleted = 0
            and t.status_backend not in ('PENDING','CANCEL','REFUND')
            )t2
            left join  ( <include refid="baseSqlWithDate"></include> ) r2
            on t2.id = r2.order_id
            left join t_customer_info ci
            on t2.create_by=ci.user_id
            left join t_partner_info p
            on ci.partner_id=p.id
        )t3
        where t3.partner_id is not null
        <if test="dto.paymentDateStart != null">
            and t3.payment_date &gt;= #{dto.paymentDateStart}
        </if>
        <if test="dto.paymentDateEnd != null">
            and t3.payment_date &lt;= #{dto.paymentDateEnd}
        </if>
        <if test="dto.partnerId != null">
            and t3.partner_id = #{dto.partnerId}
        </if>
        group by t3.payment_date,t3.partner_id,t3.partner_name
        order by t3.payment_date desc,t3.partner_id
    </sql>
 
    <sql id="baseSql">
        select t2.*,
               IFNULL(t3.fee_supplier,0) as order_fee_supplier,
               IFNULL(t3.fee_partner,0) as order_fee_partner,
               IFNULL(t3.fee_platform,0) as order_fee_platform,
               IFNULL(t3.fee_platform_pack,0) as order_fee_platform_pack,
               IFNULL(t3.fee_platform_check,0) as order_fee_platform_check,
               IFNULL(t3.fee_platform_transport,0) as order_fee_platform_transport,
               IFNULL(t3.total_fee,0) as order_total_fee,
               IFNULL(t3.fee_packing_transport,0) as order_fee_packing_transport
        from (
                 select
                     t1.order_id,sum(t1.num) as order_num , sum(t1.total) as order_total, sum(t1.supplier_price_amount) as order_supplier_price_amount, sum(t1.markup_one_amount) as order_markup_one_amount,sum(t1.markup_two_amount) as order_markup_two_amount, sum(t1.markup_partner_amount) as order_markup_partner_amount,sum(t1.price_amount) as order_price_amount,sum(t1.original_price_amount) as order_original_price_amount,sum(t1.price_discount_amount) as order_price_discount_amount,sum(t1.coupon_amount_total) as order_coupon_amount_total,sum(t1.check_fee) as order_check_fee,sum(t1.lack_fee_supplier) as order_lack_fee_supplier,sum(t1.replace_fee) as order_replace_fee,
                     sum(replace_num) as order_replace_num,sum(reduce_num) as order_reduce_num,sum(lack_num) as order_lack_num
                 from (
                   SELECT
                       oi.order_id,
                       oi.id,
                       IFNULL(oi.num,0) as num,
                       IFNULL(oi.total,0) as total,
                       IFNULL(oi.supplier_price,0) as supplier_price,
                       IFNULL(oi.supplier_price,0) * IFNULL(oi.num,0) as supplier_price_amount,
 
                       IFNULL(oi.markup_one,0) as markup_one,
                       IFNULL(oi.markup_one,0)* IFNULL(oi.num,0) as markup_one_amount,
 
                       IFNULL(oi.markup_two,0) as markup_two,
                       IFNULL(oi.markup_two,0)* IFNULL(oi.num,0) as markup_two_amount,
 
                       IFNULL(oi.markup_partner,0) as markup_partner,
                       IFNULL(oi.markup_partner,0)* IFNULL(oi.num,0) as markup_partner_amount,
                       IFNULL(oi.price,0) as price,
                       IFNULL(oi.price,0)* IFNULL(oi.num,0) as price_amount,
 
                       IFNULL(oi.original_price,0) as original_price,
                       IFNULL(oi.original_price,0)*IFNULL(oi.num,0) as original_price_amount,
 
                       IFNULL(oi.original_price,0)*IFNULL(oi.num,0) - IFNULL(oi.price,0)* IFNULL(oi.num,0) as price_discount_amount,
 
 
                       IFNULL(oi.real_price,0) as real_price,
                       IFNULL(oi.real_total,0) as real_total,
 
                       IFNULL(oi.coupon_amount_total,0) as coupon_amount_total,
 
                       IFNULL(ois.check_fee,0) as check_fee,
                       IFNULL(ois.lack_fee_supplier,0) as lack_fee_supplier,
                       IFNULL(ois.replace_fee,0) as replace_fee
 
                      ,IFNULL( (select oic.num from t_order_item_check oic where oic.order_item_id = oi.id and oic.type = 'replace'),0) as replace_num
                      ,IFNULL( (select oic.num from t_order_item_check oic where oic.order_item_id = oi.id and oic.type = 'reduce'),0) as reduce_num
                      ,IFNULL( (select oic.num from t_order_item_check oic where oic.order_item_id = oi.id and oic.type = 'lack'),0) as lack_num
                   FROM  t_order o
                   left join t_order_item oi
                   on oi.order_id=o.id
                   left join t_station s on s.id = oi.station_id
                   left join t_supplier_info si on si.id = oi.supplier_id
                   left join t_order_item_settlement ois on ois.order_item_id = oi.id
                   WHERE oi.deleted = 0
                    <if test="dto.startDate != null">
                        and o.payment_time &gt; #{dto.startDate}
                    </if>
                    <if test="dto.endDate != null">
                        and o.payment_time &lt;= #{dto.endDate}
                    </if>
 
               )t1
                group by order_id
             ) t2
                 left join (
            select
                ois.order_id,
                IFNULL(sum(ois.fee_supplier),0) as fee_supplier,
                IFNULL(sum(ois.fee_partner),0) as fee_partner,
                IFNULL(sum(ois.fee_platform),0) as fee_platform,
                IFNULL(sum(ois.fee_platform_pack),0) as fee_platform_pack,
                IFNULL(sum(ois.fee_platform_check),0) as fee_platform_check,
                IFNULL(sum(ois.fee_platform_transport),0) as fee_platform_transport,
                IFNULL(sum(ois.total_fee),0) as total_fee,
                IFNULL(sum(ois.fee_packing_transport),0) as fee_packing_transport
            from t_order_item_sales ois
            group by order_id
        )t3
        on t2.order_id =t3.order_id
    </sql>
 
 
    <sql id="baseSqlWithDate">
        select t2.*,
        IFNULL(t3.fee_supplier,0) as order_fee_supplier,
        IFNULL(t3.fee_partner,0) as order_fee_partner,
        IFNULL(t3.fee_platform,0) as order_fee_platform,
        IFNULL(t3.fee_platform_pack,0) as order_fee_platform_pack,
        IFNULL(t3.fee_platform_check,0) as order_fee_platform_check,
        IFNULL(t3.fee_platform_transport,0) as order_fee_platform_transport,
        IFNULL(t3.total_fee,0) as order_total_fee,
        IFNULL(t3.fee_packing_transport,0) as order_fee_packing_transport
        from (
        select
        t1.order_id,sum(t1.num) as order_num , sum(t1.total) as order_total, sum(t1.supplier_price_amount) as order_supplier_price_amount, sum(t1.markup_one_amount) as order_markup_one_amount,sum(t1.markup_two_amount) as order_markup_two_amount, sum(t1.markup_partner_amount) as order_markup_partner_amount,sum(t1.price_amount) as order_price_amount,sum(t1.original_price_amount) as order_original_price_amount,sum(t1.price_discount_amount) as order_price_discount_amount,sum(t1.coupon_amount_total) as order_coupon_amount_total,sum(t1.check_fee) as order_check_fee,sum(t1.lack_fee_supplier) as order_lack_fee_supplier,sum(t1.replace_fee) as order_replace_fee,
        sum(replace_num) as order_replace_num,sum(reduce_num) as order_reduce_num,sum(lack_num) as order_lack_num
        from (
        SELECT
            CASE
            WHEN o.payment_time > DATE(o.payment_time) + INTERVAL 17 HOUR THEN DATE(o.payment_time) + INTERVAL 1 DAY
            ELSE DATE(o.payment_time)
            END AS payment_date,
            oi.order_id,
            oi.id,
            IFNULL(oi.num,0) as num,
            IFNULL(oi.total,0) as total,
            IFNULL(oi.supplier_price,0) as supplier_price,
            IFNULL(oi.supplier_price,0) * IFNULL(oi.num,0) as supplier_price_amount,
 
            IFNULL(oi.markup_one,0) as markup_one,
            IFNULL(oi.markup_one,0)* IFNULL(oi.num,0) as markup_one_amount,
 
            IFNULL(oi.markup_two,0) as markup_two,
            IFNULL(oi.markup_two,0)* IFNULL(oi.num,0) as markup_two_amount,
 
            IFNULL(oi.markup_partner,0) as markup_partner,
            IFNULL(oi.markup_partner,0)* IFNULL(oi.num,0) as markup_partner_amount,
            IFNULL(oi.price,0) as price,
            IFNULL(oi.price,0)* IFNULL(oi.num,0) as price_amount,
 
            IFNULL(oi.original_price,0) as original_price,
            IFNULL(oi.original_price,0)*IFNULL(oi.num,0) as original_price_amount,
 
            IFNULL(oi.original_price,0)*IFNULL(oi.num,0) - IFNULL(oi.price,0)* IFNULL(oi.num,0) as price_discount_amount,
 
 
            IFNULL(oi.real_price,0) as real_price,
            IFNULL(oi.real_total,0) as real_total,
 
            IFNULL(oi.coupon_amount_total,0) as coupon_amount_total,
 
            IFNULL(ois.check_fee,0) as check_fee,
            IFNULL(ois.lack_fee_supplier,0) as lack_fee_supplier,
            IFNULL(ois.replace_fee,0) as replace_fee
 
            ,IFNULL( (select oic.num from t_order_item_check oic where oic.order_item_id = oi.id and oic.type = 'replace'),0) as replace_num
            ,IFNULL( (select oic.num from t_order_item_check oic where oic.order_item_id = oi.id and oic.type = 'reduce'),0) as reduce_num
            ,IFNULL( (select oic.num from t_order_item_check oic where oic.order_item_id = oi.id and oic.type = 'lack'),0) as lack_num
            FROM  t_order o
            left join t_order_item oi
            on oi.order_id=o.id
            left join t_station s on s.id = oi.station_id
            left join t_supplier_info si on si.id = oi.supplier_id
            left join t_order_item_settlement ois on ois.order_item_id = oi.id
            WHERE oi.deleted = 0
        )t1
        where 1=1
        <if test="dto.paymentDateStart != null">
            and t1.payment_date &gt;= #{dto.paymentDateStart}
        </if>
        <if test="dto.paymentDateEnd != null">
            and t1.payment_date &lt;= #{dto.paymentDateEnd}
        </if>
        group by order_id
        ) t2
        left join (
        select
        ois.order_id,
        IFNULL(sum(ois.fee_supplier),0) as fee_supplier,
        IFNULL(sum(ois.fee_partner),0) as fee_partner,
        IFNULL(sum(ois.fee_platform),0) as fee_platform,
        IFNULL(sum(ois.fee_platform_pack),0) as fee_platform_pack,
        IFNULL(sum(ois.fee_platform_check),0) as fee_platform_check,
        IFNULL(sum(ois.fee_platform_transport),0) as fee_platform_transport,
        IFNULL(sum(ois.total_fee),0) as total_fee,
        IFNULL(sum(ois.fee_packing_transport),0) as fee_packing_transport
        from t_order_item_sales ois
        group by order_id
        )t3
        on t2.order_id =t3.order_id
    </sql>
 
 
</mapper>