eason 6 years ago
parent 376687f25b
commit 611a4eb646

@ -121,7 +121,7 @@ public class BDPrizeServiceImpl implements BDPrizeService {
List<JSONObject> trades = transactionMapper.listTransactionsForBDPrize(now.get(Calendar.YEAR), now.get(Calendar.MONTH) + 1, channel);
List<Integer> clientsWithBDAway = clientBDMapper.clientsWithBDAway();
List<JSONObject> rateConfig = getRateConfig();
BDPrizeCalculator calculator = new BDPrizeCalculatorDefaultImpl(trades, now.getTime()).clientBDMapper(clientBDMapper)
BDPrizeCalculator calculator = new BDPrizeCalculatorDefaultImpl(trades, now.getTime()).clientBDMapper(clientBDMapper,transactionMapper)
.clientsWithBDAwayDeterminor(new DefaultClientWithBDAwayDeterminor(clientsWithBDAway)).rateConfig(rateConfig);
calculator.calculate();
List<JSONObject> report = calculator.getReport(now.get(Calendar.YEAR),now.get(Calendar.MONTH) + 1);

@ -38,8 +38,9 @@ public class BDPrizeCalculatorDefaultImpl implements BDPrizeCalculator {
this.month = month;
}
public BDPrizeCalculatorDefaultImpl clientBDMapper(ClientBDMapper clientBDMapper) {
public BDPrizeCalculatorDefaultImpl clientBDMapper(ClientBDMapper clientBDMapper,TransactionMapper transactionMapper) {
this.clientBDMapper = clientBDMapper;
this.transactionMapper = transactionMapper;
return this;
}

Loading…
Cancel
Save