| 27877 |
amit.gupta |
1 |
package com.spice.profitmandi.service.offers;
|
|
|
2 |
|
| 30274 |
amit.gupta |
3 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
|
|
4 |
import com.spice.profitmandi.dao.entity.catalog.Offer;
|
| 31205 |
amit.gupta |
5 |
import com.spice.profitmandi.dao.entity.fofo.InventoryItem;
|
| 31903 |
amit.gupta |
6 |
import com.spice.profitmandi.dao.model.AmountModel;
|
| 30274 |
amit.gupta |
7 |
import com.spice.profitmandi.dao.model.CreateOfferRequest;
|
| 35394 |
amit |
8 |
import com.spice.profitmandi.dao.model.QtyAmountModel;
|
| 33999 |
tejus.loha |
9 |
import org.apache.commons.io.output.ByteArrayOutputStream;
|
| 30274 |
amit.gupta |
10 |
import org.springframework.stereotype.Service;
|
|
|
11 |
|
| 29684 |
amit.gupta |
12 |
import java.io.InputStream;
|
| 27877 |
amit.gupta |
13 |
import java.time.LocalDate;
|
|
|
14 |
import java.time.YearMonth;
|
|
|
15 |
import java.util.List;
|
| 29785 |
amit.gupta |
16 |
import java.util.Map;
|
| 36305 |
amit |
17 |
import java.util.LinkedHashMap;
|
| 27877 |
amit.gupta |
18 |
|
|
|
19 |
@Service
|
|
|
20 |
public interface OfferService {
|
| 36049 |
amit |
21 |
void evictOfferCaches(int offerId);
|
|
|
22 |
|
| 27877 |
amit.gupta |
23 |
void addOfferService(CreateOfferRequest createOfferRequest) throws ProfitMandiBusinessException;
|
|
|
24 |
|
| 33247 |
ranu |
25 |
List<CreateOfferRequest> getPublishedOffers(int fofoId, YearMonth yearMonth) throws ProfitMandiBusinessException;
|
| 27877 |
amit.gupta |
26 |
|
| 36049 |
amit |
27 |
List<CreateOfferRequest> getPublishedOffersCached(int fofoId, YearMonth yearMonth) throws ProfitMandiBusinessException;
|
|
|
28 |
|
| 33247 |
ranu |
29 |
Map<Integer, CreateOfferRequest> getAllOffers(YearMonth yearMonth) throws ProfitMandiBusinessException;
|
| 27877 |
amit.gupta |
30 |
|
| 36049 |
amit |
31 |
CreateOfferRequest getOfferDefinition(int offerId) throws ProfitMandiBusinessException;
|
|
|
32 |
|
| 33247 |
ranu |
33 |
CreateOfferRequest getOffer(int fofoId, int offerId) throws ProfitMandiBusinessException;
|
| 27877 |
amit.gupta |
34 |
|
| 33247 |
ranu |
35 |
List<CreateOfferRequest> getPublishedOffers(LocalDate date, int fofoId, int catalogId) throws ProfitMandiBusinessException;
|
| 29684 |
amit.gupta |
36 |
|
| 31903 |
amit.gupta |
37 |
Map<Integer, CreateOfferRequest> getPublishedOffers(LocalDate date, int fofoId, String brand);
|
| 29785 |
amit.gupta |
38 |
|
| 31903 |
amit.gupta |
39 |
void createOffers(InputStream inputStream) throws Exception;
|
| 29785 |
amit.gupta |
40 |
|
| 33247 |
ranu |
41 |
Map<Integer, Map<Integer, Long>> getSlabPayoutMap(CreateOfferRequest createOfferRequest) throws ProfitMandiBusinessException;
|
| 29902 |
amit.gupta |
42 |
|
| 31205 |
amit.gupta |
43 |
|
| 31903 |
amit.gupta |
44 |
Map<Integer, Map<Integer, AmountModel>> getSlabPayoutMapNew(CreateOfferRequest createOfferRequest);
|
|
|
45 |
|
| 33247 |
ranu |
46 |
CreateOfferRequest getCreateOfferRequest(Offer fromOffer) throws ProfitMandiBusinessException;
|
| 31903 |
amit.gupta |
47 |
|
| 33613 |
amit.gupta |
48 |
void reverseAdditionalSelloutSchemes(List<InventoryItem> inventoryItems, String reversalReason) throws ProfitMandiBusinessException;
|
| 31920 |
amit.gupta |
49 |
|
| 36103 |
amit |
50 |
void restoreAdditionalSelloutSchemes(List<InventoryItem> inventoryItems, String restoreReason) throws ProfitMandiBusinessException;
|
|
|
51 |
|
| 31920 |
amit.gupta |
52 |
void processSellin(CreateOfferRequest createOfferRequest) throws Exception;
|
| 35394 |
amit |
53 |
|
|
|
54 |
Map<Integer, QtyAmountModel> getCriteriaQtyAmounModelMap(CreateOfferRequest createOfferRequest, int fofoId) throws ProfitMandiBusinessException;
|
|
|
55 |
|
| 31920 |
amit.gupta |
56 |
void processActivationtOffer(CreateOfferRequest createOfferRequest) throws ProfitMandiBusinessException;
|
| 33030 |
amit.gupta |
57 |
|
| 36305 |
amit |
58 |
/**
|
|
|
59 |
* Read-only calculation of offer payouts per partner. Returns a list of payout data
|
|
|
60 |
* without persisting anything. Used by batch processing to separate read from write.
|
|
|
61 |
*/
|
|
|
62 |
List<OfferPartnerPayoutData> calculateOfferPayouts(CreateOfferRequest createOfferRequest) throws ProfitMandiBusinessException;
|
|
|
63 |
|
|
|
64 |
List<SellinPartnerPayoutData> calculateSellinPayouts(CreateOfferRequest createOfferRequest) throws Exception;
|
|
|
65 |
|
| 33247 |
ranu |
66 |
String getPartnerCriteriaString(PartnerCriteria partnerCriteria) throws ProfitMandiBusinessException;
|
| 33999 |
tejus.loha |
67 |
|
|
|
68 |
ByteArrayOutputStream createCSVOfferReport(CreateOfferRequest createOfferRequest) throws Exception;
|
| 35205 |
amit |
69 |
|
|
|
70 |
void sendWhatsapp(Offer offer, List<Integer> fofoIds, String imageUrl) throws Exception;
|
| 35856 |
amit |
71 |
|
|
|
72 |
void deleteOffer(int offerId) throws ProfitMandiBusinessException;
|
|
|
73 |
|
|
|
74 |
List<Offer> publishAllUnpublished(YearMonth yearMonth) throws ProfitMandiBusinessException;
|
| 35885 |
amit |
75 |
|
|
|
76 |
void removePartnersFromOffer(int offerId, List<Integer> fofoIds) throws ProfitMandiBusinessException;
|
|
|
77 |
|
|
|
78 |
void addPartnersToOffer(int offerId, List<Integer> fofoIds) throws ProfitMandiBusinessException;
|
|
|
79 |
|
|
|
80 |
int cloneOfferForPartners(int sourceOfferId, List<Integer> fofoIds, List<Integer> targets) throws ProfitMandiBusinessException;
|
|
|
81 |
|
|
|
82 |
void updateOfferTargets(int offerId, List<Integer> newTargets) throws ProfitMandiBusinessException;
|
| 35924 |
amit |
83 |
|
|
|
84 |
void updateOfferSlabs(com.spice.profitmandi.dao.model.UpdateOfferSlabsRequest request) throws ProfitMandiBusinessException;
|
| 27877 |
amit.gupta |
85 |
}
|