Subversion Repositories SmartDukaan

Rev

Rev 35168 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
24336 amit.gupta 1
package com.spice.profitmandi.service;
2
 
3
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
35536 amit 4
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
24336 amit.gupta 5
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
35168 amit 6
import org.springframework.stereotype.Service;
24336 amit.gupta 7
 
35536 amit 8
import java.util.List;
9
import java.util.Map;
10
 
24336 amit.gupta 11
@Service
12
public interface PartnerInvestmentService {
13
	boolean isInvestmentBelow(int fofoId, int percentage) throws ProfitMandiBusinessException;
14
	PartnerDailyInvestment getInvestment(int fofoId, int minusSalesDays) throws ProfitMandiBusinessException;
15
	boolean isInvestmentOk(int fofoId, int minPercentage, int maxPercentage) throws ProfitMandiBusinessException;
35536 amit 16
 
17
	/**
18
	 * Batch method to get investments for all fofo stores at once.
19
	 * This avoids N+1 queries when fetching investment data for multiple partners.
20
	 * @param fofoStores List of FofoStore entities
21
	 * @return Map of fofoId to PartnerDailyInvestment
22
	 */
23
	Map<Integer, PartnerDailyInvestment> getInvestmentsForFofoStores(List<FofoStore> fofoStores) throws ProfitMandiBusinessException;
24336 amit.gupta 24
}