| Line 120... |
Line 120... |
| 120 |
}
|
120 |
}
|
| 121 |
BufferedReader rd = null;
|
121 |
BufferedReader rd = null;
|
| 122 |
try {
|
122 |
try {
|
| 123 |
rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
|
123 |
rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
|
| 124 |
} catch (IllegalStateException e1) {
|
124 |
} catch (IllegalStateException e1) {
|
| 125 |
// TODO Auto-generated catch block
|
125 |
// TODO Auto-generated catch block
|
| 126 |
e1.printStackTrace();
|
126 |
e1.printStackTrace();
|
| 127 |
} catch (IOException e1) {
|
127 |
} catch (IOException e1) {
|
| 128 |
// TODO Auto-generated catch block
|
128 |
// TODO Auto-generated catch block
|
| 129 |
e1.printStackTrace();
|
129 |
e1.printStackTrace();
|
| 130 |
}
|
130 |
}
|
| Line 203... |
Line 203... |
| 203 |
rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
|
203 |
rd = new BufferedReader(new InputStreamReader(response.getEntity().getContent()));
|
| 204 |
currentPricingItems = (CurrentPricingItems) gson.fromJson(rd, CurrentPricingItems.class);
|
204 |
currentPricingItems = (CurrentPricingItems) gson.fromJson(rd, CurrentPricingItems.class);
|
| 205 |
if(currentPricingItems.getRows().size()!=0){
|
205 |
if(currentPricingItems.getRows().size()!=0){
|
| 206 |
for(CurrentPricing currentPricing:currentPricingItems.getRows()){
|
206 |
for(CurrentPricing currentPricing:currentPricingItems.getRows()){
|
| 207 |
currentPricesMap.put(currentPricing.getSellerSku(),currentPricing);
|
207 |
currentPricesMap.put(currentPricing.getSellerSku(),currentPricing);
|
| 208 |
//System.out.println(currentPricing.getSellerSku()+" "+currentPricing.getSellingPrice());
|
208 |
System.out.println(currentPricing.getSellerSku()+" "+currentPricing.getSellingPrice());
|
| 209 |
}
|
209 |
}
|
| 210 |
}
|
210 |
}
|
| 211 |
else{
|
211 |
else{
|
| 212 |
exitfetchingcurrent = false;
|
212 |
exitfetchingcurrent = false;
|
| 213 |
}
|
213 |
}
|
| 214 |
i++;
|
214 |
i++;
|
| 215 |
}
|
215 |
}
|
| - |
|
216 |
System.out.println("Before exit");
|
| - |
|
217 |
System.exit(0);
|
| 216 |
FileInputStream fis = new FileInputStream("/root/code/trunk/SnapDealFeeds/SellerPricing.xls");
|
218 |
FileInputStream fis = new FileInputStream("/root/code/trunk/SnapDealFeeds/SellerPricing.xls");
|
| 217 |
Workbook hwb = new HSSFWorkbook(fis);
|
219 |
Workbook hwb = new HSSFWorkbook(fis);
|
| 218 |
Sheet sheet = hwb.getSheetAt(0);
|
220 |
Sheet sheet = hwb.getSheetAt(0);
|
| 219 |
Row row;
|
221 |
Row row;
|
| 220 |
int iterator = 1;
|
222 |
int iterator = 1;
|
| Line 280... |
Line 282... |
| 280 |
Map<String,Double> updatedSkuMap = new HashMap<String,Double>();
|
282 |
Map<String,Double> updatedSkuMap = new HashMap<String,Double>();
|
| 281 |
System.out.println("Feed response " + feedresponse);
|
283 |
System.out.println("Feed response " + feedresponse);
|
| 282 |
if(feedresponse.contains("Error")){
|
284 |
if(feedresponse.contains("Error")){
|
| 283 |
System.out.println("Error while uploading sheet");
|
285 |
System.out.println("Error while uploading sheet");
|
| 284 |
try {
|
286 |
try {
|
| 285 |
mailer.sendSSLMessage(sendTo,"Error at Snapdeal while Changing Prices"+ sdf.format(System.currentTimeMillis()),"No change in Snapdeal Prices to be updated ", emailFromAddress, password, new ArrayList<File>());
|
287 |
mailer.sendSSLMessage(sendTo,"Error at Snapdeal while Uploading Pricing feed "+ sdf.format(System.currentTimeMillis()),"This Error means that there is some problem while uploading pricing feed to snapdeal", emailFromAddress, password, new ArrayList<File>());
|
| 286 |
} catch (MessagingException e) {
|
288 |
} catch (MessagingException e) {
|
| 287 |
e.printStackTrace();
|
289 |
e.printStackTrace();
|
| 288 |
}
|
290 |
}
|
| 289 |
System.exit(0);
|
291 |
System.exit(0);
|
| 290 |
}
|
292 |
}
|