Subversion Repositories SmartDukaan

Rev

Rev 9835 | Rev 9841 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9835 Rev 9836
Line 841... Line 841...
841
            
841
            
842
            for(in.shop2020.model.v1.catalog.Item thriftItem : thriftItems) {
842
            for(in.shop2020.model.v1.catalog.Item thriftItem : thriftItems) {
843
                List<in.shop2020.model.v1.inventory.VendorItemPricing> vip = inventoryClient.getAllItemPricing(thriftItem.getId());
843
                List<in.shop2020.model.v1.inventory.VendorItemPricing> vip = inventoryClient.getAllItemPricing(thriftItem.getId());
844
                List<in.shop2020.model.v1.inventory.VendorItemMapping> vim = inventoryClient.getVendorItemMappings(thriftItem.getId());
844
                List<in.shop2020.model.v1.inventory.VendorItemMapping> vim = inventoryClient.getVendorItemMappings(thriftItem.getId());
845
                List<in.shop2020.model.v1.catalog.SourceItemPricing> sip = catalogClient.getAllSourcePricing(thriftItem.getId());
845
                List<in.shop2020.model.v1.catalog.SourceItemPricing> sip = catalogClient.getAllSourcePricing(thriftItem.getId());
846
                itemList.add(getItemFromThriftItem(thriftItem, vip, vim, sip, null, null, null, null, "", null));
846
                itemList.add(getItemFromThriftItem(thriftItem, vip, vim, sip, null, null, null, null, null, null));
847
            }
847
            }
848
        } catch (Exception e) {
848
        } catch (Exception e) {
849
            logger.error("Error while getting items by category: " + category, e);
849
            logger.error("Error while getting items by category: " + category, e);
850
        }
850
        }
851
        Collections.sort(itemList, new ItemsComparator());
851
        Collections.sort(itemList, new ItemsComparator());
Line 871... Line 871...
871
                
871
                
872
    			in.shop2020.model.v1.catalog.Item thriftItem = catalogClient.getItem(itemId);
872
    			in.shop2020.model.v1.catalog.Item thriftItem = catalogClient.getItem(itemId);
873
				List<in.shop2020.model.v1.inventory.VendorItemPricing> vip = inventoryClient.getAllItemPricing(thriftItem.getId());
873
				List<in.shop2020.model.v1.inventory.VendorItemPricing> vip = inventoryClient.getAllItemPricing(thriftItem.getId());
874
				List<in.shop2020.model.v1.inventory.VendorItemMapping> vim = inventoryClient.getVendorItemMappings(thriftItem.getId());
874
				List<in.shop2020.model.v1.inventory.VendorItemMapping> vim = inventoryClient.getVendorItemMappings(thriftItem.getId());
875
				List<in.shop2020.model.v1.catalog.SourceItemPricing> sip = catalogClient.getAllSourcePricing(thriftItem.getId());
875
				List<in.shop2020.model.v1.catalog.SourceItemPricing> sip = catalogClient.getAllSourcePricing(thriftItem.getId());
876
				items.add(getItemFromThriftItem(thriftItem, vip, vim, sip, null, null, null, null, "", null));
876
				items.add(getItemFromThriftItem(thriftItem, vip, vim, sip, null, null, null, null, null, null));
877
    		} catch (Exception e) {
877
    		} catch (Exception e) {
878
    			logger.error("Could not fetch item for : " + itemId, e);
878
    			logger.error("Could not fetch item for : " + itemId, e);
879
    			return "Could not push to production. No item got pushed.";
879
    			return "Could not push to production. No item got pushed.";
880
    		}
880
    		}
881
    	}
881
    	}
Line 1256... Line 1256...
1256
		try{
1256
		try{
1257
            CatalogClient catalogServiceClient = new CatalogClient();
1257
            CatalogClient catalogServiceClient = new CatalogClient();
1258
            Client catalogClient = catalogServiceClient.getClient();
1258
            Client catalogClient = catalogServiceClient.getClient();
1259
            in.shop2020.model.v1.catalog.Item thriftItem = catalogClient.addSimilarItem(itemId, catalogItemId);;
1259
            in.shop2020.model.v1.catalog.Item thriftItem = catalogClient.addSimilarItem(itemId, catalogItemId);;
1260
 
1260
 
1261
            return getItemFromThriftItem(thriftItem, null, null, null, null, null, null, null, "", null);
1261
            return getItemFromThriftItem(thriftItem, null, null, null, null, null, null, null, null, null);
1262
        }catch(Exception e){
1262
        }catch(Exception e){
1263
            logger.error("Error while adding the SimilarItems for: " + itemId, e);
1263
            logger.error("Error while adding the SimilarItems for: " + itemId, e);
1264
        }
1264
        }
1265
        return null;
1265
        return null;
1266
	}
1266
	}