| Line 52... |
Line 52... |
| 52 |
{
|
52 |
{
|
| 53 |
sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
|
53 |
sdf = new java.text.SimpleDateFormat("yyyy-MM-dd-HH:mm:ss");
|
| 54 |
emailFromAddress = "build@shop2020.in";
|
54 |
emailFromAddress = "build@shop2020.in";
|
| 55 |
password = "cafe@nes";
|
55 |
password = "cafe@nes";
|
| 56 |
mailer = new GmailUtils();
|
56 |
mailer = new GmailUtils();
|
| 57 |
//sendTo = new String[]{"vikram.raghav@shop2020.in"};
|
57 |
//sendTo = new String[]{"manish.sharma@shop2020.in"};
|
| 58 |
sendTo = new String[]{ "sandeep.sachdeva@shop2020.in", "manish.sharma@shop2020.in", "rajneesh.arora@shop2020.in",
|
58 |
sendTo = new String[]{ "sandeep.sachdeva@shop2020.in", "manish.sharma@shop2020.in", "rajneesh.arora@shop2020.in",
|
| 59 |
"khushal.bhatia@shop2020.in","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com",
|
59 |
"khushal.bhatia@shop2020.in","manoj.kumar@saholic.com","chaitnaya.vats@saholic.com",
|
| 60 |
"yukti.jain@shop2020.in","manisha.sharma@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in","anikendra.das@shop2020.in"};
|
60 |
"yukti.jain@shop2020.in","manisha.sharma@shop2020.in","chandan.kumar@shop2020.in","ankush.dhingra@shop2020.in","anikendra.das@shop2020.in"};
|
| - |
|
61 |
|
| 61 |
errorSendTo = new String[]{"kshitij.sood@shop2020.in","manish.sharma@shop2020.in","amit.gupta@shop2020.in","anikendra.das@shop2020.in"};
|
62 |
errorSendTo = new String[]{"kshitij.sood@shop2020.in","manish.sharma@shop2020.in","amit.gupta@shop2020.in","anikendra.das@shop2020.in"};
|
| 62 |
Client catalogServiceClient = null;
|
63 |
Client catalogServiceClient = null;
|
| 63 |
try {
|
64 |
try {
|
| 64 |
catalogServiceClient = new CatalogClient().getClient();
|
65 |
catalogServiceClient = new CatalogClient().getClient();
|
| 65 |
} catch (TTransportException e) {
|
66 |
} catch (TTransportException e) {
|
| Line 159... |
Line 160... |
| 159 |
continue;
|
160 |
continue;
|
| 160 |
}
|
161 |
}
|
| 161 |
System.out.println("Item ID " + entry.getItem_id());
|
162 |
System.out.println("Item ID " + entry.getItem_id());
|
| 162 |
System.out.println("Product Name " + getProductName(item));
|
163 |
System.out.println("Product Name " + getProductName(item));
|
| 163 |
System.out.println("Selling Price " + entry.getSellingPrice());
|
164 |
System.out.println("Selling Price " + entry.getSellingPrice());
|
| - |
|
165 |
pricingItems.append("<tr>"
|
| - |
|
166 |
+ "<td>" +getProductName(item)+"</td>"
|
| - |
|
167 |
+"<td>" + item.getId() + "</td>"
|
| - |
|
168 |
+"<td>" + entry.getSellingPrice() + "</td>"
|
| - |
|
169 |
+"</tr>");
|
| 164 |
try {
|
170 |
try {
|
| 165 |
feedResponseMap.put(entry.getItem_id(), fkPricing.updatePrice(flipkartItemsMap.get(entry.getItem_id()).getSkuAtFlipkart(), entry.getSellingPrice()+""));
|
171 |
feedResponseMap.put(entry.getItem_id(), fkPricing.updatePrice(flipkartItemsMap.get(entry.getItem_id()).getSkuAtFlipkart(), entry.getSellingPrice()+""));
|
| 166 |
} catch (Exception e) {
|
172 |
} catch (Exception e) {
|
| 167 |
try {
|
173 |
try {
|
| 168 |
mailer.sendSSLMessage(errorSendTo, "Error While Flipkart Pricing Updation Item Id: "+ entry.getItem_id(), "Due to Json Exception in Flipkart Pricing Panel", emailFromAddress, password,new ArrayList<File>());
|
174 |
mailer.sendSSLMessage(errorSendTo, "Error While Flipkart Pricing Updation Item Id: "+ entry.getItem_id(), "Due to Json Exception in Flipkart Pricing Panel", emailFromAddress, password,new ArrayList<File>());
|
| Line 175... |
Line 181... |
| 175 |
"\","+"\"attributeValues\""+":"+
|
181 |
"\","+"\"attributeValues\""+":"+
|
| 176 |
"{\"selling_price\""+":"+"\""+ new Double(entry.getSellingPrice()).intValue()+"\""+"},"+"\"listingValidations\":" +
|
182 |
"{\"selling_price\""+":"+"\""+ new Double(entry.getSellingPrice()).intValue()+"\""+"},"+"\"listingValidations\":" +
|
| 177 |
"{\"PRICE_ERROR_CHECK\":" +
|
183 |
"{\"PRICE_ERROR_CHECK\":" +
|
| 178 |
"\"disable\"}"+"}");
|
184 |
"\"disable\"}"+"}");
|
| 179 |
|
185 |
|
| 180 |
pricingItems.append("<tr>"
|
- |
|
| 181 |
+ "<td>" +getProductName(item)+"</td>"
|
- |
|
| 182 |
+"<td>" + item.getId() + "</td>"
|
- |
|
| 183 |
+"<td>" + entry.getSellingPrice() + "</td>"
|
- |
|
| 184 |
+"</tr>");
|
186 |
|
| 185 |
i++;
|
187 |
i++;
|
| 186 |
if(flipkartPricingItems.size()!=1 && (i!=flipkartPricingItems.size()) ){
|
188 |
if(flipkartPricingItems.size()!=1 && (i!=flipkartPricingItems.size()) ){
|
| 187 |
if(i%10!=0){
|
189 |
if(i%10!=0){
|
| 188 |
jsonRequest.append(",");
|
190 |
jsonRequest.append(",");
|
| 189 |
}
|
191 |
}
|