| Line 49... |
Line 49... |
| 49 |
import com.spice.profitmandi.dao.entity.dtr.Role;
|
49 |
import com.spice.profitmandi.dao.entity.dtr.Role;
|
| 50 |
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;
|
51 |
import com.spice.profitmandi.dao.entity.dtr.UserAccount;
|
| 52 |
import com.spice.profitmandi.dao.entity.dtr.UserRole;
|
52 |
import com.spice.profitmandi.dao.entity.dtr.UserRole;
|
| 53 |
import com.spice.profitmandi.dao.entity.user.Address;
|
53 |
import com.spice.profitmandi.dao.entity.user.Address;
|
| - |
|
54 |
import com.spice.profitmandi.dao.entity.user.Promoter;
|
| - |
|
55 |
import com.spice.profitmandi.dao.entity.user.Refferal;
|
| 54 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
56 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
| 55 |
import com.spice.profitmandi.dao.model.UserCart;
|
57 |
import com.spice.profitmandi.dao.model.UserCart;
|
| 56 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
58 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
| - |
|
59 |
import com.spice.profitmandi.dao.repository.dtr.RefferalRepository;
|
| 57 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
|
60 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
|
| 58 |
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
|
61 |
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
|
| 59 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
62 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
| 60 |
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
|
63 |
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
|
| 61 |
import com.spice.profitmandi.dao.repository.dtr.UserRoleRepository;
|
64 |
import com.spice.profitmandi.dao.repository.dtr.UserRoleRepository;
|
| 62 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
65 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
| - |
|
66 |
import com.spice.profitmandi.dao.repository.user.PromoterRepository;
|
| 63 |
import com.spice.profitmandi.service.AuthService;
|
67 |
import com.spice.profitmandi.service.AuthService;
|
| 64 |
import com.spice.profitmandi.service.authentication.RoleManager;
|
68 |
import com.spice.profitmandi.service.authentication.RoleManager;
|
| 65 |
import com.spice.profitmandi.service.user.RetailerService;
|
69 |
import com.spice.profitmandi.service.user.RetailerService;
|
| 66 |
import com.spice.profitmandi.service.user.UserService;
|
70 |
import com.spice.profitmandi.service.user.UserService;
|
| 67 |
import com.spice.profitmandi.web.enumuration.UserStatus;
|
71 |
import com.spice.profitmandi.web.enumuration.UserStatus;
|
| 68 |
import com.spice.profitmandi.web.processor.GoogleLoginProcessor;
|
72 |
import com.spice.profitmandi.web.processor.GoogleLoginProcessor;
|
| - |
|
73 |
import com.spice.profitmandi.web.req.CreateAddMoneyRequest;
|
| - |
|
74 |
import com.spice.profitmandi.web.req.CreateRefferalRequest;
|
| 69 |
import com.spice.profitmandi.web.req.UserRequest;
|
75 |
import com.spice.profitmandi.web.req.UserRequest;
|
| 70 |
import com.spice.profitmandi.web.res.Notification;
|
76 |
import com.spice.profitmandi.web.res.Notification;
|
| 71 |
import com.spice.profitmandi.web.res.Partner;
|
77 |
import com.spice.profitmandi.web.res.Partner;
|
| 72 |
|
78 |
|
| 73 |
import io.swagger.annotations.ApiImplicitParam;
|
79 |
import io.swagger.annotations.ApiImplicitParam;
|
| Line 135... |
Line 141... |
| 135 |
private AuthRepository authRepository;
|
141 |
private AuthRepository authRepository;
|
| 136 |
|
142 |
|
| 137 |
@Autowired
|
143 |
@Autowired
|
| 138 |
private RetailerService retailerService;
|
144 |
private RetailerService retailerService;
|
| 139 |
|
145 |
|
| - |
|
146 |
@Autowired
|
| - |
|
147 |
private RefferalRepository refferalRepository;
|
| - |
|
148 |
|
| - |
|
149 |
@Autowired
|
| - |
|
150 |
private PromoterRepository promoterRepository;
|
| - |
|
151 |
|
| 140 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_GOOGLE_LOGIN, method = RequestMethod.POST)
|
152 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_GOOGLE_LOGIN, method = RequestMethod.POST)
|
| 141 |
public ResponseEntity<?> googleLogin(HttpServletRequest request, @RequestBody GoogleLoginRequest googleLoginRequest)
|
153 |
public ResponseEntity<?> googleLogin(HttpServletRequest request, @RequestBody GoogleLoginRequest googleLoginRequest)
|
| 142 |
throws ProfitMandiBusinessException {
|
154 |
throws ProfitMandiBusinessException {
|
| 143 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
155 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| 144 |
Map<String, Object> resultMap = googleLoginProcessor.process(googleLoginRequest);
|
156 |
Map<String, Object> resultMap = googleLoginProcessor.process(googleLoginRequest);
|
| Line 310... |
Line 322... |
| 310 |
int userId = (int) request.getAttribute("userId");
|
322 |
int userId = (int) request.getAttribute("userId");
|
| 311 |
UserCart uc = userAccountRepository.getUserCart(userId);
|
323 |
UserCart uc = userAccountRepository.getUserCart(userId);
|
| 312 |
return responseSender.ok(userService.updateActivation(userId, uc.getUserId(), activationCode));
|
324 |
return responseSender.ok(userService.updateActivation(userId, uc.getUserId(), activationCode));
|
| 313 |
}
|
325 |
}
|
| 314 |
|
326 |
|
| - |
|
327 |
/*
|
| 315 |
/*@ApiImplicitParams({
|
328 |
* @ApiImplicitParams({
|
| - |
|
329 |
*
|
| 316 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
330 |
* @ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true,
|
| - |
|
331 |
* dataType = "string", paramType = "header") })
|
| - |
|
332 |
*
|
| 317 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_NOTIFICATIONS, method = RequestMethod.GET)
|
333 |
* @RequestMapping(value = ProfitMandiConstants.URL_USER_NOTIFICATIONS, method =
|
| - |
|
334 |
* RequestMethod.GET) public ResponseEntity<?>
|
| 318 |
public ResponseEntity<?> getNofitications(HttpServletRequest request,
|
335 |
* getNofitications(HttpServletRequest request,
|
| - |
|
336 |
*
|
| 319 |
@RequestParam(name = "androidId") String androidId, @RequestParam(name = "pageNumber") int pageNumber,
|
337 |
* @RequestParam(name = "androidId") String androidId, @RequestParam(name =
|
| - |
|
338 |
* "pageNumber") int pageNumber,
|
| - |
|
339 |
*
|
| 320 |
@RequestParam(name = "pageSize") int pageSize) throws ProfitMandiBusinessException {
|
340 |
* @RequestParam(name = "pageSize") int pageSize) throws
|
| 321 |
int userId = (int) request.getAttribute("userId");
|
341 |
* ProfitMandiBusinessException { int userId = (int)
|
| 322 |
String restResponse = null;
|
342 |
* request.getAttribute("userId"); String restResponse = null; Map<String,
|
| 323 |
Map<String, String> params = new HashMap<>();
|
343 |
* String> params = new HashMap<>();
|
| 324 |
|
344 |
*
|
| 325 |
String uri = "/getAllNotifications";
|
345 |
* String uri = "/getAllNotifications"; params.put("user_id", userId + "");
|
| 326 |
params.put("user_id", userId + "");
|
- |
|
| 327 |
params.put("android_id", androidId);
|
346 |
* params.put("android_id", androidId); params.put("limit", pageSize + "");
|
| 328 |
params.put("limit", pageSize + "");
|
- |
|
| 329 |
params.put("offset", "" + ((pageNumber - 1) * pageSize));
|
347 |
* params.put("offset", "" + ((pageNumber - 1) * pageSize)); try { restResponse
|
| 330 |
try {
|
- |
|
| 331 |
restResponse = restClient.get(SchemeType.HTTP, nodeHost, nodePort, uri, params);
|
348 |
* = restClient.get(SchemeType.HTTP, nodeHost, nodePort, uri, params); } catch
|
| 332 |
} catch (HttpHostConnectException e) {
|
349 |
* (HttpHostConnectException e) { throw new ProfitMandiBusinessException("", "",
|
| 333 |
throw new ProfitMandiBusinessException("", "", "Could not Connect to host");
|
350 |
* "Could not Connect to host"); }
|
| 334 |
}
|
351 |
*
|
| 335 |
|
- |
|
| 336 |
JsonArray result_json = Json.parse(restResponse).asArray();
|
352 |
* JsonArray result_json = Json.parse(restResponse).asArray();
|
| 337 |
|
353 |
*
|
| 338 |
List<Notification> notifications = new ArrayList<>();
|
354 |
* List<Notification> notifications = new ArrayList<>();
|
| 339 |
|
355 |
*
|
| 340 |
for (JsonValue j : result_json) {
|
356 |
* for (JsonValue j : result_json) {
|
| 341 |
notifications.add(toNotifiaction(j.asObject()));
|
357 |
* notifications.add(toNotifiaction(j.asObject())); }
|
| 342 |
}
|
358 |
*
|
| 343 |
|
- |
|
| 344 |
return responseSender.ok(notifications);
|
359 |
* return responseSender.ok(notifications); }
|
| 345 |
}
|
360 |
*
|
| 346 |
|
- |
|
| 347 |
private Notification toNotifiaction(JsonObject jsonObject) {
|
361 |
* private Notification toNotifiaction(JsonObject jsonObject) { Notification n =
|
| 348 |
Notification n = (Notification) (new Gson().fromJson(jsonObject.toString(), Notification.class));
|
362 |
* (Notification) (new Gson().fromJson(jsonObject.toString(),
|
| - |
|
363 |
* Notification.class)); if (n.getStatus().equals("opened") ||
|
| 349 |
if (n.getStatus().equals("opened") || n.getStatus().equals("referrer") || n.getStatus().equals("seen")) {
|
364 |
* n.getStatus().equals("referrer") || n.getStatus().equals("seen")) {
|
| 350 |
n.setSeen(true);
|
365 |
* n.setSeen(true); } return n; }
|
| 351 |
}
|
- |
|
| 352 |
return n;
|
- |
|
| 353 |
}*/
|
366 |
*/
|
| 354 |
|
367 |
|
| 355 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_IS_EXIST_MOBILE_NUMBER, method = RequestMethod.GET)
|
368 |
@RequestMapping(value = ProfitMandiConstants.URL_USER_IS_EXIST_MOBILE_NUMBER, method = RequestMethod.GET)
|
| 356 |
public ResponseEntity<?> isMobileNumberExist(HttpServletRequest request,
|
369 |
public ResponseEntity<?> isMobileNumberExist(HttpServletRequest request,
|
| 357 |
@RequestParam(name = "mobileNumber") String mobileNumber) {
|
370 |
@RequestParam(name = "mobileNumber") String mobileNumber) {
|
| 358 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
371 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
| Line 482... |
Line 495... |
| 482 |
}
|
495 |
}
|
| 483 |
storeGuyMap.remove("");
|
496 |
storeGuyMap.remove("");
|
| 484 |
|
497 |
|
| 485 |
List<String> emails = storeGuyMap.get(authUser.getEmailId());
|
498 |
List<String> emails = storeGuyMap.get(authUser.getEmailId());
|
| 486 |
LOGGER.info("emails" + emails);
|
499 |
LOGGER.info("emails" + emails);
|
| 487 |
List<User> users = userRepository.selectAllByEmails(emails,offset,limit);
|
500 |
List<User> users = userRepository.selectAllByEmails(emails, offset, limit);
|
| 488 |
List<Partner> partners = new ArrayList<>();
|
501 |
List<Partner> partners = new ArrayList<>();
|
| 489 |
for (User user : users) {
|
502 |
for (User user : users) {
|
| 490 |
|
503 |
|
| 491 |
UserAccount uc = userAccountRepository.selectSaholicByUserId(user.getId());
|
504 |
UserAccount uc = userAccountRepository.selectSaholicByUserId(user.getId());
|
| 492 |
com.spice.profitmandi.dao.entity.user.User userInfo = userUserRepository.selectById(uc.getAccountKey());
|
505 |
com.spice.profitmandi.dao.entity.user.User userInfo = userUserRepository.selectById(uc.getAccountKey());
|
| 493 |
CustomRetailer customRetailer = retailerService.getFofoRetailer(userInfo.getId());
|
506 |
CustomRetailer customRetailer = retailerService.getFofoRetailer(userInfo.getId());
|
| 494 |
|
507 |
|
| 495 |
Partner partner = new Partner();
|
508 |
Partner partner = new Partner();
|
| 496 |
partner.setBusinessName(customRetailer.getBusinessName());
|
509 |
partner.setBusinessName(customRetailer.getBusinessName());
|
| 497 |
partner.setPartnerId(customRetailer.getPartnerId());
|
510 |
partner.setPartnerId(customRetailer.getPartnerId());
|
| Line 523... |
Line 536... |
| 523 |
nameEmail.put("Ankit", "ankit.bhatia@smartdukaan.com");
|
536 |
nameEmail.put("Ankit", "ankit.bhatia@smartdukaan.com");
|
| 524 |
nameEmail.put("Rajit", "rajit.alag@smartdukaan.com");
|
537 |
nameEmail.put("Rajit", "rajit.alag@smartdukaan.com");
|
| 525 |
nameEmail.put("Gulshan", "gulshan.kumar@smartdukaan.com");
|
538 |
nameEmail.put("Gulshan", "gulshan.kumar@smartdukaan.com");
|
| 526 |
nameEmail.put("PramodSharma", "parmod.sharma@smartdukaan.com");
|
539 |
nameEmail.put("PramodSharma", "parmod.sharma@smartdukaan.com");
|
| 527 |
// nameEmail.put("Gulshan","");
|
540 |
// nameEmail.put("Gulshan","");
|
| - |
|
541 |
storeManagerMap.put("themobileplanet03@gmail.com",
|
| 528 |
storeManagerMap.put("themobileplanet03@gmail.com", Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
542 |
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"));
|
543 |
storeManagerMap.put("mobileplanet7599@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com",
|
| - |
|
544 |
"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"));
|
545 |
storeManagerMap.put("robintelecom.snp@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com",
|
| - |
|
546 |
"dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
547 |
storeManagerMap.put("smartconnect4141@gmail.com",
|
| 531 |
storeManagerMap.put("smartconnect4141@gmail.com", Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
548 |
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"));
|
549 |
storeManagerMap.put("bhimsain919@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com",
|
| - |
|
550 |
"dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
551 |
storeManagerMap.put("babitaranirk@gmail.com",
|
| 533 |
storeManagerMap.put("babitaranirk@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "", "mohinder.mutreja@smartdukaan.com"));
|
552 |
Arrays.asList("parmod.sharma@smartdukaan.com", "", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
553 |
storeManagerMap.put("dharmendery079@gmail.com",
|
| 534 |
storeManagerMap.put("dharmendery079@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
554 |
Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
555 |
storeManagerMap.put("kkv.enterprises1@gmail.com",
|
| 535 |
storeManagerMap.put("kkv.enterprises1@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "", "mohinder.mutreja@smartdukaan.com"));
|
556 |
Arrays.asList("parmod.sharma@smartdukaan.com", "", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
557 |
storeManagerMap.put("gulshersaifi74226@gmail.com",
|
| 536 |
storeManagerMap.put("gulshersaifi74226@gmail.com", Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
558 |
Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
559 |
storeManagerMap.put("deepak.lalwani1985@gmail.com",
|
| 537 |
storeManagerMap.put("deepak.lalwani1985@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
560 |
Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
561 |
storeManagerMap.put("gupta.smartdukaan@gmail.com",
|
| 538 |
storeManagerMap.put("gupta.smartdukaan@gmail.com", Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
562 |
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"));
|
563 |
storeManagerMap.put("sachinindri2006@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com",
|
| - |
|
564 |
"dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
565 |
storeManagerMap.put("kambojanil83@gmail.com",
|
| 540 |
storeManagerMap.put("kambojanil83@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "", "mohinder.mutreja@smartdukaan.com"));
|
566 |
Arrays.asList("parmod.sharma@smartdukaan.com", "", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
567 |
storeManagerMap.put("uppal.neeraj82@gmail.com",
|
| 541 |
storeManagerMap.put("uppal.neeraj82@gmail.com", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
568 |
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"));
|
569 |
storeManagerMap.put("thefonehousekarnal@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com",
|
| - |
|
570 |
"dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
571 |
storeManagerMap.put("richa9910763006@gmail.com",
|
| 543 |
storeManagerMap.put("richa9910763006@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
572 |
Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
573 |
storeManagerMap.put("smartdukangzb@gmail.com",
|
| 544 |
storeManagerMap.put("smartdukangzb@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
574 |
Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
575 |
storeManagerMap.put("lovelymobile183@gmail.com",
|
| 545 |
storeManagerMap.put("lovelymobile183@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
576 |
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"));
|
577 |
storeManagerMap.put("smartdukaan.sonepat@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com",
|
| - |
|
578 |
"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"));
|
579 |
storeManagerMap.put("arunmittal299@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com",
|
| - |
|
580 |
"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"));
|
581 |
storeManagerMap.put("gtc01100@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com",
|
| - |
|
582 |
"dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
583 |
storeManagerMap.put("sumittyagi1975@gmail.com",
|
| 549 |
storeManagerMap.put("sumittyagi1975@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
584 |
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"));
|
585 |
storeManagerMap.put("metrofurniture342@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com",
|
| - |
|
586 |
"dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
587 |
storeManagerMap.put("suryaelectronicskaithal@gmail.com",
|
| 551 |
storeManagerMap.put("suryaelectronicskaithal@gmail.com", Arrays.asList("Parmod", "", "mohinder.mutreja@smartdukaan.com"));
|
588 |
Arrays.asList("Parmod", "", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
589 |
storeManagerMap.put("mmtelecomsec16@gmail.com",
|
| 552 |
storeManagerMap.put("mmtelecomsec16@gmail.com", Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
590 |
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"));
|
591 |
storeManagerMap.put("omsonsindia08@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com",
|
| - |
|
592 |
"dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
593 |
storeManagerMap.put("smartenterprisespv@gmail.com",
|
| 554 |
storeManagerMap.put("smartenterprisespv@gmail.com", Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
594 |
Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
595 |
storeManagerMap.put("cachaitnya@gmail.com",
|
| 555 |
storeManagerMap.put("cachaitnya@gmail.com", Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
596 |
Arrays.asList("amod.sen@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
597 |
storeManagerMap.put("ajaykumarkansal03@gmail.com",
|
| 556 |
storeManagerMap.put("ajaykumarkansal03@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
598 |
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"));
|
599 |
storeManagerMap.put("spurwar73@gmail.com", Arrays.asList("md.anis@smartdukaan.com",
|
| - |
|
600 |
"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"));
|
601 |
storeManagerMap.put("Shreemobile.ind@gmail.com", Arrays.asList("md.anis@smartdukaan.com",
|
| - |
|
602 |
"rajat.gupta@smartdukaan.com", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
603 |
storeManagerMap.put("felixenterprises2017@rediffmail.com",
|
| 559 |
storeManagerMap.put("felixenterprises2017@rediffmail.com", Arrays.asList("", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
604 |
Arrays.asList("", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
605 |
storeManagerMap.put("nareandergupta@gmail.com",
|
| 560 |
storeManagerMap.put("nareandergupta@gmail.com", Arrays.asList("", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
606 |
Arrays.asList("", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
607 |
storeManagerMap.put("shreebalajielectronic2019@gmail.com",
|
| 561 |
storeManagerMap.put("shreebalajielectronic2019@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
608 |
Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
609 |
storeManagerMap.put("saranshary@gmail.com",
|
| 562 |
storeManagerMap.put("saranshary@gmail.com", Arrays.asList("", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
610 |
Arrays.asList("", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
611 |
storeManagerMap.put("gambhirsmartphone@gmail.com",
|
| 563 |
storeManagerMap.put("gambhirsmartphone@gmail.com", Arrays.asList("", "gulshan.kumar@smartdukaan.com", "adeel.yazdani@smartdukaan.com"));
|
612 |
Arrays.asList("", "gulshan.kumar@smartdukaan.com", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
613 |
storeManagerMap.put("Priyankaenterprises9910@gmail.com",
|
| 564 |
storeManagerMap.put("Priyankaenterprises9910@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
614 |
Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
615 |
storeManagerMap.put("pawan.dhimaan@gmail.com",
|
| 565 |
storeManagerMap.put("pawan.dhimaan@gmail.com", Arrays.asList("", "dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
616 |
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"));
|
617 |
storeManagerMap.put("lakshaydhulla62@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com",
|
| - |
|
618 |
"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"));
|
619 |
storeManagerMap.put("parastelecom.stp@gmail.com", Arrays.asList("md.anis@smartdukaan.com",
|
| - |
|
620 |
"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"));
|
621 |
storeManagerMap.put("talwarmukesh298@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com",
|
| - |
|
622 |
"dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
623 |
storeManagerMap.put("sahilnarang0009@gmail.com",
|
| 569 |
storeManagerMap.put("sahilnarang0009@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com", "", "mohinder.mutreja@smartdukaan.com"));
|
624 |
Arrays.asList("parmod.sharma@smartdukaan.com", "", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
625 |
storeManagerMap.put("supertelecomjind@gmail.com",
|
| 570 |
storeManagerMap.put("supertelecomjind@gmail.com", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
626 |
Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
627 |
storeManagerMap.put("saketnagpal@gmail.com",
|
| 571 |
storeManagerMap.put("saketnagpal@gmail.com", Arrays.asList("", "rajit.alag@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
628 |
Arrays.asList("", "rajit.alag@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
629 |
storeManagerMap.put("DEEPAKGOYAL702.DG@GMAIL.COM",
|
| 572 |
storeManagerMap.put("DEEPAKGOYAL702.DG@GMAIL.COM", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
630 |
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"));
|
631 |
storeManagerMap.put("sambhav350@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com",
|
| - |
|
632 |
"dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
633 |
storeManagerMap.put("mayankarora98133@gmail.com",
|
| 574 |
storeManagerMap.put("mayankarora98133@gmail.com", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
634 |
Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
635 |
storeManagerMap.put("vijaymobilityandmoew@gmail.com",
|
| 575 |
storeManagerMap.put("vijaymobilityandmoew@gmail.com", Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
636 |
Arrays.asList("manoj.singh@smartdukaan.com", "", "adeel.yazdani@smartdukaan.com"));
|
| - |
|
637 |
storeManagerMap.put("amitv70003@gmail.com",
|
| 576 |
storeManagerMap.put("amitv70003@gmail.com", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
638 |
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"));
|
639 |
storeManagerMap.put("newagelucknow.123@gmail.com", Arrays.asList("md.anis@smartdukaan.com",
|
| - |
|
640 |
"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"));
|
641 |
storeManagerMap.put("Newagetechnologygomtinagar@gmail.com", Arrays.asList("md.anis@smartdukaan.com",
|
| - |
|
642 |
"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"));
|
643 |
storeManagerMap.put("rohitbatra106@gmail.com", Arrays.asList("parmod.sharma@smartdukaan.com",
|
| - |
|
644 |
"dharmender.verma@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
645 |
storeManagerMap.put("sonisunil9050873061@gmail.com",
|
| 580 |
storeManagerMap.put("sonisunil9050873061@gmail.com", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
646 |
Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
647 |
storeManagerMap.put("moderncohsr@gmail.com",
|
| 581 |
storeManagerMap.put("moderncohsr@gmail.com", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
648 |
Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
649 |
storeManagerMap.put("raghubir.ngh@gmail.com",
|
| 582 |
storeManagerMap.put("raghubir.ngh@gmail.com", Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
650 |
Arrays.asList("", "ankit.bhatia@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
651 |
storeManagerMap.put("aman007singla@gmail.com",
|
| 583 |
storeManagerMap.put("aman007singla@gmail.com", Arrays.asList("", "rajit.alag@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
652 |
Arrays.asList("", "rajit.alag@smartdukaan.com", "mohinder.mutreja@smartdukaan.com"));
|
| - |
|
653 |
}
|
| - |
|
654 |
|
| - |
|
655 |
@RequestMapping(value = "/user/refferal", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE)
|
| - |
|
656 |
@ApiImplicitParams({
|
| - |
|
657 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
| - |
|
658 |
public ResponseEntity<?> RefferalUser(HttpServletRequest request,
|
| - |
|
659 |
@RequestBody CreateRefferalRequest createRefferalRequest) throws Exception {
|
| - |
|
660 |
Refferal refferal = new Refferal();
|
| - |
|
661 |
refferal.setFirstName(createRefferalRequest.getFirstName());
|
| - |
|
662 |
refferal.setLastName(createRefferalRequest.getLastName());
|
| - |
|
663 |
refferal.setMobile(createRefferalRequest.getMobile());
|
| - |
|
664 |
refferal.setState(createRefferalRequest.getState());
|
| - |
|
665 |
refferal.setCity(createRefferalRequest.getCity());
|
| - |
|
666 |
refferal.setCreatedTimestamp(LocalDateTime.now());
|
| - |
|
667 |
refferal.setUpdatedTimestamp(LocalDateTime.now());
|
| - |
|
668 |
refferal.setStatus("pending");
|
| - |
|
669 |
if (createRefferalRequest.isFofoAssociate()) {
|
| - |
|
670 |
AuthUser authUser = authRepository.selectByGmailId(createRefferalRequest.getReffereeEmail());
|
| - |
|
671 |
if (authUser==null) {
|
| - |
|
672 |
Promoter promoter = promoterRepository.selectByEmailId(createRefferalRequest.getReffereeEmail());
|
| - |
|
673 |
refferal.setRefereeName(promoter.getName());
|
| - |
|
674 |
refferal.setReffereeEmail(promoter.getEmail());
|
| - |
|
675 |
refferal.setRefereeMobile(promoter.getMobile());
|
| - |
|
676 |
} else {
|
| - |
|
677 |
refferal.setRefereeName(authUser.getFirstName());
|
| - |
|
678 |
refferal.setReffereeEmail(authUser.getGmailId());
|
| - |
|
679 |
refferal.setRefereeMobile(authUser.getMobileNumber());
|
| - |
|
680 |
}
|
| - |
|
681 |
} else {
|
| - |
|
682 |
User user = userRepository.selectByEmailId(createRefferalRequest.getReffereeEmail());
|
| - |
|
683 |
refferal.setRefereeName(user.getFirstName());
|
| - |
|
684 |
refferal.setReffereeEmail(user.getEmailId());
|
| - |
|
685 |
refferal.setRefereeMobile(user.getMobileNumber());
|
| - |
|
686 |
}
|
| - |
|
687 |
|
| - |
|
688 |
refferalRepository.persist(refferal);
|
| - |
|
689 |
return responseSender.ok(true);
|
| 584 |
}
|
690 |
}
|
| 585 |
}
|
691 |
}
|