Rev 35536 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.service;import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;import com.spice.profitmandi.dao.entity.fofo.FofoStore;import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;import org.springframework.stereotype.Service;import java.util.List;import java.util.Map;@Servicepublic interface PartnerInvestmentService {boolean isInvestmentBelow(int fofoId, int percentage) throws ProfitMandiBusinessException;PartnerDailyInvestment getInvestment(int fofoId, int minusSalesDays) throws ProfitMandiBusinessException;boolean isInvestmentOk(int fofoId, int minPercentage, int maxPercentage) throws ProfitMandiBusinessException;/*** Batch method to get investments for all fofo stores at once.* This avoids N+1 queries when fetching investment data for multiple partners.* @param fofoStores List of FofoStore entities* @return Map of fofoId to PartnerDailyInvestment*/Map<Integer, PartnerDailyInvestment> getInvestmentsForFofoStores(List<FofoStore> fofoStores) throws ProfitMandiBusinessException;void evictInvestmentCache(int fofoId);}