| Line 668... |
Line 668... |
| 668 |
List<FofoStore> fofoStores = fofoStoreRepository.selectAll();
|
668 |
List<FofoStore> fofoStores = fofoStoreRepository.selectAll();
|
| 669 |
System.out.println("id\tcode\tname\tcity\tstate\tsaved wallet\tcalculated wallet\tdifference");
|
669 |
System.out.println("id\tcode\tname\tcity\tstate\tsaved wallet\tcalculated wallet\tdifference");
|
| 670 |
for (FofoStore fofoStore : fofoStores) {
|
670 |
for (FofoStore fofoStore : fofoStores) {
|
| 671 |
UserWallet uw = userWalletRepository.selectByRetailerId(fofoStore.getId());
|
671 |
UserWallet uw = userWalletRepository.selectByRetailerId(fofoStore.getId());
|
| 672 |
User user = userRepository.selectById(fofoStore.getId());
|
672 |
User user = userRepository.selectById(fofoStore.getId());
|
| - |
|
673 |
if(user==null) {
|
| - |
|
674 |
LOGGER.info("store does not exist", fofoStore.getCode());
|
| - |
|
675 |
}
|
| 673 |
Address address = addressRepository.selectById(user.getAddressId());
|
676 |
Address address = addressRepository.selectById(user.getAddressId());
|
| 674 |
int calculated = (int)userWalletHistoryRepository.selectSumByWallet(uw.getId());
|
677 |
int calculated = (int)userWalletHistoryRepository.selectSumByWallet(uw.getId());
|
| 675 |
System.out.printf("%d\t%s\t%s\t%s\t%s\t%d\t%d\t%d", fofoStore.getId(), fofoStore.getCode(),
|
678 |
System.out.printf("%d\t%s\t%s\t%s\t%s\t%d\t%d\t%d%n", fofoStore.getId(), fofoStore.getCode(),
|
| 676 |
address.getCity(), address.getName(), address.getState(), uw.getAmount(), calculated,
|
679 |
address.getCity(), address.getName(), address.getState(), uw.getAmount(), calculated,
|
| 677 |
calculated - uw.getAmount());
|
680 |
calculated - uw.getAmount());
|
| 678 |
}
|
681 |
}
|
| 679 |
}
|
682 |
}
|
| 680 |
}
|
683 |
}
|