| Line 604... |
Line 604... |
| 604 |
retailerIds.add(order.getRetailerId());
|
604 |
retailerIds.add(order.getRetailerId());
|
| 605 |
orderIds.add(order.getId());
|
605 |
orderIds.add(order.getId());
|
| 606 |
|
606 |
|
| 607 |
}
|
607 |
}
|
| 608 |
|
608 |
|
| 609 |
/*
|
609 |
|
| 610 |
* List<NotifyOrder> notify = notifyOrderRespository.selectByorderIds(orderIds);
|
610 |
List<NotifyOrder> notify = notifyOrderRespository.selectByorderIds(orderIds);
|
| - |
|
611 |
for (NotifyOrder notifyOrder : notify) {
|
| - |
|
612 |
|
| - |
|
613 |
Order orderdetail = orderRepository.selectById(notifyOrder.getOrderId());
|
| - |
|
614 |
if (!orderdetail.getStatus().equals(OrderStatus.SUBMITTED_FOR_PROCESSING)) {
|
| - |
|
615 |
notifyOrder.setStatus(NotifyStatus.rejected);
|
| - |
|
616 |
}
|
| - |
|
617 |
}
|
| 611 |
* for (NotifyOrder notifyOrder : notify) { List<NotifyItem> notifyItems =
|
618 |
/* for (NotifyOrder notifyOrder : notify) { List<NotifyItem> notifyItems =
|
| 612 |
* notifyItemRepository.selectByNotifyId(notifyOrder.getNotifyId());
|
619 |
* notifyItemRepository.selectByNotifyId(notifyOrder.getNotifyId());
|
| 613 |
* Iterator<NotifyItem> notifyItemsIterator = notifyItems.iterator();
|
620 |
* Iterator<NotifyItem> notifyItemsIterator = notifyItems.iterator();
|
| 614 |
*
|
621 |
*
|
| 615 |
* while (notifyItemsIterator.hasNext()) { NotifyItem notifyItem =
|
622 |
* while (notifyItemsIterator.hasNext()) { NotifyItem notifyItem =
|
| 616 |
* notifyItemsIterator.next(); if
|
623 |
* notifyItemsIterator.next(); if
|
| Line 680... |
Line 687... |
| 680 |
// User userInfo = saholicUserRepository.selectById(loginDetails.getFofoId());
|
687 |
// User userInfo = saholicUserRepository.selectById(loginDetails.getFofoId());
|
| 681 |
LOGGER.info("status" + orderStatus);
|
688 |
LOGGER.info("status" + orderStatus);
|
| 682 |
try {
|
689 |
try {
|
| 683 |
Order order = orderRepository.selectById(orderId);
|
690 |
Order order = orderRepository.selectById(orderId);
|
| 684 |
orderRepository.refundOrder(orderId, loginDetails.getEmailId(), reason, orderStatus);
|
691 |
orderRepository.refundOrder(orderId, loginDetails.getEmailId(), reason, orderStatus);
|
| - |
|
692 |
List<NotifyOrder> notifyOrders = notifyOrderRespository.selectByOrder(orderId);
|
| - |
|
693 |
for (NotifyOrder notifyOrder : notifyOrders) {
|
| - |
|
694 |
if (notifyOrder.getStatus() == NotifyStatus.pending) {
|
| - |
|
695 |
notifyOrder.setStatus(NotifyStatus.rejected);
|
| - |
|
696 |
}
|
| 685 |
|
697 |
}
|
| 686 |
sendCancellationNotificationToPartner(order, reason);
|
698 |
sendCancellationNotificationToPartner(order, reason);
|
| 687 |
model.addAttribute("response", mvcResponseSender.createResponseString(true));
|
699 |
model.addAttribute("response", mvcResponseSender.createResponseString(true));
|
| 688 |
|
700 |
|
| 689 |
} catch (TransactionServiceException | TException e) {
|
701 |
} catch (TransactionServiceException | TException e) {
|
| 690 |
model.addAttribute("response", mvcResponseSender.createResponseString(false));
|
702 |
model.addAttribute("response", mvcResponseSender.createResponseString(false));
|