From 2627482fba6f2366bf7d54a55d31142f53d47b92 Mon Sep 17 00:00:00 2001 From: eason Date: Thu, 2 Aug 2018 22:29:58 +0800 Subject: [PATCH] fix --- .../support/impls/BDPrizeCalculatorDefaultImpl.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/bdprize/support/impls/BDPrizeCalculatorDefaultImpl.java b/src/main/java/au/com/royalpay/payment/manage/bdprize/support/impls/BDPrizeCalculatorDefaultImpl.java index 603afd119..1564f33be 100644 --- a/src/main/java/au/com/royalpay/payment/manage/bdprize/support/impls/BDPrizeCalculatorDefaultImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/bdprize/support/impls/BDPrizeCalculatorDefaultImpl.java @@ -89,15 +89,8 @@ public class BDPrizeCalculatorDefaultImpl implements BDPrizeCalculator { log.put("total_amount", 0); log.put("total_prize", 0); log.put("total_donation", 0); - BigDecimal totalAmount = log.getBigDecimal("total_amount"); + BigDecimal totalAmount = bdTotalMap.get(bd.getString("bd_id")); List details = new ArrayList<>(); - for (Map.Entry detail : resultItem.getValue().entrySet()) { - JSONObject detailItem = detail.getValue(); - BigDecimal totalTransaction = detailItem.getBigDecimal("total_transaction"); - BigDecimal coefficient = detailItem.getBigDecimal("coefficient"); - BigDecimal realTransaction = totalTransaction.multiply(coefficient).setScale(2,BigDecimal.ROUND_DOWN); - totalAmount = totalAmount.add(realTransaction); - } for (Map.Entry detail : resultItem.getValue().entrySet()) { JSONObject detailItem = detail.getValue(); int clientId = detailItem.getIntValue("client_id");