Subversion Repositories SmartDukaan

Rev

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

Rev 25139 Rev 33247
Line 1... Line 1...
1
package com.spice.profitmandi.service.user;
1
package com.spice.profitmandi.service.user;
2
 
2
 
3
import java.time.LocalDateTime;
-
 
4
import java.util.HashMap;
-
 
5
import java.util.HashSet;
-
 
6
import java.util.List;
-
 
7
import java.util.Map;
-
 
8
 
-
 
9
import org.hibernate.Criteria;
-
 
10
import org.hibernate.Session;
-
 
11
import org.hibernate.SessionFactory;
-
 
12
import org.hibernate.criterion.Restrictions;
-
 
13
import org.springframework.beans.factory.annotation.Autowired;
-
 
14
import org.springframework.beans.factory.annotation.Qualifier;
-
 
15
import org.springframework.stereotype.Component;
-
 
16
 
-
 
17
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
3
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
18
import com.spice.profitmandi.common.model.ProfitMandiConstants;
4
import com.spice.profitmandi.common.model.ProfitMandiConstants;
19
import com.spice.profitmandi.common.util.DesEncrypter;
5
import com.spice.profitmandi.common.util.DesEncrypter;
20
import com.spice.profitmandi.dao.entity.dtr.ActivationCode;
-
 
21
import com.spice.profitmandi.dao.entity.dtr.Retailer;
-
 
22
import com.spice.profitmandi.dao.entity.dtr.Role;
-
 
23
import com.spice.profitmandi.dao.entity.dtr.User;
6
import com.spice.profitmandi.dao.entity.dtr.*;
24
import com.spice.profitmandi.dao.entity.dtr.UserAccount;
-
 
25
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
7
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
26
import com.spice.profitmandi.dao.enumuration.dtr.AccountType;
8
import com.spice.profitmandi.dao.enumuration.dtr.AccountType;
27
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
9
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
28
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
-
 
29
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
-
 
30
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
10
import com.spice.profitmandi.dao.repository.dtr.*;
31
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
-
 
32
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
-
 
33
import com.spice.profitmandi.dao.repository.dtr.UserRoleRepository;
-
 
34
import com.spice.profitmandi.thrift.clients.TransactionClient;
11
import com.spice.profitmandi.thrift.clients.TransactionClient;
35
 
-
 
36
import in.shop2020.model.v1.order.TransactionService;
12
import in.shop2020.model.v1.order.TransactionService;
-
 
13
import org.hibernate.Criteria;
-
 
14
import org.hibernate.Session;
-
 
15
import org.hibernate.SessionFactory;
-
 
16
import org.hibernate.criterion.Restrictions;
-
 
17
import org.springframework.beans.factory.annotation.Autowired;
-
 
18
import org.springframework.beans.factory.annotation.Qualifier;
-
 
19
import org.springframework.stereotype.Component;
-
 
20
 
-
 
21
import java.time.LocalDateTime;
-
 
22
import java.util.HashMap;
-
 
23
import java.util.HashSet;
-
 
24
import java.util.List;
-
 
25
import java.util.Map;
37
 
26
 
38
@Component
27
@Component
39
public class UserServiceImpl implements UserService {
28
public class UserServiceImpl implements UserService {
40
 
29
 
41
	@Autowired
30
	@Autowired
Line 126... Line 115...
126
		return map;
115
		return map;
127
	}
116
	}
128
 
117
 
129
 
118
 
130
	@Override
119
	@Override
131
	public Map<Integer, String> getAllUseUserIdEmailIdMap(List<Integer> userIds) {
120
	public Map<Integer, String> getAllUseUserIdEmailIdMap(List<Integer> userIds) throws ProfitMandiBusinessException {
132
		 Map<Integer, String> userIdEmailIdMap=new HashMap<>();
121
		 Map<Integer, String> userIdEmailIdMap=new HashMap<>();
133
		 List<User> users=userRepository.selectAllByIds(new HashSet<>(userIds));
122
		 List<User> users=userRepository.selectAllByIds(new HashSet<>(userIds));
134
		 for(User user:users)
123
		 for(User user:users)
135
		 {
124
		 {
136
			 userIdEmailIdMap.put(user.getId(),user.getEmailId());
125
			 userIdEmailIdMap.put(user.getId(),user.getEmailId());