Subversion Repositories SmartDukaan

Rev

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

Rev 35363 Rev 35364
Line 283... Line 283...
283
 
283
 
284
        Map<Integer, List<String>> catalogLabelMap = this.getLabels();
284
        Map<Integer, List<String>> catalogLabelMap = this.getLabels();
285
 
285
 
286
        //logger.info("catalogLabelMap {}", catalogLabelMap);
286
        //logger.info("catalogLabelMap {}", catalogLabelMap);
287
 
287
 
288
        List<ItemTagModel> itemTagModelsByStatus = tagListingRepository.getAllItemTagByStatus(statuses);
288
        List<ItemTagModel> itemTagModels = tagListingRepository.getAllItemTagByStatus(statuses);
289
 
289
 
290
        logger.info("itemTagModelsByStatus {}" , itemTagModelsByStatus.size());
290
        logger.info("itemTagModels {}" , itemTagModels.size());
291
 
291
 
292
        List<Integer> eolItemIds = catalogRepository.findAllWithEOLWithOutStockItemId();
292
        List<Integer> eolItemIds = catalogRepository.findAllWithEOLWithOutStockItemId();
293
 
293
 
294
        logger.info("eolItemIds.size {}" , eolItemIds.size());
-
 
295
 
-
 
296
//        Set<Integer> eolSet = new HashSet<>(eolItemIds);
294
        Set<Integer> eolSet = new HashSet<>(eolItemIds);
297
        Set<Integer> eolSet = new HashSet<>();
-
 
298
 
295
 
299
        logger.info("eolSetItemIds.size {}" , eolSet.size());
296
        logger.info("eolSetItemIds.size {}" , eolSet.size());
300
 
297
 
301
//        remove eol itme id from listing
-
 
302
 
-
 
303
        List<ItemTagModel> itemTagModels = new ArrayList<>();
-
 
304
 
-
 
305
        for (ItemTagModel itm : itemTagModelsByStatus) {
-
 
306
            // Check if the item's ID is NOT contained in the eolSet
-
 
307
            if (!eolSet.contains(itm.getItem().getId())) {
-
 
308
                // If it's NOT EOL, add it to the new list
-
 
309
                itemTagModels.add(itm);
-
 
310
            }
-
 
311
        }
-
 
312
 
-
 
313
        logger.info("itemTagModels {}" , itemTagModels.size());
-
 
314
 
-
 
315
        Map<String, Object> projection = new HashMap<>();
298
        Map<String, Object> projection = new HashMap<>();
316
        projection.put("defaultImageUrl", 1);
299
        projection.put("defaultImageUrl", 1);
317
 
300
 
318
        List<String> excludeBrands = Arrays.asList("Dummy", "FOC HANDSET");
301
        List<String> excludeBrands = Arrays.asList("Dummy", "FOC HANDSET");
319
 
302
 
Line 483... Line 466...
483
                    itemObj.setField("mrp_f", tagListing.getMrp());
466
                    itemObj.setField("mrp_f", tagListing.getMrp());
484
                    itemObj.setField("mop_f", tagListing.getMop());
467
                    itemObj.setField("mop_f", tagListing.getMop());
485
                    itemObj.setField("sellingPrice_f", tagListing.getSellingPrice());
468
                    itemObj.setField("sellingPrice_f", tagListing.getSellingPrice());
486
                    itemObj.setField("active_b", tagListing.isActive());
469
                    itemObj.setField("active_b", tagListing.isActive());
487
                    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
                    }
488
                    mop = tagListing.getMop();
477
                    mop = tagListing.getMop();
489
                    dp = tagListing.getSellingPrice();
478
                    dp = tagListing.getSellingPrice();
490
                }
479
                }
491
                itemObjs.add(itemObj);
480
                itemObjs.add(itemObj);
492
            }
481
            }