From 876b8cc46e4bee40232cda955b291bd8b1e229d5 Mon Sep 17 00:00:00 2001 From: eason Date: Thu, 2 Aug 2018 23:21:02 +0800 Subject: [PATCH] fix --- .../manage/bdprize/core/impls/BDPrizeServiceImpl.java | 2 +- .../bdprize/support/impls/BDPrizeCalculatorDefaultImpl.java | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/bdprize/core/impls/BDPrizeServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/bdprize/core/impls/BDPrizeServiceImpl.java index e5624ca50..691a40bfe 100644 --- a/src/main/java/au/com/royalpay/payment/manage/bdprize/core/impls/BDPrizeServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/bdprize/core/impls/BDPrizeServiceImpl.java @@ -121,7 +121,7 @@ public class BDPrizeServiceImpl implements BDPrizeService { List trades = transactionMapper.listTransactionsForBDPrize(now.get(Calendar.YEAR), now.get(Calendar.MONTH) + 1, channel); List clientsWithBDAway = clientBDMapper.clientsWithBDAway(); List rateConfig = getRateConfig(); - BDPrizeCalculator calculator = new BDPrizeCalculatorDefaultImpl(trades, now.getTime()).clientBDMapper(clientBDMapper,transactionMapper) + BDPrizeCalculator calculator = new BDPrizeCalculatorDefaultImpl(trades, now.getTime()).clientBDMapper(clientBDMapper).transactionMapper(transactionMapper) .clientsWithBDAwayDeterminor(new DefaultClientWithBDAwayDeterminor(clientsWithBDAway)).rateConfig(rateConfig); calculator.calculate(); List report = calculator.getReport(now.get(Calendar.YEAR),now.get(Calendar.MONTH) + 1); 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 08f842b21..d2e234522 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 @@ -38,8 +38,12 @@ public class BDPrizeCalculatorDefaultImpl implements BDPrizeCalculator { this.month = month; } - public BDPrizeCalculatorDefaultImpl clientBDMapper(ClientBDMapper clientBDMapper,TransactionMapper transactionMapper) { + public BDPrizeCalculatorDefaultImpl clientBDMapper(ClientBDMapper clientBDMapper) { this.clientBDMapper = clientBDMapper; + return this; + } + + public BDPrizeCalculatorDefaultImpl transactionMapper(TransactionMapper transactionMapper) { this.transactionMapper = transactionMapper; return this; }