| Line 57... |
Line 57... |
| 57 |
return "index";
|
57 |
return "index";
|
| 58 |
}
|
58 |
}
|
| 59 |
|
59 |
|
| 60 |
|
60 |
|
| 61 |
public List<Amazonlisted> fetchItems() throws TException {
|
61 |
public List<Amazonlisted> fetchItems() throws TException {
|
| 62 |
Client CatalogClient = new CatalogClient().getClient();
|
62 |
Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
|
| 63 |
return CatalogClient.getAllAmazonListedItems();
|
63 |
return CatalogClient.getAllAmazonListedItems();
|
| 64 |
}
|
64 |
}
|
| 65 |
|
65 |
|
| 66 |
public Amazonlisted fetchItemDetail() throws NumberFormatException, TException {
|
66 |
public Amazonlisted fetchItemDetail() throws NumberFormatException, TException {
|
| 67 |
Client CatalogClient = new CatalogClient().getClient();
|
67 |
Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
|
| 68 |
return CatalogClient.getAmazonItemDetails(Long.valueOf(id));
|
68 |
return CatalogClient.getAmazonItemDetails(Long.valueOf(id));
|
| 69 |
}
|
69 |
}
|
| 70 |
|
70 |
|
| 71 |
public Item getSaholicItem(String id) throws NumberFormatException, CatalogServiceException, TException {
|
71 |
public Item getSaholicItem(String id) throws NumberFormatException, CatalogServiceException, TException {
|
| 72 |
Client CatalogClient = new CatalogClient().getClient();
|
72 |
Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
|
| 73 |
return CatalogClient.getItem(Long.valueOf(id));
|
73 |
return CatalogClient.getItem(Long.valueOf(id));
|
| 74 |
}
|
74 |
}
|
| 75 |
|
75 |
|
| 76 |
|
76 |
|
| 77 |
|
77 |
|
| 78 |
public String update() throws NumberFormatException, TException{
|
78 |
public String update() throws NumberFormatException, TException{
|
| 79 |
Client CatalogClient = new CatalogClient().getClient();
|
79 |
Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
|
| 80 |
if ( Double.valueOf(fbaPrice) > Double.valueOf(saholicPrice) || Double.valueOf(sellingPrice) > Double.valueOf(saholicPrice) ) {
|
80 |
if ( Double.valueOf(fbaPrice) > Double.valueOf(saholicPrice) || Double.valueOf(sellingPrice) > Double.valueOf(saholicPrice) ) {
|
| 81 |
addActionError("Failed To Do Changes");
|
81 |
addActionError("Failed To Do Changes");
|
| 82 |
}
|
82 |
}
|
| 83 |
else {
|
83 |
else {
|
| 84 |
boolean flag=false;
|
84 |
boolean flag=false;
|
| Line 131... |
Line 131... |
| 131 |
return logisticsClient.getClient().getLogisticsInfo("110001", Long.valueOf(itemId), DeliveryType.COD, PickUpType.COURIER).getShippingTime();
|
131 |
return logisticsClient.getClient().getLogisticsInfo("110001", Long.valueOf(itemId), DeliveryType.COD, PickUpType.COURIER).getShippingTime();
|
| 132 |
|
132 |
|
| 133 |
}
|
133 |
}
|
| 134 |
|
134 |
|
| 135 |
public Map<Long, String> getAliveItemMap() throws TException{
|
135 |
public Map<Long, String> getAliveItemMap() throws TException{
|
| 136 |
Client CatalogClient = new CatalogClient().getClient();
|
136 |
Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
|
| 137 |
List<Item> itemList = CatalogClient.getAllAliveItems();
|
137 |
List<Item> itemList = CatalogClient.getAllAliveItems();
|
| 138 |
Map<Long, String> itemMap = new HashMap<Long, String>();
|
138 |
Map<Long, String> itemMap = new HashMap<Long, String>();
|
| 139 |
for (Item o : itemList) {
|
139 |
for (Item o : itemList) {
|
| 140 |
itemMap.put((Long) o.getId(), (String) o.getBrand()+" "+o.getModelName()+" "+o.getModelNumber()+" "+o.getColor());
|
140 |
itemMap.put((Long) o.getId(), (String) o.getBrand()+" "+o.getModelName()+" "+o.getModelNumber()+" "+o.getColor());
|
| 141 |
}
|
141 |
}
|