| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.web.controller;
|
1 |
package com.spice.profitmandi.web.controller;
|
| 2 |
|
2 |
|
| 3 |
import java.io.IOException;
|
3 |
import java.io.IOException;
|
| 4 |
import java.time.LocalDateTime;
|
4 |
import java.time.LocalDateTime;
|
| 5 |
import java.util.ArrayList;
|
5 |
import java.util.ArrayList;
|
| - |
|
6 |
import java.util.Arrays;
|
| 6 |
import java.util.Base64;
|
7 |
import java.util.Base64;
|
| 7 |
import java.util.HashMap;
|
8 |
import java.util.HashMap;
|
| 8 |
import java.util.HashSet;
|
9 |
import java.util.HashSet;
|
| 9 |
import java.util.List;
|
10 |
import java.util.List;
|
| 10 |
import java.util.Map;
|
11 |
import java.util.Map;
|
| Line 16... |
Line 17... |
| 16 |
import org.apache.http.conn.HttpHostConnectException;
|
17 |
import org.apache.http.conn.HttpHostConnectException;
|
| 17 |
import org.apache.logging.log4j.LogManager;
|
18 |
import org.apache.logging.log4j.LogManager;
|
| 18 |
import org.apache.logging.log4j.Logger;
|
19 |
import org.apache.logging.log4j.Logger;
|
| 19 |
import org.springframework.beans.factory.annotation.Autowired;
|
20 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 20 |
import org.springframework.beans.factory.annotation.Value;
|
21 |
import org.springframework.beans.factory.annotation.Value;
|
| - |
|
22 |
import org.springframework.http.MediaType;
|
| 21 |
import org.springframework.http.ResponseEntity;
|
23 |
import org.springframework.http.ResponseEntity;
|
| 22 |
import org.springframework.stereotype.Controller;
|
24 |
import org.springframework.stereotype.Controller;
|
| 23 |
import org.springframework.transaction.annotation.Transactional;
|
25 |
import org.springframework.transaction.annotation.Transactional;
|
| 24 |
import org.springframework.web.bind.annotation.RequestBody;
|
26 |
import org.springframework.web.bind.annotation.RequestBody;
|
| 25 |
import org.springframework.web.bind.annotation.RequestMapping;
|
27 |
import org.springframework.web.bind.annotation.RequestMapping;
|
| Line 32... |
Line 34... |
| 32 |
import com.eclipsesource.json.JsonValue;
|
34 |
import com.eclipsesource.json.JsonValue;
|
| 33 |
import com.google.gson.Gson;
|
35 |
import com.google.gson.Gson;
|
| 34 |
import com.spice.profitmandi.common.ResponseCodeHolder;
|
36 |
import com.spice.profitmandi.common.ResponseCodeHolder;
|
| 35 |
import com.spice.profitmandi.common.enumuration.SchemeType;
|
37 |
import com.spice.profitmandi.common.enumuration.SchemeType;
|
| 36 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
38 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| - |
|
39 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
| 37 |
import com.spice.profitmandi.common.model.GoogleLoginRequest;
|
40 |
import com.spice.profitmandi.common.model.GoogleLoginRequest;
|
| 38 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
41 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 39 |
import com.spice.profitmandi.common.model.RegisteredUserInfo;
|
42 |
import com.spice.profitmandi.common.model.RegisteredUserInfo;
|
| 40 |
import com.spice.profitmandi.common.model.UserInfo;
|
43 |
import com.spice.profitmandi.common.model.UserInfo;
|
| 41 |
import com.spice.profitmandi.common.util.JWTUtil;
|
44 |
import com.spice.profitmandi.common.util.JWTUtil;
|
| 42 |
import com.spice.profitmandi.common.web.client.RestClient;
|
45 |
import com.spice.profitmandi.common.web.client.RestClient;
|
| 43 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
46 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
| - |
|
47 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
| 44 |
import com.spice.profitmandi.dao.entity.dtr.Retailer;
|
48 |
import com.spice.profitmandi.dao.entity.dtr.Retailer;
|
| 45 |
import com.spice.profitmandi.dao.entity.dtr.Role;
|
49 |
import com.spice.profitmandi.dao.entity.dtr.Role;
|
| 46 |
import com.spice.profitmandi.dao.entity.dtr.User;
|
50 |
import com.spice.profitmandi.dao.entity.dtr.User;
|
| - |
|
51 |
import com.spice.profitmandi.dao.entity.dtr.UserAccount;
|
| 47 |
import com.spice.profitmandi.dao.entity.dtr.UserRole;
|
52 |
import com.spice.profitmandi.dao.entity.dtr.UserRole;
|
| 48 |
import com.spice.profitmandi.dao.entity.user.Address;
|
53 |
import com.spice.profitmandi.dao.entity.user.Address;
|
| 49 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
54 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
| 50 |
import com.spice.profitmandi.dao.model.UserCart;
|
55 |
import com.spice.profitmandi.dao.model.UserCart;
|
| - |
|
56 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
| 51 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
|
57 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
|
| 52 |
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
|
58 |
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
|
| 53 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
59 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
| 54 |
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
|
60 |
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
|
| 55 |
import com.spice.profitmandi.dao.repository.dtr.UserRoleRepository;
|
61 |
import com.spice.profitmandi.dao.repository.dtr.UserRoleRepository;
|
| 56 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
62 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
| 57 |
import com.spice.profitmandi.service.AuthService;
|
63 |
import com.spice.profitmandi.service.AuthService;
|
| 58 |
import com.spice.profitmandi.service.authentication.RoleManager;
|
64 |
import com.spice.profitmandi.service.authentication.RoleManager;
|
| - |
|
65 |
import com.spice.profitmandi.service.user.RetailerService;
|
| 59 |
import com.spice.profitmandi.service.user.UserService;
|
66 |
import com.spice.profitmandi.service.user.UserService;
|
| 60 |
import com.spice.profitmandi.web.enumuration.UserStatus;
|
67 |
import com.spice.profitmandi.web.enumuration.UserStatus;
|
| 61 |
import com.spice.profitmandi.web.processor.GoogleLoginProcessor;
|
68 |
import com.spice.profitmandi.web.processor.GoogleLoginProcessor;
|
| 62 |
import com.spice.profitmandi.web.req.UserRequest;
|
69 |
import com.spice.profitmandi.web.req.UserRequest;
|
| 63 |
import com.spice.profitmandi.web.res.Notification;
|
70 |
import com.spice.profitmandi.web.res.Notification;
|
| - |
|
71 |
import com.spice.profitmandi.web.res.Partner;
|
| 64 |
|
72 |
|
| 65 |
import io.swagger.annotations.ApiImplicitParam;
|
73 |
import io.swagger.annotations.ApiImplicitParam;
|
| 66 |
import io.swagger.annotations.ApiImplicitParams;
|
74 |
import io.swagger.annotations.ApiImplicitParams;
|
| 67 |
|
75 |
|
| 68 |
/**
|
76 |
/**
|
| 69 |
* @author ashikali
|
77 |
* @author ashikali
|
| 70 |
*
|
78 |
*
|
| 71 |
*/
|
79 |
*/
|
| 72 |
@Controller
|
80 |
@Controller
|
| 73 |
@Transactional(rollbackFor=Throwable.class)
|
81 |
@Transactional(rollbackFor = Throwable.class)
|
| 74 |
public class UserController {
|
82 |
public class UserController {
|
| 75 |
|
83 |
|
| 76 |
@Autowired
|
84 |
@Autowired
|
| 77 |
private ResponseSender<?> responseSender;
|
85 |
private ResponseSender<?> responseSender;
|
| 78 |
|
86 |
|
| 79 |
private static final Logger LOGGER = LogManager.getLogger(UserController.class);
|
87 |
private static final Logger LOGGER = LogManager.getLogger(UserController.class);
|
| 80 |
|
88 |
|
| 81 |
@Value("${notifications.api.host}")
|
89 |
@Value("${notifications.api.host}")
|
| 82 |
private String nodeHost;
|
90 |
private String nodeHost;
|
| 83 |
|
91 |
|
| 84 |
@Value("${notifications.api.port}")
|
92 |
@Value("${notifications.api.port}")
|
| 85 |
private int nodePort;
|
93 |
private int nodePort;
|
| 86 |
|
94 |
|
| 87 |
@Value("${admin.token}")
|
95 |
@Value("${admin.token}")
|
| 88 |
private String validAdminToken;
|
96 |
private String validAdminToken;
|
| 89 |
|
97 |
|
| 90 |
@Autowired
|
98 |
@Autowired
|
| 91 |
private UserRepository userRepository;
|
99 |
private UserRepository userRepository;
|
| 92 |
|
100 |
|
| 93 |
@Autowired
|
101 |
@Autowired
|
| 94 |
private com.spice.profitmandi.dao.repository.user.UserRepository userUserRepository;
|
102 |
private com.spice.profitmandi.dao.repository.user.UserRepository userUserRepository;
|
| 95 |
|
103 |
|
| 96 |
@Autowired
|
104 |
@Autowired
|
| 97 |
private RetailerRepository retailerRepository;
|
105 |
private RetailerRepository retailerRepository;
|
| Line 99... |
Line 107... |
| 99 |
@Autowired
|
107 |
@Autowired
|
| 100 |
private UserRoleRepository userRoleRepository;
|
108 |
private UserRoleRepository userRoleRepository;
|
| 101 |
|
109 |
|
| 102 |
@Autowired
|
110 |
@Autowired
|
| 103 |
private UserAccountRepository userAccountRepository;
|
111 |
private UserAccountRepository userAccountRepository;
|
| 104 |
|
112 |
|
| 105 |
@Autowired
|
113 |
@Autowired
|
| 106 |
private AuthService authService;
|
114 |
private AuthService authService;
|
| 107 |
|
115 |
|
| 108 |
@Autowired
|
116 |
@Autowired
|
| 109 |
private AddressRepository addressRepository;
|
117 |
private AddressRepository addressRepository;
|
| 110 |
|
118 |
|
| 111 |
@Autowired
|
119 |
@Autowired
|
| 112 |
private GoogleLoginProcessor googleLoginProcessor;
|
120 |
private GoogleLoginProcessor googleLoginProcessor;
|
| 113 |
|
121 |
|
| 114 |
@Autowired
|
122 |
@Autowired
|
| 115 |
private UserService userService;
|
123 |
private UserService userService;
|
| 116 |
|
124 |
|
| 117 |
@Autowired
|
125 |
@Autowired
|
| 118 |
private RestClient restClient;
|
126 |
private RestClient restClient;
|
| 119 |
|
127 |
|
| 120 |
@Autowired
|
128 |
@Autowired
|
| 121 |
private RoleManager roleManager;
|
129 |
private RoleManager roleManager;
|
| 122 |
|
130 |
|
| 123 |
@Autowired
|
131 |
@Autowired
|
| 124 |
private RoleRepository roleRepository;
|
132 |
private RoleRepository roleRepository;
|
| 125 |
|
133 |
|
| - |
|
134 |
@Autowired
|
| - |
|
135 |
private AuthRepository authRepository;
|
| - |
|
136 |
|
| - |
|
137 |
@Autowired
|
| - |
|
138 |
private RetailerService retailerService;
|
| - |
|
139 |
|
| 126 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_GOOGLE_LOGIN, method = RequestMethod.POST)
|
140 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_GOOGLE_LOGIN, method = RequestMethod.POST)
|
| 127 |
public ResponseEntity<?> googleLogin(HttpServletRequest request, @RequestBody GoogleLoginRequest googleLoginRequest) throws ProfitMandiBusinessException{
|
141 |
public ResponseEntity<?> googleLogin(HttpServletRequest request, @RequestBody GoogleLoginRequest googleLoginRequest)
|
| - |
|
142 |
throws ProfitMandiBusinessException {
|
| 128 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
143 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 129 |
Map<String, Object> resultMap = googleLoginProcessor.process(googleLoginRequest);
|
144 |
Map<String, Object> resultMap = googleLoginProcessor.process(googleLoginRequest);
|
| 130 |
LOGGER.info("Response sent is {}", resultMap);
|
145 |
LOGGER.info("Response sent is {}", resultMap);
|
| 131 |
return responseSender.ok(googleLoginProcessor.process(googleLoginRequest));
|
146 |
return responseSender.ok(googleLoginProcessor.process(googleLoginRequest));
|
| 132 |
}
|
147 |
}
|
| 133 |
|
148 |
|
| 134 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_TOKEN_IS_EXPIRED, method = RequestMethod.GET)
|
149 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_TOKEN_IS_EXPIRED, method = RequestMethod.GET)
|
| 135 |
public ResponseEntity<?> tokenIsExpired(HttpServletRequest request, @RequestParam(name = "token") String token) throws ProfitMandiBusinessException{
|
150 |
public ResponseEntity<?> tokenIsExpired(HttpServletRequest request, @RequestParam(name = "token") String token)
|
| - |
|
151 |
throws ProfitMandiBusinessException {
|
| 136 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
152 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 137 |
return responseSender.ok(JWTUtil.isExpired(token));
|
153 |
return responseSender.ok(JWTUtil.isExpired(token));
|
| 138 |
}
|
154 |
}
|
| 139 |
|
155 |
|
| 140 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_DETAIL_BY_TOKEN, method = RequestMethod.GET)
|
156 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_DETAIL_BY_TOKEN, method = RequestMethod.GET)
|
| Line 144... |
Line 160... |
| 144 |
Map<String, Object> responseMap = new HashMap<>();
|
160 |
Map<String, Object> responseMap = new HashMap<>();
|
| 145 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|
161 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|
| 146 |
User user = null;
|
162 |
User user = null;
|
| 147 |
if (userInfo.getUserId() > -1) {
|
163 |
if (userInfo.getUserId() > -1) {
|
| 148 |
user = userRepository.selectById(userInfo.getUserId());
|
164 |
user = userRepository.selectById(userInfo.getUserId());
|
| 149 |
if(!(userInfo.getEmail()==null || user.getEmailId().equalsIgnoreCase(userInfo.getEmail()))) {
|
165 |
if (!(userInfo.getEmail() == null || user.getEmailId().equalsIgnoreCase(userInfo.getEmail()))) {
|
| 150 |
String userName = null;
|
166 |
String userName = null;
|
| 151 |
if(user.getSecondryEmailId()!=null && user.getSecondryEmailId().equals(userInfo.getEmail())) {
|
167 |
if (user.getSecondryEmailId() != null && user.getSecondryEmailId().equals(userInfo.getEmail())) {
|
| 152 |
userName = user.getFirstName() + " " + user.getLastName();
|
168 |
userName = user.getFirstName() + " " + user.getLastName();
|
| 153 |
} else {
|
169 |
} else {
|
| 154 |
userName = authService.getNameByEmailId(userInfo.getEmail());
|
170 |
userName = authService.getNameByEmailId(userInfo.getEmail());
|
| 155 |
}
|
171 |
}
|
| 156 |
responseMap.put(ProfitMandiConstants.USER_ID, userInfo.getUserId());
|
172 |
responseMap.put(ProfitMandiConstants.USER_ID, userInfo.getUserId());
|
| Line 162... |
Line 178... |
| 162 |
} else {
|
178 |
} else {
|
| 163 |
try {
|
179 |
try {
|
| 164 |
user = userRepository.selectByEmailId(userInfo.getEmail());
|
180 |
user = userRepository.selectByEmailId(userInfo.getEmail());
|
| 165 |
} catch (ProfitMandiBusinessException e1) {
|
181 |
} catch (ProfitMandiBusinessException e1) {
|
| 166 |
}
|
182 |
}
|
| 167 |
if(user == null){
|
183 |
if (user == null) {
|
| 168 |
try {
|
184 |
try {
|
| 169 |
user = userRepository.selectBySecondryEmailId(userInfo.getEmail());
|
185 |
user = userRepository.selectBySecondryEmailId(userInfo.getEmail());
|
| 170 |
} catch (ProfitMandiBusinessException e1) {
|
186 |
} catch (ProfitMandiBusinessException e1) {
|
| 171 |
LOGGER.info("Uneregistered user", userInfo.getEmail());
|
187 |
LOGGER.info("Uneregistered user", userInfo.getEmail());
|
| 172 |
}
|
188 |
}
|
| Line 176... |
Line 192... |
| 176 |
int retailerId = userAccountRepository.selectRetailerIdByUserId(user.getId());
|
192 |
int retailerId = userAccountRepository.selectRetailerIdByUserId(user.getId());
|
| 177 |
responseMap.put(ProfitMandiConstants.EMAIL_ID, user.getEmailId());
|
193 |
responseMap.put(ProfitMandiConstants.EMAIL_ID, user.getEmailId());
|
| 178 |
responseMap.put(ProfitMandiConstants.USER_ID, user.getId());
|
194 |
responseMap.put(ProfitMandiConstants.USER_ID, user.getId());
|
| 179 |
responseMap.put(ProfitMandiConstants.USER_NAME, user.getFirstName() + " " + user.getLastName());
|
195 |
responseMap.put(ProfitMandiConstants.USER_NAME, user.getFirstName() + " " + user.getLastName());
|
| 180 |
List<Integer> roleIds = userRoleRepository.selectRoleIdsByUserId(user.getId());
|
196 |
List<Integer> roleIds = userRoleRepository.selectRoleIdsByUserId(user.getId());
|
| 181 |
//LOGGER.info("userRoles {} ", userRoles);
|
197 |
// LOGGER.info("userRoles {} ", userRoles);
|
| 182 |
|
198 |
|
| 183 |
// generate new token if roles have been updated
|
199 |
// generate new token if roles have been updated
|
| 184 |
if (userInfo.getRoleIds() == null || roleIds.size() != userInfo.getRoleIds().size()) {
|
200 |
if (userInfo.getRoleIds() == null || roleIds.size() != userInfo.getRoleIds().size()) {
|
| 185 |
String[] roleIdStrings = new String[roleIds.size()];
|
201 |
String[] roleIdStrings = new String[roleIds.size()];
|
| 186 |
int index = 0;
|
202 |
int index = 0;
|
| Line 194... |
Line 210... |
| 194 |
Set<Integer> roleIdsSet = new HashSet<Integer>(roleIds);
|
210 |
Set<Integer> roleIdsSet = new HashSet<Integer>(roleIds);
|
| 195 |
if (roleManager.isRetailer(roleIdsSet)) {
|
211 |
if (roleManager.isRetailer(roleIdsSet)) {
|
| 196 |
UserCart uc = userAccountRepository.getUserCart(userInfo.getUserId());
|
212 |
UserCart uc = userAccountRepository.getUserCart(userInfo.getUserId());
|
| 197 |
Retailer retailer = retailerRepository.selectById(uc.getUserId());
|
213 |
Retailer retailer = retailerRepository.selectById(uc.getUserId());
|
| 198 |
com.spice.profitmandi.dao.entity.user.User saholicUser = userUserRepository.selectById(uc.getUserId());
|
214 |
com.spice.profitmandi.dao.entity.user.User saholicUser = userUserRepository.selectById(uc.getUserId());
|
| 199 |
if(saholicUser.getAddressId() != null){
|
215 |
if (saholicUser.getAddressId() != null) {
|
| 200 |
Address address = addressRepository.selectById(saholicUser.getAddressId());
|
216 |
Address address = addressRepository.selectById(saholicUser.getAddressId());
|
| 201 |
responseMap.put(ProfitMandiConstants.ADDRESS, address);
|
217 |
responseMap.put(ProfitMandiConstants.ADDRESS, address);
|
| 202 |
}
|
218 |
}
|
| 203 |
// if retailer is activated 1 then verified retailer
|
219 |
// if retailer is activated 1 then verified retailer
|
| 204 |
// else if migrated is 1 then old retailer
|
220 |
// else if migrated is 1 then old retailer
|
| 205 |
// also lets incoporte old process i.e is user is activated then also retailer is verified retailer
|
221 |
// also lets incoporte old process i.e is user is activated then also retailer
|
| - |
|
222 |
// is verified retailer
|
| 206 |
// else retailer is not verifed
|
223 |
// else retailer is not verifed
|
| 207 |
if (retailer.isActive() || user.isActivated()) {
|
224 |
if (retailer.isActive() || user.isActivated()) {
|
| 208 |
if (roleManager.isPartner(roleIdsSet)) {
|
225 |
if (roleManager.isPartner(roleIdsSet)) {
|
| 209 |
responseMap.put(ProfitMandiConstants.USER_STATUS, UserStatus.FOFO.getValue());
|
226 |
responseMap.put(ProfitMandiConstants.USER_STATUS, UserStatus.FOFO.getValue());
|
| 210 |
} else {
|
227 |
} else {
|
| Line 224... |
Line 241... |
| 224 |
responseMap.put(ProfitMandiConstants.EMAIL_ID, userInfo.getEmail());
|
241 |
responseMap.put(ProfitMandiConstants.EMAIL_ID, userInfo.getEmail());
|
| 225 |
}
|
242 |
}
|
| 226 |
|
243 |
|
| 227 |
return responseSender.ok(responseMap);
|
244 |
return responseSender.ok(responseMap);
|
| 228 |
}
|
245 |
}
|
| 229 |
|
246 |
|
| 230 |
private RegisteredUserInfo getRegisteredUserInfo(User user) throws Throwable {
|
247 |
private RegisteredUserInfo getRegisteredUserInfo(User user) throws Throwable {
|
| 231 |
RegisteredUserInfo ri = new RegisteredUserInfo();
|
248 |
RegisteredUserInfo ri = new RegisteredUserInfo();
|
| 232 |
ri.setCity(user.getCity());
|
249 |
ri.setCity(user.getCity());
|
| 233 |
ri.setFirstName(user.getFirstName());
|
250 |
ri.setFirstName(user.getFirstName());
|
| 234 |
ri.setLastName(user.getLastName());
|
251 |
ri.setLastName(user.getLastName());
|
| Line 266... |
Line 283... |
| 266 |
UserRole userRole = new UserRole();
|
283 |
UserRole userRole = new UserRole();
|
| 267 |
userRole.setRoleId(role.getId());
|
284 |
userRole.setRoleId(role.getId());
|
| 268 |
userRole.setUserId(user.getId());
|
285 |
userRole.setUserId(user.getId());
|
| 269 |
userRoleRepository.persist(userRole);
|
286 |
userRoleRepository.persist(userRole);
|
| 270 |
return responseSender.ok(ResponseCodeHolder.getMessage("USR_OK_1000"));
|
287 |
return responseSender.ok(ResponseCodeHolder.getMessage("USR_OK_1000"));
|
| 271 |
|
- |
|
| 272 |
}
|
- |
|
| 273 |
|
288 |
|
| - |
|
289 |
}
|
| 274 |
|
290 |
|
| 275 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_ID, method = RequestMethod.GET)
|
291 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_ID, method = RequestMethod.GET)
|
| 276 |
public ResponseEntity<?> getById(HttpServletRequest request, @RequestParam(name = "id") int id) throws ProfitMandiBusinessException{
|
292 |
public ResponseEntity<?> getById(HttpServletRequest request, @RequestParam(name = "id") int id)
|
| - |
|
293 |
throws ProfitMandiBusinessException {
|
| 277 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
294 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 278 |
return responseSender.ok(userRepository.selectById(id));
|
295 |
return responseSender.ok(userRepository.selectById(id));
|
| 279 |
}
|
296 |
}
|
| 280 |
|
297 |
|
| 281 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_MOBILE_NUMBER, method = RequestMethod.GET)
|
298 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_MOBILE_NUMBER, method = RequestMethod.GET)
|
| 282 |
public ResponseEntity<?> getByMobileNumber(HttpServletRequest request,
|
299 |
public ResponseEntity<?> getByMobileNumber(HttpServletRequest request,
|
| 283 |
@RequestParam(name = "mobileNumber") String mobileNumber) throws ProfitMandiBusinessException{
|
300 |
@RequestParam(name = "mobileNumber") String mobileNumber) throws ProfitMandiBusinessException {
|
| 284 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
301 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 285 |
return responseSender.ok(userRepository.selectByMobileNumber(mobileNumber));
|
302 |
return responseSender.ok(userRepository.selectByMobileNumber(mobileNumber));
|
| 286 |
}
|
303 |
}
|
| 287 |
|
- |
|
| 288 |
|
- |
|
| 289 |
|
304 |
|
| 290 |
@ApiImplicitParams({
|
305 |
@ApiImplicitParams({
|
| 291 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
306 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
| 292 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_ACTIVATE, method = RequestMethod.POST)
|
307 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_ACTIVATE, method = RequestMethod.POST)
|
| 293 |
public ResponseEntity<?> activateUser(HttpServletRequest request,
|
308 |
public ResponseEntity<?> activateUser(HttpServletRequest request,
|
| Line 300... |
Line 315... |
| 300 |
@ApiImplicitParams({
|
315 |
@ApiImplicitParams({
|
| 301 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
316 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
| 302 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_NOTIFICATIONS, method = RequestMethod.GET)
|
317 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_NOTIFICATIONS, method = RequestMethod.GET)
|
| 303 |
public ResponseEntity<?> getNofitications(HttpServletRequest request,
|
318 |
public ResponseEntity<?> getNofitications(HttpServletRequest request,
|
| 304 |
@RequestParam(name = "androidId") String androidId, @RequestParam(name = "pageNumber") int pageNumber,
|
319 |
@RequestParam(name = "androidId") String androidId, @RequestParam(name = "pageNumber") int pageNumber,
|
| 305 |
@RequestParam(name = "pageSize") int pageSize) throws ProfitMandiBusinessException{
|
320 |
@RequestParam(name = "pageSize") int pageSize) throws ProfitMandiBusinessException {
|
| 306 |
int userId = (int) request.getAttribute("userId");
|
321 |
int userId = (int) request.getAttribute("userId");
|
| 307 |
String restResponse = null;
|
322 |
String restResponse = null;
|
| 308 |
Map<String, String> params = new HashMap<>();
|
323 |
Map<String, String> params = new HashMap<>();
|
| 309 |
|
324 |
|
| 310 |
String uri = "/getAllNotifications";
|
325 |
String uri = "/getAllNotifications";
|
| Line 315... |
Line 330... |
| 315 |
try {
|
330 |
try {
|
| 316 |
restResponse = restClient.get(SchemeType.HTTP, nodeHost, nodePort, uri, params);
|
331 |
restResponse = restClient.get(SchemeType.HTTP, nodeHost, nodePort, uri, params);
|
| 317 |
} catch (HttpHostConnectException e) {
|
332 |
} catch (HttpHostConnectException e) {
|
| 318 |
throw new ProfitMandiBusinessException("", "", "Could not Connect to host");
|
333 |
throw new ProfitMandiBusinessException("", "", "Could not Connect to host");
|
| 319 |
}
|
334 |
}
|
| 320 |
|
- |
|
| 321 |
|
335 |
|
| 322 |
JsonArray result_json = Json.parse(restResponse).asArray();
|
336 |
JsonArray result_json = Json.parse(restResponse).asArray();
|
| 323 |
|
337 |
|
| 324 |
List<Notification> notifications = new ArrayList<>();
|
338 |
List<Notification> notifications = new ArrayList<>();
|
| 325 |
|
339 |
|
| Line 344... |
Line 358... |
| 344 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
358 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 345 |
return responseSender.ok(userRepository.isExistByMobileNumber(mobileNumber));
|
359 |
return responseSender.ok(userRepository.isExistByMobileNumber(mobileNumber));
|
| 346 |
}
|
360 |
}
|
| 347 |
|
361 |
|
| 348 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_EMAIL_ID, method = RequestMethod.GET)
|
362 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_EMAIL_ID, method = RequestMethod.GET)
|
| 349 |
public ResponseEntity<?> getByEmailId(HttpServletRequest request, @RequestParam(name = "emailId") String emailId) throws ProfitMandiBusinessException{
|
363 |
public ResponseEntity<?> getByEmailId(HttpServletRequest request, @RequestParam(name = "emailId") String emailId)
|
| - |
|
364 |
throws ProfitMandiBusinessException {
|
| 350 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
365 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 351 |
User user = null;
|
366 |
User user = null;
|
| 352 |
try{
|
367 |
try {
|
| 353 |
user = userRepository.selectByEmailId(emailId);
|
368 |
user = userRepository.selectByEmailId(emailId);
|
| 354 |
}catch(ProfitMandiBusinessException profitMandiBusinessException){
|
369 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
| 355 |
user = userRepository.selectBySecondryEmailId(emailId);
|
370 |
user = userRepository.selectBySecondryEmailId(emailId);
|
| 356 |
}
|
371 |
}
|
| 357 |
return responseSender.ok(user);
|
372 |
return responseSender.ok(user);
|
| 358 |
}
|
373 |
}
|
| 359 |
|
374 |
|
| 360 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_ROLE_ALL, method = RequestMethod.GET)
|
375 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_ROLE_ALL, method = RequestMethod.GET)
|
| 361 |
public ResponseEntity<?> getAllRoles(HttpServletRequest request, @RequestParam(name = "id") int id) {
|
376 |
public ResponseEntity<?> getAllRoles(HttpServletRequest request, @RequestParam(name = "id") int id) {
|
| 362 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
377 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 363 |
return responseSender.ok(userRoleRepository.selectRolesByUserId(id));
|
378 |
return responseSender.ok(userRoleRepository.selectRolesByUserId(id));
|
| 364 |
}
|
379 |
}
|
| 365 |
|
380 |
|
| 366 |
@ApiImplicitParams({
|
381 |
@ApiImplicitParams({
|
| 367 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
382 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
| 368 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_SECONDRY_EMAIL_ID_AND_FOFO_STORE_CODE, method = RequestMethod.GET)
|
383 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_SECONDRY_EMAIL_ID_AND_FOFO_STORE_CODE, method = RequestMethod.GET)
|
| 369 |
public ResponseEntity<?> getSecondryEmailAndStoreCode(HttpServletRequest request) throws ProfitMandiBusinessException{
|
384 |
public ResponseEntity<?> getSecondryEmailAndStoreCode(HttpServletRequest request)
|
| - |
|
385 |
throws ProfitMandiBusinessException {
|
| 370 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
386 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 371 |
int userId = (int) request.getAttribute(ProfitMandiConstants.USER_ID);
|
387 |
int userId = (int) request.getAttribute(ProfitMandiConstants.USER_ID);
|
| 372 |
return responseSender.ok(userService.getEmailsAndFofoStoreCodeByUserId(userId));
|
388 |
return responseSender.ok(userService.getEmailsAndFofoStoreCodeByUserId(userId));
|
| 373 |
}
|
389 |
}
|
| 374 |
|
390 |
|
| 375 |
@ApiImplicitParams({
|
391 |
@ApiImplicitParams({
|
| 376 |
@ApiImplicitParam(name = "Auth-Token", value = "-Token", required = true, dataType = "string", paramType = "header") })
|
392 |
@ApiImplicitParam(name = "Auth-Token", value = "-Token", required = true, dataType = "string", paramType = "header") })
|
| 377 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_SECONDRY_EMAIL_ID, method = RequestMethod.PUT)
|
393 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_SECONDRY_EMAIL_ID, method = RequestMethod.PUT)
|
| 378 |
public ResponseEntity<?> updateSecondryEmailId(HttpServletRequest request,
|
394 |
public ResponseEntity<?> updateSecondryEmailId(HttpServletRequest request,
|
| 379 |
@RequestParam(name = ProfitMandiConstants.SECONDRY_EMAIL_ID) String secondryEmailId) throws Throwable {
|
395 |
@RequestParam(name = ProfitMandiConstants.SECONDRY_EMAIL_ID) String secondryEmailId) throws Throwable {
|
| 380 |
int userId = (int) request.getAttribute("userId");
|
396 |
int userId = (int) request.getAttribute("userId");
|
| 381 |
User user = userRepository.selectById(userId);
|
397 |
User user = userRepository.selectById(userId);
|
| 382 |
user.setSecondryEmailId(secondryEmailId);
|
398 |
user.setSecondryEmailId(secondryEmailId);
|
| 383 |
userRepository.persist(user);
|
399 |
userRepository.persist(user);
|
| 384 |
return responseSender.ok(ResponseCodeHolder.getMessage("USR_OK_1001"));
|
400 |
return responseSender.ok(ResponseCodeHolder.getMessage("USR_OK_1001"));
|
| 385 |
}
|
401 |
}
|
| 386 |
|
402 |
|
| 387 |
@RequestMapping(value = ProfitMandiConstants.URL_ADMIN_TOKEN, method = RequestMethod.POST)
|
403 |
@RequestMapping(value = ProfitMandiConstants.URL_ADMIN_TOKEN, method = RequestMethod.POST)
|
| 388 |
public ResponseEntity<?> getAdminToken(HttpServletRequest request,
|
404 |
public ResponseEntity<?> getAdminToken(HttpServletRequest request,
|
| 389 |
@RequestParam(name = "adminToken") String adminToken, @RequestParam(name = "emailId") String emailId) {
|
405 |
@RequestParam(name = "adminToken") String adminToken, @RequestParam(name = "emailId") String emailId) {
|
| 390 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
406 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| Line 395... |
Line 411... |
| 395 |
Map<String, Object> responseMap = new HashMap<>(2);
|
411 |
Map<String, Object> responseMap = new HashMap<>(2);
|
| 396 |
User user = null;
|
412 |
User user = null;
|
| 397 |
try {
|
413 |
try {
|
| 398 |
user = userRepository.selectByEmailId(emailId);
|
414 |
user = userRepository.selectByEmailId(emailId);
|
| 399 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
415 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
| 400 |
|
416 |
|
| 401 |
}
|
417 |
}
|
| 402 |
|
418 |
|
| 403 |
if(user == null){
|
419 |
if (user == null) {
|
| 404 |
try{
|
420 |
try {
|
| 405 |
user = userRepository.selectBySecondryEmailId(emailId);
|
421 |
user = userRepository.selectBySecondryEmailId(emailId);
|
| 406 |
}catch(ProfitMandiBusinessException profitMandiBusinessException){
|
422 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
| 407 |
|
423 |
|
| 408 |
}
|
424 |
}
|
| 409 |
}
|
425 |
}
|
| 410 |
if(user != null){
|
426 |
if (user != null) {
|
| 411 |
int retailerId = 0;
|
427 |
int retailerId = 0;
|
| 412 |
try {
|
428 |
try {
|
| 413 |
retailerId = userAccountRepository.selectRetailerIdByUserId(user.getId());
|
429 |
retailerId = userAccountRepository.selectRetailerIdByUserId(user.getId());
|
| 414 |
} catch (ProfitMandiBusinessException e) {
|
430 |
} catch (ProfitMandiBusinessException e) {
|
| 415 |
// TODO Auto-generated catch block
|
431 |
// TODO Auto-generated catch block
|
| Line 421... |
Line 437... |
| 421 |
for (int roleId : roleIds) {
|
437 |
for (int roleId : roleIds) {
|
| 422 |
roleIdsString[index++] = String.valueOf(roleId);
|
438 |
roleIdsString[index++] = String.valueOf(roleId);
|
| 423 |
}
|
439 |
}
|
| 424 |
responseMap.put(ProfitMandiConstants.TOKEN, JWTUtil.create(user.getId(), retailerId, roleIdsString));
|
440 |
responseMap.put(ProfitMandiConstants.TOKEN, JWTUtil.create(user.getId(), retailerId, roleIdsString));
|
| 425 |
responseMap.put(ProfitMandiConstants.REGISTERED, true);
|
441 |
responseMap.put(ProfitMandiConstants.REGISTERED, true);
|
| 426 |
}else{
|
442 |
} else {
|
| 427 |
responseMap.put(ProfitMandiConstants.TOKEN, JWTUtil.create(emailId));
|
443 |
responseMap.put(ProfitMandiConstants.TOKEN, JWTUtil.create(emailId));
|
| 428 |
responseMap.put(ProfitMandiConstants.REGISTERED, false);
|
444 |
responseMap.put(ProfitMandiConstants.REGISTERED, false);
|
| 429 |
}
|
445 |
}
|
| 430 |
return responseSender.ok(responseMap);
|
446 |
return responseSender.ok(responseMap);
|
| 431 |
|
447 |
|
| 432 |
}
|
448 |
}
|
| 433 |
|
449 |
|
| 434 |
@RequestMapping(value = "/mobileappsettings", method = RequestMethod.POST)
|
450 |
@RequestMapping(value = "/mobileappsettings", method = RequestMethod.POST)
|
| 435 |
public ResponseEntity<?> mobileAppSettings(HttpServletRequest request,@RequestParam(name = "t") int timestamp,@RequestParam(name = "imeinumber") String imeinumber) throws ProfitMandiBusinessException, ClientProtocolException, IOException{
|
451 |
public ResponseEntity<?> mobileAppSettings(HttpServletRequest request, @RequestParam(name = "t") int timestamp,
|
| - |
|
452 |
@RequestParam(name = "imeinumber") String imeinumber)
|
| - |
|
453 |
throws ProfitMandiBusinessException, ClientProtocolException, IOException {
|
| 436 |
|
454 |
|
| 437 |
final String uri = "http://api.profittill.com/mobileappsettings?t="+timestamp+"&imeinumber="+imeinumber;
|
455 |
final String uri = "http://api.profittill.com/mobileappsettings?t=" + timestamp + "&imeinumber=" + imeinumber;
|
| 438 |
final String BASIC_AUTH = "Basic " + Base64.getEncoder().encodeToString("dtr:dtr18Feb2015".getBytes());
|
456 |
final String BASIC_AUTH = "Basic " + Base64.getEncoder().encodeToString("dtr:dtr18Feb2015".getBytes());
|
| 439 |
Map<String, String> headers = new HashMap<>();
|
457 |
Map<String, String> headers = new HashMap<>();
|
| 440 |
Map<String, String> params = new HashMap<>();
|
458 |
Map<String, String> params = new HashMap<>();
|
| 441 |
headers.put("Authorization", BASIC_AUTH);
|
459 |
headers.put("Authorization", BASIC_AUTH);
|
| 442 |
return responseSender.ok(restClient.post(uri, params, headers));
|
460 |
return responseSender.ok(restClient.post(uri, params, headers));
|
| 443 |
}
|
461 |
}
|
| 444 |
|
462 |
|
| - |
|
463 |
@RequestMapping(value = "/getPartners", method = RequestMethod.GET)
|
| - |
|
464 |
@ApiImplicitParams({
|
| - |
|
465 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
| - |
|
466 |
public ResponseEntity<?> getPartners(HttpServletRequest request, @RequestParam(name = "gmailId") String gmailId,
|
| - |
|
467 |
@RequestParam(value = "offset") int offset, @RequestParam(value = "limit") int limit)
|
| - |
|
468 |
throws ProfitMandiBusinessException {
|
| - |
|
469 |
AuthUser authUser = authRepository.selectByGmailId(gmailId);
|
| - |
|
470 |
|
| - |
|
471 |
Map<String, List<String>> storeGuyMap = new HashMap<>();
|
| - |
|
472 |
for (Map.Entry<String, List<String>> entry : storeManagerMap.entrySet()) {
|
| - |
|
473 |
String storeEmail = entry.getKey();
|
| - |
|
474 |
List<String> storeGuys = entry.getValue();
|
| - |
|
475 |
for (String storeGuy : storeGuys) {
|
| - |
|
476 |
if (!storeGuyMap.containsKey(storeGuy)) {
|
| - |
|
477 |
storeGuyMap.put(storeGuy, new ArrayList<>());
|
| - |
|
478 |
}
|
| - |
|
479 |
storeGuyMap.get(storeGuy).add(storeEmail);
|
| - |
|
480 |
}
|
| - |
|
481 |
|
| - |
|
482 |
}
|
| - |
|
483 |
storeGuyMap.remove("");
|
| - |
|
484 |
|
| - |
|
485 |
List<String> emails = storeGuyMap.get(authUser.getEmailId());
|
| - |
|
486 |
LOGGER.info("emails" + emails);
|
| - |
|
487 |
List<User> users = userRepository.selectAllByEmails(emails,offset,limit);
|
| - |
|
488 |
List<Partner> partners = new ArrayList<>();
|
| - |
|
489 |
for (User user : users) {
|
| - |
|
490 |
|
| - |
|
491 |
UserAccount uc = userAccountRepository.selectSaholicByUserId(user.getId());
|
| - |
|
492 |
com.spice.profitmandi.dao.entity.user.User userInfo = userUserRepository.selectById(uc.getAccountKey());
|
| - |
|
493 |
CustomRetailer customRetailer = retailerService.getFofoRetailer(userInfo.getId());
|
| - |
|
494 |
|
| - |
|
495 |
Partner partner = new Partner();
|
| - |
|
496 |
partner.setBusinessName(customRetailer.getBusinessName());
|
| - |
|
497 |
partner.setPartnerId(customRetailer.getPartnerId());
|
| - |
|
498 |
partner.setCartId(customRetailer.getCartId());
|
| - |
|
499 |
partner.setEmail(customRetailer.getEmail());
|
| - |
|
500 |
partner.setGstNumber(customRetailer.getGstNumber());
|
| - |
|
501 |
partner.setDisplayName(customRetailer.getDisplayName());
|
| - |
|
502 |
partner.setCity(customRetailer.getAddress().getCity());
|
| - |
|
503 |
partner.setUserId(user.getId());
|
| - |
|
504 |
partners.add(partner);
|
| - |
|
505 |
}
|
| - |
|
506 |
LOGGER.info("partners" + partners);
|
| - |
|
507 |
return responseSender.ok(partners);
|
| - |
|
508 |
}
|
| - |
|
509 |
|
| - |
|
510 |
public static final Map<String, String> nameEmail = new HashMap<>();
|
| - |
|
511 |
|
| - |
|
512 |
public static final Map<String, List<String>> storeManagerMap = new HashMap<>();
|
| - |
|
513 |
|
| - |
|
514 |
static {
|
| - |
|
515 |
nameEmail.put("Amod", "amod.sen@smartdukaan.com");
|
| - |
|
516 |
nameEmail.put("Parmod", "parmod.kumar@smartdukaan.com");
|
| - |
|
517 |
nameEmail.put("Anis", "md.anis@smartdukaan.com");
|
| - |
|
518 |
nameEmail.put("Manoj", "manoj.singh@smartdukaan.com");
|
| - |
|
519 |
nameEmail.put("Adeel", "adeel.yazdani@smartdukaan.com");
|
| - |
|
520 |
nameEmail.put("Mohinder", "mohinder.mutreja@smartdukaan.com");
|
| - |
|
521 |
nameEmail.put("Dharmendar", "dharmender.verma@smartdukaan.com");
|
| - |
|
522 |
nameEmail.put("Rajat", "rajat.gupta@smartdukaan.com");
|
| - |
|
523 |
nameEmail.put("Ankit", "ankit.bhatia@smartdukaan.com");
|
| - |
|
524 |
nameEmail.put("Rajit", "rajit.alag@smartdukaan.com");
|
| - |
|
525 |
nameEmail.put("Gulshan", "gulshan.kumar@smartdukaan.com");
|
| - |
|
526 |
nameEmail.put("PramodSharma", "parmod.sharma@smartdukaan.com");
|
| - |
|
527 |
// nameEmail.put("Gulshan","");
|
| - |
|
528 |
storeManagerMap.put("themobileplanet03@gmail.com", Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
529 |
storeManagerMap.put("mobileplanet7599@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
530 |
storeManagerMap.put("robintelecom.snp@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
531 |
storeManagerMap.put("smartconnect4141@gmail.com", Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
532 |
storeManagerMap.put("bhimsain919@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
533 |
storeManagerMap.put("babitaranirk@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
534 |
storeManagerMap.put("dharmendery079@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
535 |
storeManagerMap.put("kkv.enterprises1@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
536 |
storeManagerMap.put("gulshersaifi74226@gmail.com", Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
537 |
storeManagerMap.put("deepak.lalwani1985@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
538 |
storeManagerMap.put("gupta.smartdukaan@gmail.com", Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
539 |
storeManagerMap.put("sachinindri2006@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
540 |
storeManagerMap.put("kambojanil83@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
541 |
storeManagerMap.put("uppal.neeraj82@gmail.com", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
542 |
storeManagerMap.put("thefonehousekarnal@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
543 |
storeManagerMap.put("richa9910763006@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
544 |
storeManagerMap.put("smartdukangzb@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
545 |
storeManagerMap.put("lovelymobile183@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
546 |
storeManagerMap.put("smartdukaan.sonepat@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
547 |
storeManagerMap.put("arunmittal299@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
548 |
storeManagerMap.put("gtc01100@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
549 |
storeManagerMap.put("sumittyagi1975@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
550 |
storeManagerMap.put("metrofurniture342@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
551 |
storeManagerMap.put("suryaelectronicskaithal@gmail.com", Arrays.asList("Parmod", "", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
552 |
storeManagerMap.put("mmtelecomsec16@gmail.com", Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
553 |
storeManagerMap.put("omsonsindia08@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
554 |
storeManagerMap.put("smartenterprisespv@gmail.com", Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
555 |
storeManagerMap.put("cachaitnya@gmail.com", Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
556 |
storeManagerMap.put("ajaykumarkansal03@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
557 |
storeManagerMap.put("spurwar73@gmail.com", Arrays.asList("md.anis@smartdukaan.com", "rajat.gupta@smartdukaan.com", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
558 |
storeManagerMap.put("Shreemobile.ind@gmail.com", Arrays.asList("md.anis@smartdukaan.com", "rajat.gupta@smartdukaan.com", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
559 |
storeManagerMap.put("felixenterprises2017@rediffmail.com", Arrays.asList("", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
560 |
storeManagerMap.put("nareandergupta@gmail.com", Arrays.asList("", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
561 |
storeManagerMap.put("shreebalajielectronic2019@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
562 |
storeManagerMap.put("saranshary@gmail.com", Arrays.asList("", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
563 |
storeManagerMap.put("gambhirsmartphone@gmail.com", Arrays.asList("", "gulshan.kumar@smartdukaan.com", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
564 |
storeManagerMap.put("Priyankaenterprises9910@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
565 |
storeManagerMap.put("pawan.dhimaan@gmail.com", Arrays.asList("", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
566 |
storeManagerMap.put("lakshaydhulla62@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
567 |
storeManagerMap.put("parastelecom.stp@gmail.com", Arrays.asList("md.anis@smartdukaan.com", "rajat.gupta@smartdukaan.com", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
568 |
storeManagerMap.put("talwarmukesh298@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
569 |
storeManagerMap.put("sahilnarang0009@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
570 |
storeManagerMap.put("supertelecomjind@gmail.com", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
571 |
storeManagerMap.put("saketnagpal@gmail.com", Arrays.asList("", "rajit.alag@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
572 |
storeManagerMap.put("DEEPAKGOYAL702.DG@GMAIL.COM", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
573 |
storeManagerMap.put("sambhav350@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
574 |
storeManagerMap.put("mayankarora98133@gmail.com", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
575 |
storeManagerMap.put("vijaymobilityandmoew@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
576 |
storeManagerMap.put("amitv70003@gmail.com", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
577 |
storeManagerMap.put("newagelucknow.123@gmail.com", Arrays.asList("md.anis@smartdukaan.com", "rajat.gupta@smartdukaan.com", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
578 |
storeManagerMap.put("Newagetechnologygomtinagar@gmail.com", Arrays.asList("md.anis@smartdukaan.com", "rajat.gupta@smartdukaan.com", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
579 |
storeManagerMap.put("rohitbatra106@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
580 |
storeManagerMap.put("sonisunil9050873061@gmail.com", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
581 |
storeManagerMap.put("moderncohsr@gmail.com", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
582 |
storeManagerMap.put("raghubir.ngh@gmail.com", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
583 |
storeManagerMap.put("aman007singla@gmail.com", Arrays.asList("", "rajit.alag@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
584 |
}
|
| 445 |
}
|
585 |
}
|