| Line 135... |
Line 135... |
| 135 |
}
|
135 |
}
|
| 136 |
LOGGER.info("Migrated LineItems Successfully");
|
136 |
LOGGER.info("Migrated LineItems Successfully");
|
| 137 |
}
|
137 |
}
|
| 138 |
|
138 |
|
| 139 |
public void getInvestmentDetails() throws Exception {
|
139 |
public void getInvestmentDetails() throws Exception {
|
| 140 |
File f = new File("/tmp/InvestmentSummary-" + FormattingUtils.formatDate(LocalDateTime.now()));
|
140 |
File f = new File("/tmp/InvestmentSummary-" + FormattingUtils.formatDate(LocalDateTime.now()) + ".csv");
|
| 141 |
List<String> lines = new ArrayList<>();
|
141 |
List<String> lines = new ArrayList<>();
|
| 142 |
lines.add(
|
142 |
lines.add(
|
| 143 |
"Code\tStoreName\tEmail\tMobile\tminimumInvestment\twalletAmount\tinStockAmount\tunbilledStockAmount\tgrnPendingStockAmount\tTotalInvested");
|
143 |
"Code\tStoreName\tEmail\tMobile\tminimumInvestment\twalletAmount\tinStockAmount\tunbilledStockAmount\tgrnPendingStockAmount\tTotalInvested");
|
| 144 |
List<FofoStore> fofoStores = fofoStoreRepository.selectAll();
|
144 |
List<FofoStore> fofoStores = fofoStoreRepository.selectAll();
|
| 145 |
Map<Integer, CustomRetailer> customRetailerMap = retailerService
|
145 |
Map<Integer, CustomRetailer> customRetailerMap = retailerService
|
| Line 180... |
Line 180... |
| 180 |
|
180 |
|
| 181 |
MimeMessage message = mailSender.createMimeMessage();
|
181 |
MimeMessage message = mailSender.createMimeMessage();
|
| 182 |
MimeMessageHelper helper = new MimeMessageHelper(message,true);
|
182 |
MimeMessageHelper helper = new MimeMessageHelper(message,true);
|
| 183 |
helper.setSubject(subject);
|
183 |
helper.setSubject(subject);
|
| 184 |
helper.setText(body);
|
184 |
helper.setText(body);
|
| 185 |
String[] cc = {"backup@shop2020.in", "gadgetcops.01@gmail.com"};
|
185 |
//String[] cc = {"backup@shop2020.in", "gadgetcops.01@gmail.com"};
|
| 186 |
//String[] cc = {"amit.gupta@shop2020.in"};
|
186 |
//String[] cc = {"amit.gupta@shop2020.in"};
|
| 187 |
helper.setCc(cc);
|
187 |
//helper.setCc(cc);
|
| 188 |
helper.setTo(email);
|
188 |
helper.setTo(email);
|
| 189 |
InternetAddress senderAddress = new InternetAddress("noreply@smartdukaan.com", "ProfitMandi Admin");
|
189 |
InternetAddress senderAddress = new InternetAddress("noreply@smartdukaan.com", "ProfitMandi Admin");
|
| 190 |
helper.setTo("help@smartdukaan.com");
|
190 |
//helper.setTo("help@smartdukaan.com");
|
| 191 |
helper.setFrom(senderAddress);
|
191 |
helper.setFrom(senderAddress);
|
| 192 |
for (File file : attachments) {
|
192 |
for (File file : attachments) {
|
| 193 |
helper.addAttachment(file.getName(), file);
|
193 |
helper.addAttachment(file.getName(), file);
|
| 194 |
}
|
194 |
}
|
| 195 |
mailSender.send(message);
|
195 |
mailSender.send(message);
|