Subversion Repositories SmartDukaan

Rev

Rev 37001 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 37001 Rev 37101
Line 1061... Line 1061...
1061
    @RequestMapping(value = "/getRetailerBlockBrandMappping", method = RequestMethod.POST)
1061
    @RequestMapping(value = "/getRetailerBlockBrandMappping", method = RequestMethod.POST)
1062
    public String getBlockBrandMappping(HttpServletRequest request,
1062
    public String getBlockBrandMappping(HttpServletRequest request,
1063
                                        @RequestParam(name = "brand", required = true, defaultValue = "0") String brand,
1063
                                        @RequestParam(name = "brand", required = true, defaultValue = "0") String brand,
1064
                                        @RequestParam(name = "fofoIds", required = true, defaultValue = "0") List<Integer> fofoIds, Model model)
1064
                                        @RequestParam(name = "fofoIds", required = true, defaultValue = "0") List<Integer> fofoIds, Model model)
1065
            throws Exception {
1065
            throws Exception {
-
 
1066
        if (brand == null || brand.trim().isEmpty()
-
 
1067
                || "null".equalsIgnoreCase(brand.trim()) || "0".equals(brand.trim())) {
-
 
1068
            model.addAttribute("response1", mvcResponseSender.createResponseString(false));
-
 
1069
            return "response";
-
 
1070
        }
1066
        List<RetailerBlockBrands> retailerBlockBrands = retailerBlockBrandsRepository.selectAllByBrands(brand);
1071
        List<RetailerBlockBrands> retailerBlockBrands = retailerBlockBrandsRepository.selectAllByBrands(brand);
1067
        if (!retailerBlockBrands.isEmpty()) {
1072
        if (!retailerBlockBrands.isEmpty()) {
1068
            retailerBlockBrandsRepository.deleteAllbyBrands(brand);
1073
            retailerBlockBrandsRepository.deleteAllbyBrands(brand);
1069
        }
1074
        }
1070
 
1075