Subversion Repositories SmartDukaan

Rev

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

Rev 35364 Rev 35365
Line 287... Line 287...
287
 
287
 
288
        List<ItemTagModel> itemTagModels = tagListingRepository.getAllItemTagByStatus(statuses);
288
        List<ItemTagModel> itemTagModels = tagListingRepository.getAllItemTagByStatus(statuses);
289
 
289
 
290
        logger.info("itemTagModels {}" , itemTagModels.size());
290
        logger.info("itemTagModels {}" , itemTagModels.size());
291
 
291
 
292
        List<Integer> eolItemIds = catalogRepository.findAllWithEOLWithOutStockItemId();
292
        List<Integer> eolWithOutStock = catalogRepository.findAllWithEOLWithOutStock();
293
 
293
 
294
        Set<Integer> eolSet = new HashSet<>(eolItemIds);
294
        Set<Integer> eolSet = new HashSet<>(eolWithOutStock);
295
 
295
 
296
        logger.info("eolSetItemIds.size {}" , eolSet.size());
296
        logger.info("eolSetIds.size {}" , eolSet.size());
297
 
297
 
298
        Map<String, Object> projection = new HashMap<>();
298
        Map<String, Object> projection = new HashMap<>();
299
        projection.put("defaultImageUrl", 1);
299
        projection.put("defaultImageUrl", 1);
300
 
300
 
301
        List<String> excludeBrands = Arrays.asList("Dummy", "FOC HANDSET");
301
        List<String> excludeBrands = Arrays.asList("Dummy", "FOC HANDSET");
Line 466... Line 466...
466
                    itemObj.setField("mrp_f", tagListing.getMrp());
466
                    itemObj.setField("mrp_f", tagListing.getMrp());
467
                    itemObj.setField("mop_f", tagListing.getMop());
467
                    itemObj.setField("mop_f", tagListing.getMop());
468
                    itemObj.setField("sellingPrice_f", tagListing.getSellingPrice());
468
                    itemObj.setField("sellingPrice_f", tagListing.getSellingPrice());
469
                    itemObj.setField("active_b", tagListing.isActive());
469
                    itemObj.setField("active_b", tagListing.isActive());
470
                    itemObj.setField("hot_deal_b", tagListing.isHotDeals());
470
                    itemObj.setField("hot_deal_b", tagListing.isHotDeals());
471
 
-
 
472
                    if(eolSet.contains(itemId)){
-
 
473
                        itemObj.setField("no_stock_eol", true);
-
 
474
                    }else {
-
 
475
                        itemObj.setField("no_stock_eol", false);
-
 
476
                    }
-
 
477
                    mop = tagListing.getMop();
471
                    mop = tagListing.getMop();
478
                    dp = tagListing.getSellingPrice();
472
                    dp = tagListing.getSellingPrice();
479
                }
473
                }
480
                itemObjs.add(itemObj);
474
                itemObjs.add(itemObj);
481
            }
475
            }
Line 551... Line 545...
551
            }
545
            }
552
            catalogSolrObj.setField("similarModels_ii", similalarModels == null ? Collections.EMPTY_LIST : similalarModels);
546
            catalogSolrObj.setField("similarModels_ii", similalarModels == null ? Collections.EMPTY_LIST : similalarModels);
553
 
547
 
554
 
548
 
555
            catalogSolrObj.setField("active_b", active);
549
            catalogSolrObj.setField("active_b", active);
-
 
550
            if(eolSet.contains(catalogId)){
-
 
551
                catalogSolrObj.setField("eol_no_stock", true);
-
 
552
            }else {
-
 
553
                catalogSolrObj.setField("eol_no_stock", false);
-
 
554
            }
556
            catalogSolrObjs.add(catalogSolrObj);
555
            catalogSolrObjs.add(catalogSolrObj);
557
        }
556
        }
558
 
557
 
559
        String solrPath = "http://" + solrUrl + ":8984/solr/demo";
558
        String solrPath = "http://" + solrUrl + ":8984/solr/demo";
560
        SolrClient solr = new HttpSolrClient.Builder(solrPath).build();
559
        SolrClient solr = new HttpSolrClient.Builder(solrPath).build();