| Line 873... |
Line 873... |
| 873 |
.stream().filter(x -> x.getAmountType().equals(AmountType.FIXED))
|
873 |
.stream().filter(x -> x.getAmountType().equals(AmountType.FIXED))
|
| 874 |
.collect(Collectors.toMap(x -> x.getId(), x -> x));
|
874 |
.collect(Collectors.toMap(x -> x.getId(), x -> x));
|
| 875 |
if (cashbackSchemesMap.size() > 0) {
|
875 |
if (cashbackSchemesMap.size() > 0) {
|
| 876 |
List<SchemeItem> schemeItems = schemeItemRepository.selectBySchemeIds(cashbackSchemesMap.keySet());
|
876 |
List<SchemeItem> schemeItems = schemeItemRepository.selectBySchemeIds(cashbackSchemesMap.keySet());
|
| 877 |
schemeItems.stream().forEach(x -> {
|
877 |
schemeItems.stream().forEach(x -> {
|
| 878 |
itemCashbackMap.put(x.getItemId(), cashbackSchemesMap.get(x.getSchemeId()).getAmount());
|
878 |
float cashbackAmount = cashbackSchemesMap.get(x.getSchemeId()).getAmount();
|
| - |
|
879 |
if(!itemCashbackMap.containsKey(x.getItemId())) {
|
| - |
|
880 |
itemCashbackMap.put(x.getItemId(), cashbackAmount);
|
| - |
|
881 |
} else {
|
| - |
|
882 |
itemCashbackMap.put(x.getItemId(), itemCashbackMap.get(x.getItemId()) + cashbackAmount);
|
| - |
|
883 |
}
|
| 879 |
});
|
884 |
});
|
| 880 |
}
|
885 |
}
|
| 881 |
// A107FD Model needs to removed
|
886 |
// A107FD Model needs to removed
|
| 882 |
itemCashbackMap.remove(30211);
|
887 |
itemCashbackMap.remove(30211);
|
| 883 |
itemCashbackMap.remove(30212);
|
888 |
itemCashbackMap.remove(30212);
|