| Line 807... |
Line 807... |
| 807 |
for (Order order : orders) {
|
807 |
for (Order order : orders) {
|
| 808 |
|
808 |
|
| 809 |
orderRepository.refundOrder(order.getId(), loginDetails.getEmailId(), orderCancellationModel.getReason(), OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY);
|
809 |
orderRepository.refundOrder(order.getId(), loginDetails.getEmailId(), orderCancellationModel.getReason(), OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY);
|
| 810 |
List<NotifyOrder> notifyOrders = notifyOrderRespository.selectByOrder(order.getId());
|
810 |
List<NotifyOrder> notifyOrders = notifyOrderRespository.selectByOrder(order.getId());
|
| 811 |
for (NotifyOrder notifyOrder : notifyOrders) {
|
811 |
for (NotifyOrder notifyOrder : notifyOrders) {
|
| 812 |
if (notifyOrder.getStatus() == NotifyStatus.pending) {
|
812 |
if (notifyOrder.getStatus().equals(NotifyStatus.pending)) {
|
| 813 |
notifyOrder.setStatus(NotifyStatus.rejected);
|
813 |
notifyOrder.setStatus(NotifyStatus.rejected);
|
| 814 |
}
|
814 |
}
|
| 815 |
}
|
815 |
}
|
| 816 |
sendCancellationNotificationToPartner(order, orderCancellationModel.getReason());
|
816 |
sendCancellationNotificationToPartner(order, orderCancellationModel.getReason());
|
| 817 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
817 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|