| Line 135... |
Line 135... |
| 135 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletRepository;
|
135 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletRepository;
|
| 136 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
136 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
| 137 |
import com.spice.profitmandi.dao.repository.user.UserRepository;
|
137 |
import com.spice.profitmandi.dao.repository.user.UserRepository;
|
| 138 |
import com.spice.profitmandi.service.PartnerInvestmentService;
|
138 |
import com.spice.profitmandi.service.PartnerInvestmentService;
|
| 139 |
import com.spice.profitmandi.service.integrations.toffee.ToffeeService;
|
139 |
import com.spice.profitmandi.service.integrations.toffee.ToffeeService;
|
| 140 |
import com.spice.profitmandi.service.integrations.toffee.model.PremiumCalculationRequestModel;
|
- |
|
| 141 |
import com.spice.profitmandi.service.inventory.InventoryService;
|
140 |
import com.spice.profitmandi.service.inventory.InventoryService;
|
| 142 |
import com.spice.profitmandi.service.order.OrderService;
|
141 |
import com.spice.profitmandi.service.order.OrderService;
|
| 143 |
import com.spice.profitmandi.service.pricing.PriceDropService;
|
142 |
import com.spice.profitmandi.service.pricing.PriceDropService;
|
| 144 |
import com.spice.profitmandi.service.recharge.provider.OxigenRechargeProviderService;
|
143 |
import com.spice.profitmandi.service.recharge.provider.OxigenRechargeProviderService;
|
| 145 |
import com.spice.profitmandi.service.recharge.provider.ThinkWalnutDigitalRechargeProviderService;
|
144 |
import com.spice.profitmandi.service.recharge.provider.ThinkWalnutDigitalRechargeProviderService;
|
| Line 171... |
Line 170... |
| 171 |
@Autowired
|
170 |
@Autowired
|
| 172 |
private PriceDropService priceDropService;
|
171 |
private PriceDropService priceDropService;
|
| 173 |
|
172 |
|
| 174 |
@Autowired
|
173 |
@Autowired
|
| 175 |
private CsService csService;
|
174 |
private CsService csService;
|
| 176 |
|
175 |
|
| 177 |
@Autowired
|
176 |
@Autowired
|
| 178 |
private InsurancePolicyRepository insurancePolicyRepository;
|
177 |
private InsurancePolicyRepository insurancePolicyRepository;
|
| 179 |
|
178 |
|
| 180 |
@Autowired
|
179 |
@Autowired
|
| 181 |
private ToffeeService toffeeService;
|
180 |
private ToffeeService toffeeService;
|
| Line 1322... |
Line 1321... |
| 1322 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
|
1321 |
sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
|
| 1323 |
sendNotificationModel.setMessageType(MessageType.notification);
|
1322 |
sendNotificationModel.setMessageType(MessageType.notification);
|
| 1324 |
salesByFofoIdMap.put(fofoId, sale);
|
1323 |
salesByFofoIdMap.put(fofoId, sale);
|
| 1325 |
LOGGER.info(sale);
|
1324 |
LOGGER.info(sale);
|
| 1326 |
}
|
1325 |
}
|
| 1327 |
Map<Integer, Float> parternPolicyAmountMap = insurancePolicyRepository.selectAmountSumGroupByRetailerId(now, null);
|
1326 |
Map<Integer, Float> parternPolicyAmountMap = insurancePolicyRepository.selectAmountSumGroupByRetailerId(now,
|
| - |
|
1327 |
null);
|
| 1328 |
Map<Integer, Float> parternPolicyQtyMap = insurancePolicyRepository.selectAmountSumGroupByRetailerId(now, null);
|
1328 |
Map<Integer, Float> parternPolicyQtyMap = insurancePolicyRepository.selectAmountSumGroupByRetailerId(now, null);
|
| 1329 |
String saleReport = this.getDailySalesReportByPartnerId(salesByFofoIdMap, dailyTarget);
|
1329 |
String saleReport = this.getDailySalesReportByPartnerId(salesByFofoIdMap, dailyTarget);
|
| 1330 |
LOGGER.info(saleReport);
|
1330 |
LOGGER.info(saleReport);
|
| 1331 |
String cc[] = { "tarun.verma@smartdukaan.com", "kamini.sharma@smartdukaan.com", "prakash.rai@smartdukaan.com",
|
1331 |
String cc[] = { "tarun.verma@smartdukaan.com", "kamini.sharma@smartdukaan.com", "prakash.rai@smartdukaan.com",
|
| 1332 |
"chaitnaya.vats@smartdukaan.com"};
|
1332 |
"chaitnaya.vats@smartdukaan.com" };
|
| 1333 |
|
1333 |
|
| 1334 |
String subject = String.format("Sale till %s", now.format(timeFormatter));
|
1334 |
String subject = String.format("Sale till %s", now.format(timeFormatter));
|
| 1335 |
this.sendMailOfHtmlFomat("amit.gupta@shop2020.in", saleReport, cc, subject);
|
1335 |
this.sendMailOfHtmlFomat("amit.gupta@shop2020.in", saleReport, cc, subject);
|
| 1336 |
}
|
1336 |
}
|
| 1337 |
|
1337 |
|
| Line 1478... |
Line 1478... |
| 1478 |
}
|
1478 |
}
|
| 1479 |
}
|
1479 |
}
|
| 1480 |
}
|
1480 |
}
|
| 1481 |
|
1481 |
|
| 1482 |
public void testToffee() throws Exception {
|
1482 |
public void testToffee() throws Exception {
|
| 1483 |
LOGGER.info("Insurance Sum Summary --- {}",
|
1483 |
LOGGER.info("Insurance Sum Summary --- {}",
|
| 1484 |
insurancePolicyRepository.selectAmountSumGroupByRetailerId(LocalDateTime.now().minusDays(1), null));
|
1484 |
insurancePolicyRepository.selectAmountSumGroupByRetailerId(LocalDateTime.MIN, LocalDateTime.MAX));
|
| 1485 |
LOGGER.info("Insurance Qty Summary --- {}",
|
1485 |
LOGGER.info("Insurance Qty Summary --- {}",
|
| 1486 |
insurancePolicyRepository.selectQtyGroupByRetailerId(LocalDateTime.now().minusDays(1), null));
|
1486 |
insurancePolicyRepository.selectQtyGroupByRetailerId(LocalDateTime.MIN, LocalDateTime.MAX));
|
| 1487 |
// LOGGER.info("{}", toffeeService.getAuthToken());
|
1487 |
// LOGGER.info("{}", toffeeService.getAuthToken());
|
| - |
|
1488 |
/*
|
| 1488 |
/*LOGGER.info("{}", toffeeService.getProducts());
|
1489 |
* LOGGER.info("{}", toffeeService.getProducts()); // LOGGER.info("{}",
|
| 1489 |
// LOGGER.info("{}", toffeeService.getPincodes("36103000PR"));
|
- |
|
| 1490 |
PremiumCalculationRequestModel pcrm = new PremiumCalculationRequestModel();
|
1490 |
* toffeeService.getPincodes("36103000PR")); PremiumCalculationRequestModel pcrm
|
| 1491 |
pcrm.setProductDetails("36103000PR");
|
1491 |
* = new PremiumCalculationRequestModel(); pcrm.setProductDetails("36103000PR");
|
| 1492 |
// pcrm.setProductDetails("36103000PR");
|
1492 |
* // pcrm.setProductDetails("36103000PR");
|
| 1493 |
pcrm.setDurations(Arrays.asList("3 Months", "6 Months", "1 Year"));
|
1493 |
* pcrm.setDurations(Arrays.asList("3 Months", "6 Months", "1 Year"));
|
| 1494 |
pcrm.setSumInsured("15000");
|
1494 |
* pcrm.setSumInsured("15000");
|
| 1495 |
System.out.println(toffeeService.getPremiumCalculation(pcrm));*/
|
1495 |
* System.out.println(toffeeService.getPremiumCalculation(pcrm));
|
| - |
|
1496 |
*/
|
| 1496 |
}
|
1497 |
}
|
| 1497 |
|
1498 |
|
| 1498 |
public void schemeRollback(List<String> schemeIds) throws Exception {
|
1499 |
public void schemeRollback(List<String> schemeIds) throws Exception {
|
| 1499 |
List<Integer> schemeIdsInt = schemeIds.stream().map(x -> Integer.parseInt(x)).collect(Collectors.toList());
|
1500 |
List<Integer> schemeIdsInt = schemeIds.stream().map(x -> Integer.parseInt(x)).collect(Collectors.toList());
|
| 1500 |
Map<Integer, Scheme> schemesMap = schemeRepository.selectBySchemeIds(schemeIdsInt, 0, schemeIds.size()).stream()
|
1501 |
Map<Integer, Scheme> schemesMap = schemeRepository.selectBySchemeIds(schemeIdsInt, 0, schemeIds.size()).stream()
|