| 21248 |
ashik.ali |
1 |
package com.spice.profitmandi.web.controller;
|
|
|
2 |
|
| 25300 |
tejbeer |
3 |
import java.io.IOException;
|
| 21248 |
ashik.ali |
4 |
import java.time.LocalDateTime;
|
| 21855 |
amit.gupta |
5 |
import java.util.ArrayList;
|
| 25366 |
tejbeer |
6 |
import java.util.Arrays;
|
| 25300 |
tejbeer |
7 |
import java.util.Base64;
|
| 21428 |
amit.gupta |
8 |
import java.util.HashMap;
|
| 23786 |
amit.gupta |
9 |
import java.util.HashSet;
|
| 21855 |
amit.gupta |
10 |
import java.util.List;
|
| 21277 |
ashik.ali |
11 |
import java.util.Map;
|
| 23786 |
amit.gupta |
12 |
import java.util.Set;
|
| 21248 |
ashik.ali |
13 |
|
|
|
14 |
import javax.servlet.http.HttpServletRequest;
|
|
|
15 |
|
| 25300 |
tejbeer |
16 |
import org.apache.http.client.ClientProtocolException;
|
| 23532 |
amit.gupta |
17 |
import org.apache.http.conn.HttpHostConnectException;
|
| 23786 |
amit.gupta |
18 |
import org.apache.logging.log4j.LogManager;
|
| 23859 |
ashik.ali |
19 |
import org.apache.logging.log4j.Logger;
|
| 21278 |
ashik.ali |
20 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 21414 |
kshitij.so |
21 |
import org.springframework.beans.factory.annotation.Value;
|
| 25366 |
tejbeer |
22 |
import org.springframework.http.MediaType;
|
| 21248 |
ashik.ali |
23 |
import org.springframework.http.ResponseEntity;
|
|
|
24 |
import org.springframework.stereotype.Controller;
|
| 21702 |
ashik.ali |
25 |
import org.springframework.transaction.annotation.Transactional;
|
| 21366 |
kshitij.so |
26 |
import org.springframework.web.bind.annotation.RequestBody;
|
| 21248 |
ashik.ali |
27 |
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
28 |
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
29 |
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
30 |
|
| 22015 |
ashik.ali |
31 |
import com.eclipsesource.json.Json;
|
| 21855 |
amit.gupta |
32 |
import com.eclipsesource.json.JsonArray;
|
|
|
33 |
import com.eclipsesource.json.JsonObject;
|
|
|
34 |
import com.eclipsesource.json.JsonValue;
|
|
|
35 |
import com.google.gson.Gson;
|
| 21248 |
ashik.ali |
36 |
import com.spice.profitmandi.common.ResponseCodeHolder;
|
| 21855 |
amit.gupta |
37 |
import com.spice.profitmandi.common.enumuration.SchemeType;
|
| 21248 |
ashik.ali |
38 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 25366 |
tejbeer |
39 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
| 22930 |
ashik.ali |
40 |
import com.spice.profitmandi.common.model.GoogleLoginRequest;
|
| 21248 |
ashik.ali |
41 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 22492 |
amit.gupta |
42 |
import com.spice.profitmandi.common.model.RegisteredUserInfo;
|
| 21469 |
amit.gupta |
43 |
import com.spice.profitmandi.common.model.UserInfo;
|
| 21282 |
ashik.ali |
44 |
import com.spice.profitmandi.common.util.JWTUtil;
|
| 21855 |
amit.gupta |
45 |
import com.spice.profitmandi.common.web.client.RestClient;
|
| 21740 |
ashik.ali |
46 |
import com.spice.profitmandi.common.web.util.ResponseSender;
|
| 25366 |
tejbeer |
47 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
| 21735 |
ashik.ali |
48 |
import com.spice.profitmandi.dao.entity.dtr.Retailer;
|
| 23858 |
ashik.ali |
49 |
import com.spice.profitmandi.dao.entity.dtr.Role;
|
| 21735 |
ashik.ali |
50 |
import com.spice.profitmandi.dao.entity.dtr.User;
|
| 25366 |
tejbeer |
51 |
import com.spice.profitmandi.dao.entity.dtr.UserAccount;
|
| 21735 |
ashik.ali |
52 |
import com.spice.profitmandi.dao.entity.dtr.UserRole;
|
| 22355 |
ashik.ali |
53 |
import com.spice.profitmandi.dao.entity.user.Address;
|
| 21735 |
ashik.ali |
54 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
| 21643 |
ashik.ali |
55 |
import com.spice.profitmandi.dao.model.UserCart;
|
| 25366 |
tejbeer |
56 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
| 21735 |
ashik.ali |
57 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
|
| 23786 |
amit.gupta |
58 |
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
|
| 21735 |
ashik.ali |
59 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
|
|
60 |
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
|
|
|
61 |
import com.spice.profitmandi.dao.repository.dtr.UserRoleRepository;
|
| 22355 |
ashik.ali |
62 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
| 24491 |
amit.gupta |
63 |
import com.spice.profitmandi.service.AuthService;
|
| 23798 |
amit.gupta |
64 |
import com.spice.profitmandi.service.authentication.RoleManager;
|
| 25366 |
tejbeer |
65 |
import com.spice.profitmandi.service.user.RetailerService;
|
| 23787 |
amit.gupta |
66 |
import com.spice.profitmandi.service.user.UserService;
|
| 21469 |
amit.gupta |
67 |
import com.spice.profitmandi.web.enumuration.UserStatus;
|
| 21277 |
ashik.ali |
68 |
import com.spice.profitmandi.web.processor.GoogleLoginProcessor;
|
| 21366 |
kshitij.so |
69 |
import com.spice.profitmandi.web.req.UserRequest;
|
| 21855 |
amit.gupta |
70 |
import com.spice.profitmandi.web.res.Notification;
|
| 25366 |
tejbeer |
71 |
import com.spice.profitmandi.web.res.Partner;
|
| 21248 |
ashik.ali |
72 |
|
| 21469 |
amit.gupta |
73 |
import io.swagger.annotations.ApiImplicitParam;
|
|
|
74 |
import io.swagger.annotations.ApiImplicitParams;
|
|
|
75 |
|
| 21248 |
ashik.ali |
76 |
/**
|
|
|
77 |
* @author ashikali
|
|
|
78 |
*
|
|
|
79 |
*/
|
|
|
80 |
@Controller
|
| 25366 |
tejbeer |
81 |
@Transactional(rollbackFor = Throwable.class)
|
| 21248 |
ashik.ali |
82 |
public class UserController {
|
| 21469 |
amit.gupta |
83 |
|
| 21448 |
ashik.ali |
84 |
@Autowired
|
| 22930 |
ashik.ali |
85 |
private ResponseSender<?> responseSender;
|
| 21469 |
amit.gupta |
86 |
|
| 23568 |
govind |
87 |
private static final Logger LOGGER = LogManager.getLogger(UserController.class);
|
| 21469 |
amit.gupta |
88 |
|
| 21855 |
amit.gupta |
89 |
@Value("${notifications.api.host}")
|
|
|
90 |
private String nodeHost;
|
| 25366 |
tejbeer |
91 |
|
| 21855 |
amit.gupta |
92 |
@Value("${notifications.api.port}")
|
|
|
93 |
private int nodePort;
|
|
|
94 |
|
| 21414 |
kshitij.so |
95 |
@Value("${admin.token}")
|
|
|
96 |
private String validAdminToken;
|
| 21469 |
amit.gupta |
97 |
|
| 21278 |
ashik.ali |
98 |
@Autowired
|
| 22873 |
ashik.ali |
99 |
private UserRepository userRepository;
|
| 25366 |
tejbeer |
100 |
|
| 22355 |
ashik.ali |
101 |
@Autowired
|
| 22873 |
ashik.ali |
102 |
private com.spice.profitmandi.dao.repository.user.UserRepository userUserRepository;
|
| 21469 |
amit.gupta |
103 |
|
| 21278 |
ashik.ali |
104 |
@Autowired
|
| 22873 |
ashik.ali |
105 |
private RetailerRepository retailerRepository;
|
| 21485 |
amit.gupta |
106 |
|
|
|
107 |
@Autowired
|
| 22873 |
ashik.ali |
108 |
private UserRoleRepository userRoleRepository;
|
| 21469 |
amit.gupta |
109 |
|
| 21426 |
ashik.ali |
110 |
@Autowired
|
| 22873 |
ashik.ali |
111 |
private UserAccountRepository userAccountRepository;
|
| 25366 |
tejbeer |
112 |
|
| 22355 |
ashik.ali |
113 |
@Autowired
|
| 24491 |
amit.gupta |
114 |
private AuthService authService;
|
| 25366 |
tejbeer |
115 |
|
| 24491 |
amit.gupta |
116 |
@Autowired
|
| 22873 |
ashik.ali |
117 |
private AddressRepository addressRepository;
|
| 21469 |
amit.gupta |
118 |
|
| 21426 |
ashik.ali |
119 |
@Autowired
|
| 22873 |
ashik.ali |
120 |
private GoogleLoginProcessor googleLoginProcessor;
|
| 21855 |
amit.gupta |
121 |
|
| 21784 |
amit.gupta |
122 |
@Autowired
|
| 22873 |
ashik.ali |
123 |
private UserService userService;
|
| 25366 |
tejbeer |
124 |
|
| 23786 |
amit.gupta |
125 |
@Autowired
|
| 23858 |
ashik.ali |
126 |
private RestClient restClient;
|
| 25366 |
tejbeer |
127 |
|
| 23858 |
ashik.ali |
128 |
@Autowired
|
| 23798 |
amit.gupta |
129 |
private RoleManager roleManager;
|
| 25366 |
tejbeer |
130 |
|
| 23786 |
amit.gupta |
131 |
@Autowired
|
|
|
132 |
private RoleRepository roleRepository;
|
| 21469 |
amit.gupta |
133 |
|
| 25366 |
tejbeer |
134 |
@Autowired
|
|
|
135 |
private AuthRepository authRepository;
|
|
|
136 |
|
|
|
137 |
@Autowired
|
|
|
138 |
private RetailerService retailerService;
|
|
|
139 |
|
| 21469 |
amit.gupta |
140 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_GOOGLE_LOGIN, method = RequestMethod.POST)
|
| 25366 |
tejbeer |
141 |
public ResponseEntity<?> googleLogin(HttpServletRequest request, @RequestBody GoogleLoginRequest googleLoginRequest)
|
|
|
142 |
throws ProfitMandiBusinessException {
|
| 23698 |
amit.gupta |
143 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 24494 |
amit.gupta |
144 |
Map<String, Object> resultMap = googleLoginProcessor.process(googleLoginRequest);
|
|
|
145 |
LOGGER.info("Response sent is {}", resultMap);
|
| 23698 |
amit.gupta |
146 |
return responseSender.ok(googleLoginProcessor.process(googleLoginRequest));
|
| 21277 |
ashik.ali |
147 |
}
|
| 21469 |
amit.gupta |
148 |
|
|
|
149 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_TOKEN_IS_EXPIRED, method = RequestMethod.GET)
|
| 25366 |
tejbeer |
150 |
public ResponseEntity<?> tokenIsExpired(HttpServletRequest request, @RequestParam(name = "token") String token)
|
|
|
151 |
throws ProfitMandiBusinessException {
|
| 21469 |
amit.gupta |
152 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 22930 |
ashik.ali |
153 |
return responseSender.ok(JWTUtil.isExpired(token));
|
| 21282 |
ashik.ali |
154 |
}
|
| 21469 |
amit.gupta |
155 |
|
| 22355 |
ashik.ali |
156 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_DETAIL_BY_TOKEN, method = RequestMethod.GET)
|
| 21469 |
amit.gupta |
157 |
@ApiImplicitParams({
|
|
|
158 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
|
|
159 |
public ResponseEntity<?> tokenInfo(HttpServletRequest request) throws Throwable {
|
|
|
160 |
Map<String, Object> responseMap = new HashMap<>();
|
|
|
161 |
UserInfo userInfo = (UserInfo) request.getAttribute("userInfo");
|
| 21483 |
amit.gupta |
162 |
User user = null;
|
| 21855 |
amit.gupta |
163 |
if (userInfo.getUserId() > -1) {
|
| 21483 |
amit.gupta |
164 |
user = userRepository.selectById(userInfo.getUserId());
|
| 25366 |
tejbeer |
165 |
if (!(userInfo.getEmail() == null || user.getEmailId().equalsIgnoreCase(userInfo.getEmail()))) {
|
| 24491 |
amit.gupta |
166 |
String userName = null;
|
| 25366 |
tejbeer |
167 |
if (user.getSecondryEmailId() != null && user.getSecondryEmailId().equals(userInfo.getEmail())) {
|
| 24491 |
amit.gupta |
168 |
userName = user.getFirstName() + " " + user.getLastName();
|
|
|
169 |
} else {
|
|
|
170 |
userName = authService.getNameByEmailId(userInfo.getEmail());
|
|
|
171 |
}
|
|
|
172 |
responseMap.put(ProfitMandiConstants.USER_ID, userInfo.getUserId());
|
|
|
173 |
responseMap.put(ProfitMandiConstants.USER_NAME, userName);
|
|
|
174 |
responseMap.put(ProfitMandiConstants.USER_STATUS, "fofoAssociate");
|
|
|
175 |
responseMap.put(ProfitMandiConstants.EMAIL_ID, userInfo.getEmail());
|
|
|
176 |
return responseSender.ok(responseMap);
|
|
|
177 |
}
|
| 21483 |
amit.gupta |
178 |
} else {
|
|
|
179 |
try {
|
|
|
180 |
user = userRepository.selectByEmailId(userInfo.getEmail());
|
|
|
181 |
} catch (ProfitMandiBusinessException e1) {
|
|
|
182 |
}
|
| 25366 |
tejbeer |
183 |
if (user == null) {
|
| 23204 |
ashik.ali |
184 |
try {
|
|
|
185 |
user = userRepository.selectBySecondryEmailId(userInfo.getEmail());
|
|
|
186 |
} catch (ProfitMandiBusinessException e1) {
|
|
|
187 |
LOGGER.info("Uneregistered user", userInfo.getEmail());
|
|
|
188 |
}
|
|
|
189 |
}
|
| 21483 |
amit.gupta |
190 |
}
|
|
|
191 |
if (user != null) {
|
| 23858 |
ashik.ali |
192 |
int retailerId = userAccountRepository.selectRetailerIdByUserId(user.getId());
|
| 21491 |
amit.gupta |
193 |
responseMap.put(ProfitMandiConstants.EMAIL_ID, user.getEmailId());
|
| 21526 |
amit.gupta |
194 |
responseMap.put(ProfitMandiConstants.USER_ID, user.getId());
|
| 22017 |
amit.gupta |
195 |
responseMap.put(ProfitMandiConstants.USER_NAME, user.getFirstName() + " " + user.getLastName());
|
| 23786 |
amit.gupta |
196 |
List<Integer> roleIds = userRoleRepository.selectRoleIdsByUserId(user.getId());
|
| 25366 |
tejbeer |
197 |
// LOGGER.info("userRoles {} ", userRoles);
|
| 22032 |
ashik.ali |
198 |
|
|
|
199 |
// generate new token if roles have been updated
|
| 23786 |
amit.gupta |
200 |
if (userInfo.getRoleIds() == null || roleIds.size() != userInfo.getRoleIds().size()) {
|
| 23858 |
ashik.ali |
201 |
String[] roleIdStrings = new String[roleIds.size()];
|
| 22603 |
amit.gupta |
202 |
int index = 0;
|
| 23786 |
amit.gupta |
203 |
for (int roleId : roleIds) {
|
| 23858 |
ashik.ali |
204 |
roleIdStrings[index++] = String.valueOf(roleId);
|
| 22603 |
amit.gupta |
205 |
}
|
| 23858 |
ashik.ali |
206 |
String newToken = JWTUtil.create(user.getId(), retailerId, roleIdStrings);
|
| 21483 |
amit.gupta |
207 |
responseMap.put("newAuthToken", newToken);
|
|
|
208 |
}
|
| 23858 |
ashik.ali |
209 |
// if user is retailer
|
| 23786 |
amit.gupta |
210 |
Set<Integer> roleIdsSet = new HashSet<Integer>(roleIds);
|
| 23858 |
ashik.ali |
211 |
if (roleManager.isRetailer(roleIdsSet)) {
|
| 22032 |
ashik.ali |
212 |
UserCart uc = userAccountRepository.getUserCart(userInfo.getUserId());
|
|
|
213 |
Retailer retailer = retailerRepository.selectById(uc.getUserId());
|
| 22370 |
amit.gupta |
214 |
com.spice.profitmandi.dao.entity.user.User saholicUser = userUserRepository.selectById(uc.getUserId());
|
| 25366 |
tejbeer |
215 |
if (saholicUser.getAddressId() != null) {
|
| 22370 |
amit.gupta |
216 |
Address address = addressRepository.selectById(saholicUser.getAddressId());
|
|
|
217 |
responseMap.put(ProfitMandiConstants.ADDRESS, address);
|
|
|
218 |
}
|
| 21485 |
amit.gupta |
219 |
// if retailer is activated 1 then verified retailer
|
|
|
220 |
// else if migrated is 1 then old retailer
|
| 25366 |
tejbeer |
221 |
// also lets incoporte old process i.e is user is activated then also retailer
|
|
|
222 |
// is verified retailer
|
| 21485 |
amit.gupta |
223 |
// else retailer is not verifed
|
| 22497 |
amit.gupta |
224 |
if (retailer.isActive() || user.isActivated()) {
|
| 23798 |
amit.gupta |
225 |
if (roleManager.isPartner(roleIdsSet)) {
|
| 22017 |
amit.gupta |
226 |
responseMap.put(ProfitMandiConstants.USER_STATUS, UserStatus.FOFO.getValue());
|
|
|
227 |
} else {
|
|
|
228 |
responseMap.put(ProfitMandiConstants.USER_STATUS, UserStatus.VERIFIED_RETAILER.getValue());
|
|
|
229 |
}
|
| 22032 |
ashik.ali |
230 |
} else if (retailer.isMigrated()) {
|
| 21485 |
amit.gupta |
231 |
responseMap.put(ProfitMandiConstants.USER_STATUS, UserStatus.RETAILER.getValue());
|
| 21469 |
amit.gupta |
232 |
} else {
|
| 21485 |
amit.gupta |
233 |
responseMap.put(ProfitMandiConstants.USER_STATUS, UserStatus.NOT_VERIFIED_RETAILER.getValue());
|
| 21469 |
amit.gupta |
234 |
}
|
| 23798 |
amit.gupta |
235 |
} else if (roleManager.isUser(roleIdsSet)) {
|
| 22502 |
amit.gupta |
236 |
responseMap.put("userInfo", getRegisteredUserInfo(user));
|
| 21469 |
amit.gupta |
237 |
responseMap.put(ProfitMandiConstants.USER_STATUS, UserStatus.REGISTERED.getValue());
|
| 22032 |
ashik.ali |
238 |
}
|
| 21491 |
amit.gupta |
239 |
} else {
|
|
|
240 |
responseMap.put(ProfitMandiConstants.USER_STATUS, UserStatus.NOT_REGISTERED.getValue());
|
|
|
241 |
responseMap.put(ProfitMandiConstants.EMAIL_ID, userInfo.getEmail());
|
| 21469 |
amit.gupta |
242 |
}
|
| 22032 |
ashik.ali |
243 |
|
| 21469 |
amit.gupta |
244 |
return responseSender.ok(responseMap);
|
|
|
245 |
}
|
| 25366 |
tejbeer |
246 |
|
| 22502 |
amit.gupta |
247 |
private RegisteredUserInfo getRegisteredUserInfo(User user) throws Throwable {
|
| 22492 |
amit.gupta |
248 |
RegisteredUserInfo ri = new RegisteredUserInfo();
|
|
|
249 |
ri.setCity(user.getCity());
|
|
|
250 |
ri.setFirstName(user.getFirstName());
|
|
|
251 |
ri.setLastName(user.getLastName());
|
| 22493 |
amit.gupta |
252 |
ri.setPhone(user.getMobileNumber());
|
| 22492 |
amit.gupta |
253 |
ri.setPinCode(user.getPinCode());
|
| 22845 |
amit.gupta |
254 |
ri.setState(user.getState());
|
| 22492 |
amit.gupta |
255 |
return ri;
|
|
|
256 |
}
|
| 21469 |
amit.gupta |
257 |
|
|
|
258 |
@RequestMapping(value = ProfitMandiConstants.URL_USER, method = RequestMethod.POST)
|
| 21501 |
amit.gupta |
259 |
@ApiImplicitParams({
|
| 22032 |
ashik.ali |
260 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
|
|
261 |
public ResponseEntity<?> createUser(HttpServletRequest request, @RequestBody UserRequest userRequest)
|
| 22930 |
ashik.ali |
262 |
throws ProfitMandiBusinessException {
|
| 21469 |
amit.gupta |
263 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 21368 |
kshitij.so |
264 |
User user = new User();
|
|
|
265 |
user.setFirstName(userRequest.getFirstName());
|
|
|
266 |
user.setLastName(userRequest.getLastName());
|
|
|
267 |
user.setCity(userRequest.getCity());
|
|
|
268 |
user.setPinCode(Integer.valueOf(userRequest.getPinCode()));
|
| 22845 |
amit.gupta |
269 |
user.setState(userRequest.getState());
|
| 21708 |
amit.gupta |
270 |
user.setMobileNumber(userRequest.getMobieNumber());
|
| 21368 |
kshitij.so |
271 |
user.setEmailId(userRequest.getEmailId());
|
|
|
272 |
user.setUsername("");
|
|
|
273 |
user.setPassword("");
|
|
|
274 |
user.setMobile_verified(false);
|
|
|
275 |
user.setReferral_url("");
|
|
|
276 |
user.setGroup_id(1);
|
| 22504 |
amit.gupta |
277 |
user.setStatus(1);
|
| 21368 |
kshitij.so |
278 |
user.setActivated(false);
|
| 21501 |
amit.gupta |
279 |
user.setCreateTimestamp(LocalDateTime.now());
|
|
|
280 |
user.setUpdateTimestamp(LocalDateTime.now());
|
| 22930 |
ashik.ali |
281 |
userRepository.persist(user);
|
| 23858 |
ashik.ali |
282 |
Role role = roleRepository.selectByName(RoleType.USER.toString());
|
| 22930 |
ashik.ali |
283 |
UserRole userRole = new UserRole();
|
| 23858 |
ashik.ali |
284 |
userRole.setRoleId(role.getId());
|
| 22930 |
ashik.ali |
285 |
userRole.setUserId(user.getId());
|
|
|
286 |
userRoleRepository.persist(userRole);
|
|
|
287 |
return responseSender.ok(ResponseCodeHolder.getMessage("USR_OK_1000"));
|
| 25366 |
tejbeer |
288 |
|
| 21278 |
ashik.ali |
289 |
}
|
| 21469 |
amit.gupta |
290 |
|
|
|
291 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_ID, method = RequestMethod.GET)
|
| 25366 |
tejbeer |
292 |
public ResponseEntity<?> getById(HttpServletRequest request, @RequestParam(name = "id") int id)
|
|
|
293 |
throws ProfitMandiBusinessException {
|
| 21469 |
amit.gupta |
294 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 22930 |
ashik.ali |
295 |
return responseSender.ok(userRepository.selectById(id));
|
| 21248 |
ashik.ali |
296 |
}
|
| 21469 |
amit.gupta |
297 |
|
|
|
298 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_MOBILE_NUMBER, method = RequestMethod.GET)
|
|
|
299 |
public ResponseEntity<?> getByMobileNumber(HttpServletRequest request,
|
| 25366 |
tejbeer |
300 |
@RequestParam(name = "mobileNumber") String mobileNumber) throws ProfitMandiBusinessException {
|
| 21469 |
amit.gupta |
301 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 22930 |
ashik.ali |
302 |
return responseSender.ok(userRepository.selectByMobileNumber(mobileNumber));
|
| 21248 |
ashik.ali |
303 |
}
|
| 21469 |
amit.gupta |
304 |
|
| 21784 |
amit.gupta |
305 |
@ApiImplicitParams({
|
| 21501 |
amit.gupta |
306 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
|
|
307 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_ACTIVATE, method = RequestMethod.POST)
|
|
|
308 |
public ResponseEntity<?> activateUser(HttpServletRequest request,
|
| 21784 |
amit.gupta |
309 |
@RequestParam(name = "activationCode") String activationCode) throws Throwable {
|
| 21855 |
amit.gupta |
310 |
int userId = (int) request.getAttribute("userId");
|
| 21784 |
amit.gupta |
311 |
UserCart uc = userAccountRepository.getUserCart(userId);
|
|
|
312 |
return responseSender.ok(userService.updateActivation(userId, uc.getUserId(), activationCode));
|
|
|
313 |
}
|
| 21855 |
amit.gupta |
314 |
|
|
|
315 |
@ApiImplicitParams({
|
|
|
316 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
|
|
317 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_NOTIFICATIONS, method = RequestMethod.GET)
|
|
|
318 |
public ResponseEntity<?> getNofitications(HttpServletRequest request,
|
|
|
319 |
@RequestParam(name = "androidId") String androidId, @RequestParam(name = "pageNumber") int pageNumber,
|
| 25366 |
tejbeer |
320 |
@RequestParam(name = "pageSize") int pageSize) throws ProfitMandiBusinessException {
|
| 21855 |
amit.gupta |
321 |
int userId = (int) request.getAttribute("userId");
|
|
|
322 |
String restResponse = null;
|
|
|
323 |
Map<String, String> params = new HashMap<>();
|
|
|
324 |
|
|
|
325 |
String uri = "/getAllNotifications";
|
|
|
326 |
params.put("user_id", userId + "");
|
|
|
327 |
params.put("android_id", androidId);
|
|
|
328 |
params.put("limit", pageSize + "");
|
|
|
329 |
params.put("offset", "" + ((pageNumber - 1) * pageSize));
|
| 23532 |
amit.gupta |
330 |
try {
|
| 23858 |
ashik.ali |
331 |
restResponse = restClient.get(SchemeType.HTTP, nodeHost, nodePort, uri, params);
|
|
|
332 |
} catch (HttpHostConnectException e) {
|
| 23532 |
amit.gupta |
333 |
throw new ProfitMandiBusinessException("", "", "Could not Connect to host");
|
|
|
334 |
}
|
| 21855 |
amit.gupta |
335 |
|
|
|
336 |
JsonArray result_json = Json.parse(restResponse).asArray();
|
|
|
337 |
|
|
|
338 |
List<Notification> notifications = new ArrayList<>();
|
|
|
339 |
|
|
|
340 |
for (JsonValue j : result_json) {
|
|
|
341 |
notifications.add(toNotifiaction(j.asObject()));
|
|
|
342 |
}
|
|
|
343 |
|
|
|
344 |
return responseSender.ok(notifications);
|
|
|
345 |
}
|
|
|
346 |
|
|
|
347 |
private Notification toNotifiaction(JsonObject jsonObject) {
|
|
|
348 |
Notification n = (Notification) (new Gson().fromJson(jsonObject.toString(), Notification.class));
|
| 21995 |
amit.gupta |
349 |
if (n.getStatus().equals("opened") || n.getStatus().equals("referrer") || n.getStatus().equals("seen")) {
|
| 21855 |
amit.gupta |
350 |
n.setSeen(true);
|
|
|
351 |
}
|
|
|
352 |
return n;
|
|
|
353 |
}
|
|
|
354 |
|
| 21426 |
ashik.ali |
355 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_IS_EXIST_MOBILE_NUMBER, method = RequestMethod.GET)
|
| 21469 |
amit.gupta |
356 |
public ResponseEntity<?> isMobileNumberExist(HttpServletRequest request,
|
|
|
357 |
@RequestParam(name = "mobileNumber") String mobileNumber) {
|
|
|
358 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 21448 |
ashik.ali |
359 |
return responseSender.ok(userRepository.isExistByMobileNumber(mobileNumber));
|
| 21426 |
ashik.ali |
360 |
}
|
| 21469 |
amit.gupta |
361 |
|
|
|
362 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_EMAIL_ID, method = RequestMethod.GET)
|
| 25366 |
tejbeer |
363 |
public ResponseEntity<?> getByEmailId(HttpServletRequest request, @RequestParam(name = "emailId") String emailId)
|
|
|
364 |
throws ProfitMandiBusinessException {
|
| 21469 |
amit.gupta |
365 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 23204 |
ashik.ali |
366 |
User user = null;
|
| 25366 |
tejbeer |
367 |
try {
|
| 23204 |
ashik.ali |
368 |
user = userRepository.selectByEmailId(emailId);
|
| 25366 |
tejbeer |
369 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
| 23204 |
ashik.ali |
370 |
user = userRepository.selectBySecondryEmailId(emailId);
|
|
|
371 |
}
|
|
|
372 |
return responseSender.ok(user);
|
| 21248 |
ashik.ali |
373 |
}
|
| 21469 |
amit.gupta |
374 |
|
|
|
375 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_ROLE_ALL, method = RequestMethod.GET)
|
|
|
376 |
public ResponseEntity<?> getAllRoles(HttpServletRequest request, @RequestParam(name = "id") int id) {
|
|
|
377 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 21448 |
ashik.ali |
378 |
return responseSender.ok(userRoleRepository.selectRolesByUserId(id));
|
| 21248 |
ashik.ali |
379 |
}
|
| 25366 |
tejbeer |
380 |
|
| 23204 |
ashik.ali |
381 |
@ApiImplicitParams({
|
| 25366 |
tejbeer |
382 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
| 23204 |
ashik.ali |
383 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_SECONDRY_EMAIL_ID_AND_FOFO_STORE_CODE, method = RequestMethod.GET)
|
| 25366 |
tejbeer |
384 |
public ResponseEntity<?> getSecondryEmailAndStoreCode(HttpServletRequest request)
|
|
|
385 |
throws ProfitMandiBusinessException {
|
| 23204 |
ashik.ali |
386 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
|
|
387 |
int userId = (int) request.getAttribute(ProfitMandiConstants.USER_ID);
|
|
|
388 |
return responseSender.ok(userService.getEmailsAndFofoStoreCodeByUserId(userId));
|
|
|
389 |
}
|
| 25366 |
tejbeer |
390 |
|
| 23204 |
ashik.ali |
391 |
@ApiImplicitParams({
|
| 25366 |
tejbeer |
392 |
@ApiImplicitParam(name = "Auth-Token", value = "-Token", required = true, dataType = "string", paramType = "header") })
|
| 23858 |
ashik.ali |
393 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_SECONDRY_EMAIL_ID, method = RequestMethod.PUT)
|
| 23204 |
ashik.ali |
394 |
public ResponseEntity<?> updateSecondryEmailId(HttpServletRequest request,
|
| 25366 |
tejbeer |
395 |
@RequestParam(name = ProfitMandiConstants.SECONDRY_EMAIL_ID) String secondryEmailId) throws Throwable {
|
|
|
396 |
int userId = (int) request.getAttribute("userId");
|
|
|
397 |
User user = userRepository.selectById(userId);
|
|
|
398 |
user.setSecondryEmailId(secondryEmailId);
|
|
|
399 |
userRepository.persist(user);
|
|
|
400 |
return responseSender.ok(ResponseCodeHolder.getMessage("USR_OK_1001"));
|
|
|
401 |
}
|
| 21414 |
kshitij.so |
402 |
|
|
|
403 |
@RequestMapping(value = ProfitMandiConstants.URL_ADMIN_TOKEN, method = RequestMethod.POST)
|
| 21469 |
amit.gupta |
404 |
public ResponseEntity<?> getAdminToken(HttpServletRequest request,
|
|
|
405 |
@RequestParam(name = "adminToken") String adminToken, @RequestParam(name = "emailId") String emailId) {
|
|
|
406 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
|
|
407 |
if (!adminToken.equals(validAdminToken)) {
|
| 22930 |
ashik.ali |
408 |
return responseSender.forbidden(null);
|
| 21414 |
kshitij.so |
409 |
}
|
| 21469 |
amit.gupta |
410 |
|
| 21414 |
kshitij.so |
411 |
Map<String, Object> responseMap = new HashMap<>(2);
|
| 23204 |
ashik.ali |
412 |
User user = null;
|
| 21469 |
amit.gupta |
413 |
try {
|
| 23204 |
ashik.ali |
414 |
user = userRepository.selectByEmailId(emailId);
|
|
|
415 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
| 25366 |
tejbeer |
416 |
|
| 23204 |
ashik.ali |
417 |
}
|
| 25366 |
tejbeer |
418 |
|
|
|
419 |
if (user == null) {
|
|
|
420 |
try {
|
| 23204 |
ashik.ali |
421 |
user = userRepository.selectBySecondryEmailId(emailId);
|
| 25366 |
tejbeer |
422 |
} catch (ProfitMandiBusinessException profitMandiBusinessException) {
|
|
|
423 |
|
| 23204 |
ashik.ali |
424 |
}
|
|
|
425 |
}
|
| 25366 |
tejbeer |
426 |
if (user != null) {
|
| 23858 |
ashik.ali |
427 |
int retailerId = 0;
|
|
|
428 |
try {
|
|
|
429 |
retailerId = userAccountRepository.selectRetailerIdByUserId(user.getId());
|
|
|
430 |
} catch (ProfitMandiBusinessException e) {
|
|
|
431 |
// TODO Auto-generated catch block
|
|
|
432 |
e.printStackTrace();
|
|
|
433 |
}
|
|
|
434 |
List<Integer> roleIds = userRoleRepository.selectRoleIdsByUserId(user.getId());
|
|
|
435 |
String[] roleIdsString = new String[roleIds.size()];
|
| 21414 |
kshitij.so |
436 |
int index = 0;
|
| 23858 |
ashik.ali |
437 |
for (int roleId : roleIds) {
|
|
|
438 |
roleIdsString[index++] = String.valueOf(roleId);
|
| 21414 |
kshitij.so |
439 |
}
|
| 23858 |
ashik.ali |
440 |
responseMap.put(ProfitMandiConstants.TOKEN, JWTUtil.create(user.getId(), retailerId, roleIdsString));
|
| 21414 |
kshitij.so |
441 |
responseMap.put(ProfitMandiConstants.REGISTERED, true);
|
| 25366 |
tejbeer |
442 |
} else {
|
| 21469 |
amit.gupta |
443 |
responseMap.put(ProfitMandiConstants.TOKEN, JWTUtil.create(emailId));
|
| 21414 |
kshitij.so |
444 |
responseMap.put(ProfitMandiConstants.REGISTERED, false);
|
|
|
445 |
}
|
| 21448 |
ashik.ali |
446 |
return responseSender.ok(responseMap);
|
| 21469 |
amit.gupta |
447 |
|
| 21414 |
kshitij.so |
448 |
}
|
| 25366 |
tejbeer |
449 |
|
| 25300 |
tejbeer |
450 |
@RequestMapping(value = "/mobileappsettings", method = RequestMethod.POST)
|
| 25366 |
tejbeer |
451 |
public ResponseEntity<?> mobileAppSettings(HttpServletRequest request, @RequestParam(name = "t") int timestamp,
|
|
|
452 |
@RequestParam(name = "imeinumber") String imeinumber)
|
|
|
453 |
throws ProfitMandiBusinessException, ClientProtocolException, IOException {
|
|
|
454 |
|
|
|
455 |
final String uri = "http://api.profittill.com/mobileappsettings?t=" + timestamp + "&imeinumber=" + imeinumber;
|
| 25300 |
tejbeer |
456 |
final String BASIC_AUTH = "Basic " + Base64.getEncoder().encodeToString("dtr:dtr18Feb2015".getBytes());
|
|
|
457 |
Map<String, String> headers = new HashMap<>();
|
|
|
458 |
Map<String, String> params = new HashMap<>();
|
|
|
459 |
headers.put("Authorization", BASIC_AUTH);
|
|
|
460 |
return responseSender.ok(restClient.post(uri, params, headers));
|
|
|
461 |
}
|
| 22032 |
ashik.ali |
462 |
|
| 25366 |
tejbeer |
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 |
}
|
| 21248 |
ashik.ali |
585 |
}
|