Subversion Repositories SmartDukaan

Rev

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

Rev 35168 Rev 35536
Line 1... Line 1...
1
package com.spice.profitmandi.service;
1
package com.spice.profitmandi.service;
2
 
2
 
3
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
3
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
-
 
4
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
4
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
5
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
5
import org.springframework.stereotype.Service;
6
import org.springframework.stereotype.Service;
6
 
7
 
-
 
8
import java.util.List;
-
 
9
import java.util.Map;
-
 
10
 
7
@Service
11
@Service
8
public interface PartnerInvestmentService {
12
public interface PartnerInvestmentService {
9
	boolean isInvestmentBelow(int fofoId, int percentage) throws ProfitMandiBusinessException;
13
	boolean isInvestmentBelow(int fofoId, int percentage) throws ProfitMandiBusinessException;
10
	PartnerDailyInvestment getInvestment(int fofoId, int minusSalesDays) throws ProfitMandiBusinessException;
14
	PartnerDailyInvestment getInvestment(int fofoId, int minusSalesDays) throws ProfitMandiBusinessException;
11
	boolean isInvestmentOk(int fofoId, int minPercentage, int maxPercentage) throws ProfitMandiBusinessException;
15
	boolean isInvestmentOk(int fofoId, int minPercentage, int maxPercentage) throws ProfitMandiBusinessException;
-
 
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;
12
}
24
}