| 37211 |
amit |
1 |
package com.spice.profitmandi.service.catalog;
|
|
|
2 |
|
|
|
3 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
|
|
4 |
import com.spice.profitmandi.dao.entity.catalog.ModelHotDeal;
|
|
|
5 |
|
|
|
6 |
import java.util.List;
|
|
|
7 |
|
| 37640 |
amit |
8 |
/**
|
|
|
9 |
* Hot deal ATTRIBUTES.
|
|
|
10 |
*
|
|
|
11 |
* <p>Membership is not managed here any more - a SKU is a hot deal because its brand is
|
|
|
12 |
* {@code ProfitMandiConstants.HOT_DEAL_BRAND}. There is consequently no date window, no
|
|
|
13 |
* "active" notion, and no per-brand cap: the old {@code MAX_ACTIVE_DEALS_PER_BRAND = 15}
|
|
|
14 |
* capped deals per OEM, which is meaningless once every hot deal shares one brand.
|
|
|
15 |
*
|
|
|
16 |
* <p>What remains is the five per-SKU pill attributes the partner app renders.
|
|
|
17 |
*/
|
| 37211 |
amit |
18 |
public interface ModelHotDealService {
|
|
|
19 |
|
| 37640 |
amit |
20 |
/** Attributes for one Hot Deal SKU, or null when ops has not filled them in yet. */
|
|
|
21 |
ModelHotDeal getAttributes(int catalogItemId);
|
| 37211 |
amit |
22 |
|
| 37640 |
amit |
23 |
/** All attribute rows, newest first, server-side searched and paginated. */
|
|
|
24 |
List<ModelHotDeal> listAll(String query, int page, int pageSize);
|
| 37211 |
amit |
25 |
|
| 37254 |
amit |
26 |
long countDeals(String query);
|
|
|
27 |
|
|
|
28 |
/**
|
| 37640 |
amit |
29 |
* Create or update the five pill attributes for a Hot Deal-brand catalog.
|
|
|
30 |
* Rejects any catalog that does not carry the brand.
|
|
|
31 |
*
|
|
|
32 |
* @param oemCatalogId optional channel-side counterpart under the model's OEM brand;
|
|
|
33 |
* null clears any existing mapping. Validated to exist and to
|
|
|
34 |
* actually belong to that OEM brand.
|
| 37254 |
amit |
35 |
*/
|
| 37640 |
amit |
36 |
void saveAttributes(int catalogItemId, HotDealAttributes attributes, Integer oemCatalogId, String user)
|
|
|
37 |
throws ProfitMandiBusinessException;
|
|
|
38 |
|
|
|
39 |
/** Drop the attributes row. The SKU stays a hot deal - only its pills disappear. */
|
|
|
40 |
void removeAttributes(int id) throws ProfitMandiBusinessException;
|
| 37211 |
amit |
41 |
}
|