| Line 48... |
Line 48... |
| 48 |
super();
|
48 |
super();
|
| 49 |
}
|
49 |
}
|
| 50 |
|
50 |
|
| 51 |
// GET /logout
|
51 |
// GET /logout
|
| 52 |
public String create(){
|
52 |
public String create(){
|
| - |
|
53 |
StorePricing sp = new StorePricing();
|
| 53 |
LogisticsClient logisticsServiceClient = null;
|
54 |
LogisticsClient logisticsServiceClient = null;
|
| 54 |
CatalogClient catalogServiceClient = null;
|
55 |
CatalogClient catalogServiceClient = null;
|
| 55 |
try {
|
56 |
try {
|
| 56 |
logisticsServiceClient = new LogisticsClient();
|
57 |
logisticsServiceClient = new LogisticsClient();
|
| 57 |
Client logisticsClient = logisticsServiceClient.getClient();
|
58 |
Client logisticsClient = logisticsServiceClient.getClient();
|
| 58 |
LogisticsInfo logistincInfo = logisticsClient.getLogisticsEstimationForStore(itemId, pin, DeliveryType.COD);
|
59 |
LogisticsInfo logistincInfo = logisticsClient.getLogisticsEstimationForStore(itemId, pin, DeliveryType.COD);
|
| 59 |
date = logistincInfo.getDeliveryTime();
|
60 |
date = logistincInfo.getDeliveryTime();
|
| 60 |
isCODAvailable = logistincInfo.isCodAllowed();
|
61 |
isCODAvailable = logistincInfo.isCodAllowed();
|
| 61 |
isOTGAvailable = logistincInfo.isOtgAvailable();
|
62 |
isOTGAvailable = logistincInfo.isOtgAvailable();
|
| 62 |
catalogServiceClient = new CatalogClient();
|
63 |
catalogServiceClient = new CatalogClient();
|
| 63 |
StorePricing sp = catalogServiceClient.getClient().getStorePricing(itemId);
|
64 |
sp = catalogServiceClient.getClient().getStorePricing(itemId);
|
| 64 |
sellingPrice = sp.getRecommendedPrice();
|
65 |
sellingPrice = sp.getRecommendedPrice();
|
| 65 |
minAdvanceAmount = logistincInfo.getProviderId();
|
66 |
minAdvanceAmount = logistincInfo.getProviderId();
|
| 66 |
maxSellingPrice = sp.getMaxPrice();
|
67 |
maxSellingPrice = sp.getMaxPrice();
|
| 67 |
minSellingPrice = sp.getMinPrice();
|
68 |
minSellingPrice = sp.getMinPrice();
|
| 68 |
|
69 |
|
| Line 78... |
Line 79... |
| 78 |
response.put("on_time_guarantee", Boolean.toString(isOTGAvailable));
|
79 |
response.put("on_time_guarantee", Boolean.toString(isOTGAvailable));
|
| 79 |
response.put("selling_price", Double.toString(sellingPrice));
|
80 |
response.put("selling_price", Double.toString(sellingPrice));
|
| 80 |
response.put("min_advance_amount", Long.toString(minAdvanceAmount));
|
81 |
response.put("min_advance_amount", Long.toString(minAdvanceAmount));
|
| 81 |
response.put("min_selling_price", Double.toString(minSellingPrice));
|
82 |
response.put("min_selling_price", Double.toString(minSellingPrice));
|
| 82 |
response.put("max_selling_price", Double.toString(maxSellingPrice));
|
83 |
response.put("max_selling_price", Double.toString(maxSellingPrice));
|
| - |
|
84 |
response.put("best_deal_text", sp.getBestDealText() == null ? " " : sp.getBestDealText());
|
| - |
|
85 |
response.put("freebie_item_id", Long.toString(sp.getFreebieItemId()));
|
| 83 |
return "index";
|
86 |
return "index";
|
| 84 |
}
|
87 |
}
|
| 85 |
|
88 |
|
| 86 |
public String show(){
|
89 |
public String show(){
|
| 87 |
StringTokenizer tokenizer = new StringTokenizer(this.id, "_");
|
90 |
StringTokenizer tokenizer = new StringTokenizer(this.id, "_");
|