Subversion Repositories SmartDukaan

Rev

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

Rev 29317 Rev 29336
Line 3050... Line 3050...
3050
 
3050
 
3051
	public void markDelhiveryOrderDelivered() throws ProfitMandiBusinessException, IOException {
3051
	public void markDelhiveryOrderDelivered() throws ProfitMandiBusinessException, IOException {
3052
		List<Order> orders = orderRepository.selectOrderByProviderIdAndStatus(ProfitMandiConstants.DELHIVERY_PROVIDERID,
3052
		List<Order> orders = orderRepository.selectOrderByProviderIdAndStatus(ProfitMandiConstants.DELHIVERY_PROVIDERID,
3053
				OrderStatus.SHIPPED_FROM_WH);
3053
				OrderStatus.SHIPPED_FROM_WH);
3054
 
3054
 
3055
		LOGGER.info("airwayBill" + orders);
-
 
3056
 
-
 
3057
		if (!orders.isEmpty()) {
3055
		if (!orders.isEmpty()) {
3058
			List<String> airwayBill = orders.stream().map(x -> x.getAirwayBillNumber()).collect(Collectors.toList());
3056
			List<String> airwayBill = orders.stream().map(x -> x.getAirwayBillNumber()).collect(Collectors.toList());
3059
 
3057
 
3060
			LOGGER.info("airwayBill" + airwayBill);
3058
			LOGGER.info("airwayBill" + airwayBill);
3061
			String url = "https://track.delhivery.com/api/v1/packages/json/";
3059
			String url = "https://track.delhivery.com/api/v1/packages/json/";
Line 3106... Line 3104...
3106
 
3104
 
3107
					SendNotificationModel sendNotificationModel = new SendNotificationModel();
3105
					SendNotificationModel sendNotificationModel = new SendNotificationModel();
3108
					sendNotificationModel.setCampaignName("Order Delivered");
3106
					sendNotificationModel.setCampaignName("Order Delivered");
3109
					sendNotificationModel.setTitle("Order Delivered");
3107
					sendNotificationModel.setTitle("Order Delivered");
3110
					sendNotificationModel.setMessage(String.format("Dear partner, your SmartDukaan ORDER " + aws
3108
					sendNotificationModel.setMessage(String.format("Dear partner, your SmartDukaan ORDER " + aws
3111
							+ "has been delivered to you in a safe" + "."));
3109
							+ "has been delivered to you in a safe sealed bag" + "."));
3112
					sendNotificationModel.setType("url");
3110
					sendNotificationModel.setType("url");
3113
					sendNotificationModel.setUrl("https://app.smartdukaan.com/pages/home/notifications");
3111
					sendNotificationModel.setUrl("https://app.smartdukaan.com/pages/home/notifications");
3114
					sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
3112
					sendNotificationModel.setExpiresat(LocalDateTime.now().plusDays(1));
3115
					sendNotificationModel.setMessageType(MessageType.notification);
3113
					sendNotificationModel.setMessageType(MessageType.notification);
3116
					int userId = userAccountRepository.selectUserIdByRetailerId(orders.get(0).getRetailerId());
3114
					int userId = userAccountRepository.selectUserIdByRetailerId(orders.get(0).getRetailerId());