Subversion Repositories SmartDukaan

Rev

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

Rev 22925 Rev 23110
Line 1... Line 1...
1
package com.spice.profitmandi.service.wallet;
1
package com.spice.profitmandi.service.wallet;
2
 
2
 
3
import java.time.LocalDateTime;
3
import java.time.LocalDateTime;
-
 
4
import java.util.HashMap;
4
import java.util.List;
5
import java.util.List;
-
 
6
import java.util.Map;
-
 
7
import java.util.Set;
5
 
8
 
6
import org.slf4j.Logger;
9
import org.slf4j.Logger;
7
import org.slf4j.LoggerFactory;
10
import org.slf4j.LoggerFactory;
8
import org.springframework.beans.factory.annotation.Autowired;
11
import org.springframework.beans.factory.annotation.Autowired;
9
import org.springframework.stereotype.Component;
12
import org.springframework.stereotype.Component;
Line 98... Line 101...
98
			LocalDateTime startDateTime, LocalDateTime endDateTime, int offset, int limit)
101
			LocalDateTime startDateTime, LocalDateTime endDateTime, int offset, int limit)
99
			throws ProfitMandiBusinessException {
102
			throws ProfitMandiBusinessException {
100
		UserWallet userWallet = userWalletRepository.selectByRetailerId(retailerId);
103
		UserWallet userWallet = userWalletRepository.selectByRetailerId(retailerId);
101
		return userWalletHistoryRepository.selectPaginatedByWalletId(userWallet.getId(), startDateTime, endDateTime, offset, limit);
104
		return userWalletHistoryRepository.selectPaginatedByWalletId(userWallet.getId(), startDateTime, endDateTime, offset, limit);
102
	}
105
	}
-
 
106
	
-
 
107
	@Override
-
 
108
	public Map<Integer, UserWallet> getRetailerIdUserWalletMap(Set<Integer> retailerIds) {
-
 
109
		List<UserWallet> userWallets = userWalletRepository.selectByRetailerIds(retailerIds);
-
 
110
		Map<Integer, UserWallet> retailerIdUserWalletMap = new HashMap<>();
-
 
111
		for(UserWallet userWallet : userWallets){
-
 
112
			retailerIdUserWalletMap.put(userWallet.getUserId(), userWallet);
-
 
113
		}
-
 
114
		return retailerIdUserWalletMap;
-
 
115
	}
103
 
116
 
104
}
117
}