| Line 11... |
Line 11... |
| 11 |
|
11 |
|
| 12 |
import in.shop2020.logistics.Provider;
|
12 |
import in.shop2020.logistics.Provider;
|
| 13 |
import in.shop2020.model.v1.order.Order;
|
13 |
import in.shop2020.model.v1.order.Order;
|
| 14 |
import in.shop2020.model.v1.order.OrderStatus;
|
14 |
import in.shop2020.model.v1.order.OrderStatus;
|
| 15 |
import in.shop2020.serving.utils.FormattingUtils;
|
15 |
import in.shop2020.serving.utils.FormattingUtils;
|
| 16 |
import in.shop2020.thrift.clients.LogisticsServiceClient;
|
16 |
import in.shop2020.thrift.clients.LogisticsClient;
|
| 17 |
import in.shop2020.thrift.clients.TransactionServiceClient;
|
17 |
import in.shop2020.thrift.clients.TransactionClient;
|
| 18 |
|
18 |
|
| 19 |
import org.apache.log4j.Logger;
|
19 |
import org.apache.log4j.Logger;
|
| 20 |
import org.apache.struts2.convention.annotation.InterceptorRef;
|
20 |
import org.apache.struts2.convention.annotation.InterceptorRef;
|
| 21 |
import org.apache.struts2.convention.annotation.InterceptorRefs;
|
21 |
import org.apache.struts2.convention.annotation.InterceptorRefs;
|
| 22 |
import org.apache.struts2.convention.annotation.Result;
|
22 |
import org.apache.struts2.convention.annotation.Result;
|
| Line 80... |
Line 80... |
| 80 |
|
80 |
|
| 81 |
public String index(){
|
81 |
public String index(){
|
| 82 |
logger.info("this.request=" + this.request);
|
82 |
logger.info("this.request=" + this.request);
|
| 83 |
|
83 |
|
| 84 |
try {
|
84 |
try {
|
| 85 |
TransactionServiceClient transactionServiceClient = new TransactionServiceClient();
|
85 |
TransactionClient transactionServiceClient = new TransactionClient();
|
| 86 |
in.shop2020.model.v1.order.TransactionService.Client orderClient = transactionServiceClient.getClient();
|
86 |
in.shop2020.model.v1.order.TransactionService.Client orderClient = transactionServiceClient.getClient();
|
| 87 |
orders = orderClient.getOrdersForCustomer(userinfo.getUserId(), 0, (new Date()).getTime(), statuses);
|
87 |
orders = orderClient.getOrdersForCustomer(userinfo.getUserId(), 0, (new Date()).getTime(), statuses);
|
| 88 |
//Reverse the list of order. Last come first displayed
|
88 |
//Reverse the list of order. Last come first displayed
|
| 89 |
Collections.reverse(orders);
|
89 |
Collections.reverse(orders);
|
| 90 |
LogisticsServiceClient logisticsServiceClient = new LogisticsServiceClient();
|
90 |
LogisticsClient logisticsServiceClient = new LogisticsClient();
|
| 91 |
in.shop2020.logistics.LogisticsService.Client logisticsClient = logisticsServiceClient.getClient();
|
91 |
in.shop2020.logistics.LogisticsService.Client logisticsClient = logisticsServiceClient.getClient();
|
| 92 |
List<Provider> providers = logisticsClient.getAllProviders();
|
92 |
List<Provider> providers = logisticsClient.getAllProviders();
|
| 93 |
|
93 |
|
| 94 |
for(Provider provider: providers)
|
94 |
for(Provider provider: providers)
|
| 95 |
providerNames.put(provider.getId(), provider.getName());
|
95 |
providerNames.put(provider.getId(), provider.getName());
|