| Line 236... |
Line 236... |
| 236 |
|
236 |
|
| 237 |
List<UserWalletHistory> userWalletHistories = new ArrayList<>();
|
237 |
List<UserWalletHistory> userWalletHistories = new ArrayList<>();
|
| 238 |
try {
|
238 |
try {
|
| 239 |
userWalletHistories = walletService.getPaginatedUserWalletHistoryByRetailerId(fofoId, startDateTime, endDateTime, offset, limit);
|
239 |
userWalletHistories = walletService.getPaginatedUserWalletHistoryByRetailerId(fofoId, startDateTime, endDateTime, offset, limit);
|
| 240 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
240 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
| 241 |
LOGGER.error("UserWallet History not found : ", profitMandiBusinessException);
|
241 |
LOGGER.warn("UserWallet History not found : ", profitMandiBusinessException);
|
| 242 |
}
|
242 |
}
|
| 243 |
|
243 |
|
| 244 |
long countItems = 0;
|
244 |
long countItems = 0;
|
| 245 |
try {
|
245 |
try {
|
| 246 |
countItems = walletService.getSizeByRetailerId(fofoDetails.getFofoId(), startDateTime, endDateTime);
|
246 |
countItems = walletService.getSizeByRetailerId(fofoDetails.getFofoId(), startDateTime, endDateTime);
|
| 247 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
247 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
| 248 |
LOGGER.error("UserWallet not found : ", profitMandiBusinessException);
|
248 |
LOGGER.warn("UserWallet not found : ", profitMandiBusinessException);
|
| 249 |
}
|
249 |
}
|
| 250 |
com.spice.profitmandi.dao.model.CreditSummary creditSummary = sdCreditService.getCreditSummary(fofoId);
|
250 |
com.spice.profitmandi.dao.model.CreditSummary creditSummary = sdCreditService.getCreditSummary(fofoId);
|
| 251 |
|
251 |
|
| 252 |
// Utilization comes from sd_credit_requirement.utilized_amount — the same source
|
252 |
// Utilization comes from sd_credit_requirement.utilized_amount — the same source
|
| 253 |
// the sddirect/summary API uses (GatewayController + SDCreditServiceImpl:732).
|
253 |
// the sddirect/summary API uses (GatewayController + SDCreditServiceImpl:732).
|
| Line 291... |
Line 291... |
| 291 |
|
291 |
|
| 292 |
List<UserWalletHistory> userWalletHistories = new ArrayList<>();
|
292 |
List<UserWalletHistory> userWalletHistories = new ArrayList<>();
|
| 293 |
try {
|
293 |
try {
|
| 294 |
userWalletHistories = walletService.getPaginatedUserWalletHistoryByRetailerId(loginDetails.getFofoId(), startDateTime, endDateTime, offset, limit);
|
294 |
userWalletHistories = walletService.getPaginatedUserWalletHistoryByRetailerId(loginDetails.getFofoId(), startDateTime, endDateTime, offset, limit);
|
| 295 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
295 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
| 296 |
LOGGER.error("UserWallet History not found : ", profitMandiBusinessException);
|
296 |
LOGGER.warn("UserWallet History not found : ", profitMandiBusinessException);
|
| 297 |
}
|
297 |
}
|
| 298 |
|
298 |
|
| 299 |
model.addAttribute("walletHistories", userWalletHistories);
|
299 |
model.addAttribute("walletHistories", userWalletHistories);
|
| 300 |
model.addAttribute("walletAttachmentMap", buildWalletHistoryAttachmentMap(userWalletHistories));
|
300 |
model.addAttribute("walletAttachmentMap", buildWalletHistoryAttachmentMap(userWalletHistories));
|
| 301 |
return "wallet-history-paginated";
|
301 |
return "wallet-history-paginated";
|