Subversion Repositories SmartDukaan

Rev

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

Rev 37244 Rev 37254
Line 10... Line 10...
10
 
10
 
11
    int MAX_ACTIVE_DEALS_PER_BRAND = 15;
11
    int MAX_ACTIVE_DEALS_PER_BRAND = 15;
12
 
12
 
13
    List<ModelHotDeal> getDealsForBrand(int brandId);
13
    List<ModelHotDeal> getDealsForBrand(int brandId);
14
 
14
 
-
 
15
    /** All deals across brands, newest window first, server-side searched + paginated. */
-
 
16
    List<ModelHotDeal> searchDeals(String query, int page, int pageSize);
-
 
17
 
-
 
18
    long countDeals(String query);
-
 
19
 
15
    long countActive(int brandId);
20
    long countActive(int brandId);
16
 
21
 
17
    void addDeal(int brandId, int catalogItemId, LocalDate startDate, LocalDate endDate,
22
    void addDeal(int brandId, int catalogItemId, LocalDate startDate, LocalDate endDate,
18
                 HotDealAttributes attributes, String user) throws ProfitMandiBusinessException;
23
                 HotDealAttributes attributes, String user) throws ProfitMandiBusinessException;
19
 
24
 
20
    void updateDeal(int id, LocalDate startDate, LocalDate endDate,
25
    void updateDeal(int id, LocalDate startDate, LocalDate endDate,
21
                    HotDealAttributes attributes, String user) throws ProfitMandiBusinessException;
26
                    HotDealAttributes attributes, String user) throws ProfitMandiBusinessException;
22
 
27
 
23
    void removeDeal(int id) throws ProfitMandiBusinessException;
28
    void removeDeal(int id) throws ProfitMandiBusinessException;
-
 
29
 
-
 
30
    /**
-
 
31
     * Reconcile catalog.tag_listing.hot_deals with the date-windowed model_hot_deal
-
 
32
     * source of truth (Solr's hot_deal_b reads that flag): models with an active deal
-
 
33
     * get flagged, everything else unflagged. Run daily so windows start/expire on time.
-
 
34
     */
-
 
35
    void syncHotDealFlags();
24
}
36
}