Subversion Repositories SmartDukaan

Rev

Rev 23933 | Rev 24002 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23933 Rev 23934
Line 306... Line 306...
306
		}
306
		}
307
		LOGGER.info("Cashbacks for Recharge processed Successfully");
307
		LOGGER.info("Cashbacks for Recharge processed Successfully");
308
	}
308
	}
309
 
309
 
310
	public void sendPartnerInvestmentDetails() throws Exception {
310
	public void sendPartnerInvestmentDetails() throws Exception {
311
		String fileName = "/tmp/InvestmentSummary-" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv";
311
		String fileName = "InvestmentSummary-" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv";
312
 
312
 
313
		List<FofoStore> fofoStores = fofoStoreRepository.selectAll();
313
		List<FofoStore> fofoStores = fofoStoreRepository.selectAll();
314
		Map<Integer, CustomRetailer> customRetailerMap = retailerService
314
		Map<Integer, CustomRetailer> customRetailerMap = retailerService
315
				.getFofoRetailers(fofoStores.stream().map(x -> x.getId()).collect(Collectors.toList()));
315
				.getFofoRetailers(fofoStores.stream().map(x -> x.getId()).collect(Collectors.toList()));
316
		try (
316
		try (
Line 353... Line 353...
353
					LOGGER.info("Could not get investment details for partner {}, re", retailer.getEmail());
353
					LOGGER.info("Could not get investment details for partner {}, re", retailer.getEmail());
354
					e.printStackTrace();
354
					e.printStackTrace();
355
				}
355
				}
356
			}
356
			}
357
			Utils.sendMailWithAttachment(googleMailSender, "kamini.sharma@smartdukaan.com",
357
			Utils.sendMailWithAttachment(googleMailSender, "kamini.sharma@smartdukaan.com",
358
					new String[] { "amandeep.singh@smartdukaan.com", "tarun.verma@smartdukaan.com" },
358
					new String[] { "amandeep.singh@smartdukaan.com", "tarun.verma@smartdukaan.com"},
359
					"Partner Investment Summary", "PFA", fileName, new ByteArrayResource(baos.toByteArray()));
359
					"Partner Investment Summary", "PFA", fileName, new ByteArrayResource(baos.toByteArray()));
360
 
360
 
361
		}
361
		}
362
	}
362
	}
363
 
363