Subversion Repositories SmartDukaan

Rev

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

Rev 37270 Rev 37288
Line 3... Line 3...
3
import com.fasterxml.jackson.databind.ObjectMapper;
3
import com.fasterxml.jackson.databind.ObjectMapper;
4
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
4
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
5
import com.spice.profitmandi.dao.entity.catalog.Catalog;
5
import com.spice.profitmandi.dao.entity.catalog.Catalog;
6
import com.spice.profitmandi.dao.entity.catalog.ModelHotDeal;
6
import com.spice.profitmandi.dao.entity.catalog.ModelHotDeal;
7
import com.spice.profitmandi.dao.repository.catalog.CatalogRepository;
7
import com.spice.profitmandi.dao.repository.catalog.CatalogRepository;
-
 
8
import com.spice.profitmandi.dao.service.solr.FofoSolr;
8
import com.spice.profitmandi.service.catalog.BrandsService;
9
import com.spice.profitmandi.service.catalog.BrandsService;
9
import com.spice.profitmandi.service.catalog.HotDealAttributes;
10
import com.spice.profitmandi.service.catalog.HotDealAttributes;
10
import com.spice.profitmandi.service.catalog.ModelHotDealService;
11
import com.spice.profitmandi.service.catalog.ModelHotDealService;
11
import com.spice.profitmandi.dao.service.solr.FofoSolr;
-
 
12
import com.spice.profitmandi.web.model.LoginDetails;
12
import com.spice.profitmandi.web.model.LoginDetails;
13
import com.spice.profitmandi.web.util.CookiesProcessor;
13
import com.spice.profitmandi.web.util.CookiesProcessor;
14
import com.spice.profitmandi.web.util.MVCResponseSender;
14
import com.spice.profitmandi.web.util.MVCResponseSender;
15
import org.slf4j.Logger;
15
import org.slf4j.Logger;
16
import org.slf4j.LoggerFactory;
16
import org.slf4j.LoggerFactory;
Line 55... Line 55...
55
    @Autowired
55
    @Autowired
56
    private ObjectMapper objectMapper;
56
    private ObjectMapper objectMapper;
57
 
57
 
58
    @RequestMapping(value = "/manageHotDeals", method = RequestMethod.GET)
58
    @RequestMapping(value = "/manageHotDeals", method = RequestMethod.GET)
59
    public String manageHotDeals(HttpServletRequest request, Model model) throws Exception {
59
    public String manageHotDeals(HttpServletRequest request, Model model) throws Exception {
60
        model.addAttribute("brands", brandsService.getBrandsToDisplay(MOBILE_BRAND_CATEGORY_ID));
60
        model.addAttribute("brands", brandsService.getAllActiveBrands());
61
        model.addAttribute("maxDeals", ModelHotDealService.MAX_ACTIVE_DEALS_PER_BRAND);
61
        model.addAttribute("maxDeals", ModelHotDealService.MAX_ACTIVE_DEALS_PER_BRAND);
62
        return "hot-deals";
62
        return "hot-deals";
63
    }
63
    }
64
 
64
 
65
    /** All deals across brands: server-side searched + paginated table fragment. */
65
    /** All deals across brands: server-side searched + paginated table fragment. */