| Line 70... |
Line 70... |
| 70 |
import java.util.stream.Collectors;
|
70 |
import java.util.stream.Collectors;
|
| 71 |
|
71 |
|
| 72 |
@Controller
|
72 |
@Controller
|
| 73 |
@Transactional(rollbackFor = Throwable.class)
|
73 |
@Transactional(rollbackFor = Throwable.class)
|
| 74 |
public class SchemeController {
|
74 |
public class SchemeController {
|
| - |
|
75 |
// Scheme payouts are IMEI-driven, so only serialized Ear Buds are offered in the picker
|
| - |
|
76 |
private static final int EARBUDS_CATEGORY_ID = 10024;
|
| 75 |
// 14202 = LED TV, 10024 = Ear Buds
|
77 |
// 14202 = LED TV
|
| 76 |
private static final List<Integer> categoryIds = Arrays.asList(ProfitMandiConstants.MOBILE_CATEGORY_ID,
|
78 |
private static final List<Integer> categoryIds = Arrays.asList(ProfitMandiConstants.MOBILE_CATEGORY_ID,
|
| 77 |
ProfitMandiConstants.TABLET_CATEGORY_ID, 14202, 10024);
|
79 |
ProfitMandiConstants.TABLET_CATEGORY_ID, 14202, EARBUDS_CATEGORY_ID);
|
| 78 |
|
80 |
|
| 79 |
private static List<SchemeType> EXCLUDE_EXTEND_SCHEMES = Arrays.asList(SchemeType.SELLOUT, SchemeType.SPECIAL_SUPPORT, SchemeType.SELLIN);
|
81 |
private static List<SchemeType> EXCLUDE_EXTEND_SCHEMES = Arrays.asList(SchemeType.SELLOUT, SchemeType.SPECIAL_SUPPORT, SchemeType.SELLIN);
|
| 80 |
|
82 |
|
| 81 |
private static final Logger LOGGER = LogManager.getLogger(SchemeController.class);
|
83 |
private static final Logger LOGGER = LogManager.getLogger(SchemeController.class);
|
| 82 |
@Autowired
|
84 |
@Autowired
|
| Line 181... |
Line 183... |
| 181 |
}
|
183 |
}
|
| 182 |
|
184 |
|
| 183 |
@RequestMapping(value = "/getBrandsByCategory", method = RequestMethod.GET)
|
185 |
@RequestMapping(value = "/getBrandsByCategory", method = RequestMethod.GET)
|
| 184 |
public String getTagListingItemsByBrand(HttpServletRequest request, @RequestParam int categoryId, Model model)
|
186 |
public String getTagListingItemsByBrand(HttpServletRequest request, @RequestParam int categoryId, Model model)
|
| 185 |
throws Exception {
|
187 |
throws Exception {
|
| 186 |
Set<String> brands = inventoryService.getAllTagListingBrands(categoryId);
|
188 |
Set<String> brands = inventoryService.getAllTagListingBrands(categoryId, categoryId == EARBUDS_CATEGORY_ID);
|
| 187 |
model.addAttribute("brands", brands);
|
189 |
model.addAttribute("brands", brands);
|
| 188 |
model.addAttribute("categoryId", categoryId);
|
190 |
model.addAttribute("categoryId", categoryId);
|
| 189 |
|
191 |
|
| 190 |
return "tag-listing-brands";
|
192 |
return "tag-listing-brands";
|
| 191 |
}
|
193 |
}
|
| Line 553... |
Line 555... |
| 553 |
}
|
555 |
}
|
| 554 |
|
556 |
|
| 555 |
@RequestMapping(value = "/getCatalogDescriptionByBrands", method = RequestMethod.GET)
|
557 |
@RequestMapping(value = "/getCatalogDescriptionByBrands", method = RequestMethod.GET)
|
| 556 |
public String getTagListingItemsByBrand(HttpServletRequest request, @RequestParam int categoryId,
|
558 |
public String getTagListingItemsByBrand(HttpServletRequest request, @RequestParam int categoryId,
|
| 557 |
@RequestParam List<String> brands, Model model) throws Exception {
|
559 |
@RequestParam List<String> brands, Model model) throws Exception {
|
| 558 |
Map<Integer, String> catalogIdItemDescriptionMap = inventoryService.getModelDescriptionMap(categoryId, brands);
|
560 |
Map<Integer, String> catalogIdItemDescriptionMap = inventoryService.getModelDescriptionMap(categoryId, brands,
|
| - |
|
561 |
categoryId == EARBUDS_CATEGORY_ID);
|
| 559 |
model.addAttribute("catalogIdItemDescriptionMap", catalogIdItemDescriptionMap);
|
562 |
model.addAttribute("catalogIdItemDescriptionMap", catalogIdItemDescriptionMap);
|
| 560 |
// model.addAttribute("brands", inventoryService.getAllBrands());
|
563 |
// model.addAttribute("brands", inventoryService.getAllBrands());
|
| 561 |
|
564 |
|
| 562 |
return "tag-listing-items-description";
|
565 |
return "tag-listing-items-description";
|
| 563 |
}
|
566 |
}
|