| 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.LocalDate;
|
- |
|
| 5 |
import java.time.LocalDateTime;
|
4 |
import java.time.LocalDateTime;
|
| 6 |
import java.time.Period;
|
- |
|
| 7 |
import java.time.Year;
|
- |
|
| 8 |
import java.time.YearMonth;
|
- |
|
| 9 |
import java.util.ArrayList;
|
5 |
import java.util.ArrayList;
|
| 10 |
import java.util.Arrays;
|
6 |
import java.util.Arrays;
|
| 11 |
import java.util.Base64;
|
7 |
import java.util.Base64;
|
| 12 |
import java.util.HashMap;
|
8 |
import java.util.HashMap;
|
| 13 |
import java.util.HashSet;
|
9 |
import java.util.HashSet;
|
| 14 |
import java.util.List;
|
10 |
import java.util.List;
|
| 15 |
import java.util.Map;
|
11 |
import java.util.Map;
|
| 16 |
import java.util.Set;
|
12 |
import java.util.Set;
|
| 17 |
import java.util.stream.Collectors;
|
- |
|
| 18 |
|
13 |
|
| 19 |
import javax.servlet.http.HttpServletRequest;
|
14 |
import javax.servlet.http.HttpServletRequest;
|
| 20 |
|
15 |
|
| 21 |
import org.apache.http.client.ClientProtocolException;
|
16 |
import org.apache.http.client.ClientProtocolException;
|
| 22 |
import org.apache.http.conn.HttpHostConnectException;
|
- |
|
| 23 |
import org.apache.logging.log4j.LogManager;
|
17 |
import org.apache.logging.log4j.LogManager;
|
| 24 |
import org.apache.logging.log4j.Logger;
|
18 |
import org.apache.logging.log4j.Logger;
|
| 25 |
import org.springframework.beans.factory.annotation.Autowired;
|
19 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 26 |
import org.springframework.beans.factory.annotation.Value;
|
20 |
import org.springframework.beans.factory.annotation.Value;
|
| 27 |
import org.springframework.http.MediaType;
|
21 |
import org.springframework.http.MediaType;
|
| Line 31... |
Line 25... |
| 31 |
import org.springframework.web.bind.annotation.RequestBody;
|
25 |
import org.springframework.web.bind.annotation.RequestBody;
|
| 32 |
import org.springframework.web.bind.annotation.RequestMapping;
|
26 |
import org.springframework.web.bind.annotation.RequestMapping;
|
| 33 |
import org.springframework.web.bind.annotation.RequestMethod;
|
27 |
import org.springframework.web.bind.annotation.RequestMethod;
|
| 34 |
import org.springframework.web.bind.annotation.RequestParam;
|
28 |
import org.springframework.web.bind.annotation.RequestParam;
|
| 35 |
|
29 |
|
| 36 |
import com.eclipsesource.json.Json;
|
- |
|
| 37 |
import com.eclipsesource.json.JsonArray;
|
- |
|
| 38 |
import com.eclipsesource.json.JsonObject;
|
- |
|
| 39 |
import com.eclipsesource.json.JsonValue;
|
- |
|
| 40 |
import com.google.gson.Gson;
|
- |
|
| 41 |
import com.spice.profitmandi.common.ResponseCodeHolder;
|
30 |
import com.spice.profitmandi.common.ResponseCodeHolder;
|
| 42 |
import com.spice.profitmandi.common.enumuration.SchemeType;
|
- |
|
| 43 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
31 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 44 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
32 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
| 45 |
import com.spice.profitmandi.common.model.GoogleLoginRequest;
|
33 |
import com.spice.profitmandi.common.model.GoogleLoginRequest;
|
| 46 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
34 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 47 |
import com.spice.profitmandi.common.model.RegisteredUserInfo;
|
35 |
import com.spice.profitmandi.common.model.RegisteredUserInfo;
|
| Line 56... |
Line 44... |
| 56 |
import com.spice.profitmandi.dao.entity.dtr.UserAccount;
|
44 |
import com.spice.profitmandi.dao.entity.dtr.UserAccount;
|
| 57 |
import com.spice.profitmandi.dao.entity.dtr.UserRole;
|
45 |
import com.spice.profitmandi.dao.entity.dtr.UserRole;
|
| 58 |
import com.spice.profitmandi.dao.entity.user.Address;
|
46 |
import com.spice.profitmandi.dao.entity.user.Address;
|
| 59 |
import com.spice.profitmandi.dao.entity.user.Promoter;
|
47 |
import com.spice.profitmandi.dao.entity.user.Promoter;
|
| 60 |
import com.spice.profitmandi.dao.entity.user.Refferal;
|
48 |
import com.spice.profitmandi.dao.entity.user.Refferal;
|
| 61 |
import com.spice.profitmandi.dao.enumuration.dtr.RefferalStatus;
|
- |
|
| 62 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
49 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
| 63 |
import com.spice.profitmandi.dao.model.DateRangeModel;
|
- |
|
| 64 |
import com.spice.profitmandi.dao.model.UserCart;
|
50 |
import com.spice.profitmandi.dao.model.UserCart;
|
| 65 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
51 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
| 66 |
import com.spice.profitmandi.dao.repository.dtr.RefferalRepository;
|
52 |
import com.spice.profitmandi.dao.repository.dtr.RefferalRepository;
|
| 67 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
|
53 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
|
| 68 |
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
|
54 |
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
|
| Line 75... |
Line 61... |
| 75 |
import com.spice.profitmandi.service.authentication.RoleManager;
|
61 |
import com.spice.profitmandi.service.authentication.RoleManager;
|
| 76 |
import com.spice.profitmandi.service.user.RetailerService;
|
62 |
import com.spice.profitmandi.service.user.RetailerService;
|
| 77 |
import com.spice.profitmandi.service.user.UserService;
|
63 |
import com.spice.profitmandi.service.user.UserService;
|
| 78 |
import com.spice.profitmandi.web.enumuration.UserStatus;
|
64 |
import com.spice.profitmandi.web.enumuration.UserStatus;
|
| 79 |
import com.spice.profitmandi.web.processor.GoogleLoginProcessor;
|
65 |
import com.spice.profitmandi.web.processor.GoogleLoginProcessor;
|
| 80 |
import com.spice.profitmandi.web.req.CreateAddMoneyRequest;
|
- |
|
| 81 |
import com.spice.profitmandi.web.req.CreateRefferalRequest;
|
66 |
import com.spice.profitmandi.web.req.CreateRefferalRequest;
|
| 82 |
import com.spice.profitmandi.web.req.UserRequest;
|
67 |
import com.spice.profitmandi.web.req.UserRequest;
|
| 83 |
import com.spice.profitmandi.web.res.Notification;
|
- |
|
| 84 |
import com.spice.profitmandi.web.res.Partner;
|
68 |
import com.spice.profitmandi.web.res.Partner;
|
| 85 |
|
69 |
|
| 86 |
import io.swagger.annotations.ApiImplicitParam;
|
70 |
import io.swagger.annotations.ApiImplicitParam;
|
| 87 |
import io.swagger.annotations.ApiImplicitParams;
|
71 |
import io.swagger.annotations.ApiImplicitParams;
|
| 88 |
|
72 |
|