顾绍勇 před 5 roky
rodič
revize
da4dbbcf7a

+ 8
- 8
src/main/resources/mapper/redpack/TaOrgOrderMapper.xml Zobrazit soubor

337
         WHERE
337
         WHERE
338
             t.org_id = #{orgId}
338
             t.org_id = #{orgId}
339
             AND t2.target_id = #{activityId}
339
             AND t2.target_id = #{activityId}
340
-            AND t2.target_type = 'redPacket'
341
-            AND t2.item_type = 'redPacket'
340
+            AND t2.target_type = 'RedPacket'
341
+            AND t2.item_type = 'RedPacket'
342
             AND t.`status` >- 1
342
             AND t.`status` >- 1
343
             <if test = " orderId != null and orderId != ''">
343
             <if test = " orderId != null and orderId != ''">
344
                 AND t.order_id like concat( '%',#{orderId},'%')
344
                 AND t.order_id like concat( '%',#{orderId},'%')
353
                 AND t.trading_status = #{tradingStatus}
353
                 AND t.trading_status = #{tradingStatus}
354
             </if>
354
             </if>
355
             <if test = "phone != null and phone != ''">
355
             <if test = "phone != null and phone != ''">
356
-                AND t3.phone like concat ('%',phone,'%')
356
+                AND t3.phone like concat ('%',#{phone},'%')
357
             </if>
357
             </if>
358
         ORDER BY
358
         ORDER BY
359
             t.create_date DESC
359
             t.create_date DESC
363
         SELECT
363
         SELECT
364
             t.*,
364
             t.*,
365
             t3.phone
365
             t3.phone
366
-            <if test="consumeType == 'redPacket'">
366
+            <if test="consumeType == 'RedPacket'">
367
                 ,t4.activity_name
367
                 ,t4.activity_name
368
             </if>
368
             </if>
369
         FROM
369
         FROM
373
                     AND t2.item_type = #{consumeType}
373
                     AND t2.item_type = #{consumeType}
374
                 </if>
374
                 </if>
375
             LEFT JOIN ta_person t3 on t2.receiver_id = t3.person_id
375
             LEFT JOIN ta_person t3 on t2.receiver_id = t3.person_id
376
-            <if test="consumeType == 'redPacket'">
376
+            <if test="consumeType == 'RedPacket'">
377
                 LEFT JOIN ta_red_packet t4 ON t2.target_id = t4.activity_id
377
                 LEFT JOIN ta_red_packet t4 ON t2.target_id = t4.activity_id
378
             </if>
378
             </if>
379
         WHERE
379
         WHERE
414
         SELECT
414
         SELECT
415
             t.order_id,
415
             t.order_id,
416
             t.amount,
416
             t.amount,
417
-            ( CASE t2.item_type WHEN 'redPacket' THEN '红包' ELSE '' END ) consumeType,
418
-            <if test="consumeType == 'redPacket'">
417
+            ( CASE t2.item_type WHEN 'RedPacket' THEN '红包' ELSE '' END ) consumeType,
418
+            <if test="consumeType == 'RedPacket'">
419
                 t4.activity_name,
419
                 t4.activity_name,
420
             </if>
420
             </if>
421
             t.create_date,
421
             t.create_date,
428
                     AND t2.item_type = #{consumeType}
428
                     AND t2.item_type = #{consumeType}
429
                 </if>
429
                 </if>
430
             LEFT JOIN ta_person t3 ON t2.receiver_id = t3.person_id
430
             LEFT JOIN ta_person t3 ON t2.receiver_id = t3.person_id
431
-            <if test="consumeType == 'redPacket'">
431
+            <if test="consumeType == 'RedPacket'">
432
                 LEFT JOIN ta_red_packet t4 ON t2.target_id = t4.activity_id
432
                 LEFT JOIN ta_red_packet t4 ON t2.target_id = t4.activity_id
433
             </if>
433
             </if>
434
         WHERE
434
         WHERE