| Line 20... |
Line 20... |
| 20 |
import in.shop2020.payments.PaymentService.Client;
|
20 |
import in.shop2020.payments.PaymentService.Client;
|
| 21 |
import in.shop2020.serving.auth.CRMAuthorizingRealm;
|
21 |
import in.shop2020.serving.auth.CRMAuthorizingRealm;
|
| 22 |
import in.shop2020.serving.model.ShipmentUpdate;
|
22 |
import in.shop2020.serving.model.ShipmentUpdate;
|
| 23 |
import in.shop2020.serving.services.BlueDartTrackingService;
|
23 |
import in.shop2020.serving.services.BlueDartTrackingService;
|
| 24 |
import in.shop2020.serving.services.AramexTrackingService;
|
24 |
import in.shop2020.serving.services.AramexTrackingService;
|
| - |
|
25 |
import in.shop2020.serving.services.DelhiveryTrackingService;
|
| 25 |
import in.shop2020.thrift.clients.CRMClient;
|
26 |
import in.shop2020.thrift.clients.CRMClient;
|
| 26 |
import in.shop2020.thrift.clients.PaymentClient;
|
27 |
import in.shop2020.thrift.clients.PaymentClient;
|
| 27 |
import in.shop2020.thrift.clients.TransactionClient;
|
28 |
import in.shop2020.thrift.clients.TransactionClient;
|
| 28 |
import in.shop2020.thrift.clients.UserClient;
|
29 |
import in.shop2020.thrift.clients.UserClient;
|
| 29 |
import in.shop2020.utils.ModelUtils;
|
30 |
import in.shop2020.utils.ModelUtils;
|
| Line 50... |
Line 51... |
| 50 |
@SuppressWarnings("serial")
|
51 |
@SuppressWarnings("serial")
|
| 51 |
public class UserOrderInfoController extends BaseController {
|
52 |
public class UserOrderInfoController extends BaseController {
|
| 52 |
private static Logger log = Logger.getLogger(Class.class);
|
53 |
private static Logger log = Logger.getLogger(Class.class);
|
| 53 |
private static BlueDartTrackingService blueDartTrackingService = new BlueDartTrackingService();
|
54 |
private static BlueDartTrackingService blueDartTrackingService = new BlueDartTrackingService();
|
| 54 |
private static AramexTrackingService aramexTrackingService = new AramexTrackingService();
|
55 |
private static AramexTrackingService aramexTrackingService = new AramexTrackingService();
|
| - |
|
56 |
private static DelhiveryTrackingService delhiveryTrackingService = new DelhiveryTrackingService();
|
| 55 |
|
57 |
|
| 56 |
private long orderId;
|
58 |
private long orderId;
|
| 57 |
private Order order;
|
59 |
private Order order;
|
| 58 |
private List<Payment> payments;
|
60 |
private List<Payment> payments;
|
| 59 |
private List<ShipmentUpdate> shipmentUpdates = new ArrayList<ShipmentUpdate>();
|
61 |
private List<ShipmentUpdate> shipmentUpdates = new ArrayList<ShipmentUpdate>();
|
| Line 97... |
Line 99... |
| 97 |
if (order.getLogistics_provider_id() == 1)
|
99 |
if (order.getLogistics_provider_id() == 1)
|
| 98 |
shipmentUpdates = blueDartTrackingService.getUpdates(order.getAirwaybill_no());
|
100 |
shipmentUpdates = blueDartTrackingService.getUpdates(order.getAirwaybill_no());
|
| 99 |
else if (order.getLogistics_provider_id() == 2) {
|
101 |
else if (order.getLogistics_provider_id() == 2) {
|
| 100 |
shipmentUpdates = aramexTrackingService.getUpdates(order.getAirwaybill_no());
|
102 |
shipmentUpdates = aramexTrackingService.getUpdates(order.getAirwaybill_no());
|
| 101 |
}
|
103 |
}
|
| - |
|
104 |
else if (order.getLogistics_provider_id() == 3) {
|
| - |
|
105 |
shipmentUpdates = delhiveryTrackingService.getUpdates(order.getAirwaybill_no());
|
| - |
|
106 |
}
|
| 102 |
else {
|
107 |
else {
|
| 103 |
log.error("Error : providerId = " + order.getLogistics_provider_id() + "for orderId : " + order.getId());
|
108 |
log.error("Error : providerId = " + order.getLogistics_provider_id() + "for orderId : " + order.getId());
|
| 104 |
}
|
109 |
}
|
| 105 |
return true;
|
110 |
return true;
|
| 106 |
}
|
111 |
}
|