Procházet zdrojové kódy

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/estateagents into dev

魏超 před 4 roky
rodič
revize
afc926548b

+ 2
- 1
src/main/java/com/huiju/estateagents/redpack/service/impl/TaRedPacketMoneyServiceImpl.java Zobrazit soubor

@@ -16,6 +16,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
16 16
 import org.springframework.beans.factory.annotation.Autowired;
17 17
 import org.springframework.stereotype.Service;
18 18
 
19
+import java.math.BigDecimal;
19 20
 import java.util.Map;
20 21
 
21 22
 /**
@@ -59,7 +60,7 @@ public class TaRedPacketMoneyServiceImpl extends ServiceImpl<TaRedPacketMoneyMap
59 60
         }
60 61
         Map<String, Object> result = taOrgOrderMapper.getRedPacketSendInfo(CommConstant.RED_PACKET, activityId, orgId);
61 62
         taRedPacketMoney.setSendNum((Long) result.get("sendNum"));
62
-        taRedPacketMoney.setSendTotalAmount((Long) result.get("sendTotalAmount"));
63
+        taRedPacketMoney.setSendTotalAmount(((BigDecimal)result.get("sendTotalAmount")).longValue());
63 64
 
64 65
         QueryWrapper<TaOrgAccount> orgAccountQueryWrapper = new QueryWrapper<>();
65 66
         orgAccountQueryWrapper.eq("org_id", orgId);

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

@@ -328,7 +328,7 @@
328 328
             t.*,
329 329
             t2.amount detailAmount,
330 330
             t3.phone,
331
-            ifNull( t3.NAME, t3.nickname ) nickname,
331
+            t3.nickname nickname,
332 332
             t3.avatarurl
333 333
         FROM
334 334
             ta_org_order t
@@ -337,8 +337,8 @@
337 337
         WHERE
338 338
             t.org_id = #{orgId}
339 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 342
             AND t.`status` >- 1
343 343
             <if test = " orderId != null and orderId != ''">
344 344
                 AND t.order_id like concat( '%',#{orderId},'%')
@@ -353,7 +353,7 @@
353 353
                 AND t.trading_status = #{tradingStatus}
354 354
             </if>
355 355
             <if test = "phone != null and phone != ''">
356
-                AND t3.phone like concat ('%',phone,'%')
356
+                AND t3.phone like concat ('%',#{phone},'%')
357 357
             </if>
358 358
         ORDER BY
359 359
             t.create_date DESC
@@ -363,8 +363,8 @@
363 363
         SELECT
364 364
             t.*,
365 365
             t3.phone
366
-            <if test="consumeType == 'redPacket'">
367
-                ,t4.activity_name
366
+            <if test="consumeType == 'RedPacket'">
367
+                ,t4.name
368 368
             </if>
369 369
         FROM
370 370
             ta_org_order t
@@ -373,7 +373,7 @@
373 373
                     AND t2.item_type = #{consumeType}
374 374
                 </if>
375 375
             LEFT JOIN ta_person t3 on t2.receiver_id = t3.person_id
376
-            <if test="consumeType == 'redPacket'">
376
+            <if test="consumeType == 'RedPacket'">
377 377
                 LEFT JOIN ta_red_packet t4 ON t2.target_id = t4.activity_id
378 378
             </if>
379 379
         WHERE
@@ -414,9 +414,9 @@
414 414
         SELECT
415 415
             t.order_id,
416 416
             t.amount,
417
-            ( CASE t2.item_type WHEN 'redPacket' THEN '红包' ELSE '' END ) consumeType,
418
-            <if test="consumeType == 'redPacket'">
419
-                t4.activity_name,
417
+            ( CASE t2.item_type WHEN 'RedPacket' THEN '红包' ELSE '' END ) consumeType,
418
+            <if test="consumeType == 'RedPacket'">
419
+                t4.name,
420 420
             </if>
421 421
             t.create_date,
422 422
             t3.phone,
@@ -428,7 +428,7 @@
428 428
                     AND t2.item_type = #{consumeType}
429 429
                 </if>
430 430
             LEFT JOIN ta_person t3 ON t2.receiver_id = t3.person_id
431
-            <if test="consumeType == 'redPacket'">
431
+            <if test="consumeType == 'RedPacket'">
432 432
                 LEFT JOIN ta_red_packet t4 ON t2.target_id = t4.activity_id
433 433
             </if>
434 434
         WHERE
@@ -498,7 +498,7 @@
498 498
 
499 499
         SELECT
500 500
         count( * ) sendNum,
501
-        sum(t3.amount) sendTotalAmount
501
+        COALESCE(sum( t3.amount ),0) sendTotalAmount
502 502
     FROM
503 503
         ta_org_order_detail t3
504 504
     WHERE