| Line 24... |
Line 24... |
| 24 |
import java.util.stream.Collectors;
|
24 |
import java.util.stream.Collectors;
|
| 25 |
|
25 |
|
| 26 |
import javax.mail.MessagingException;
|
26 |
import javax.mail.MessagingException;
|
| 27 |
import javax.mail.internet.InternetAddress;
|
27 |
import javax.mail.internet.InternetAddress;
|
| 28 |
import javax.mail.internet.MimeMessage;
|
28 |
import javax.mail.internet.MimeMessage;
|
| 29 |
import javax.xml.bind.DatatypeConverter;
|
- |
|
| 30 |
|
29 |
|
| 31 |
import org.apache.commons.io.output.ByteArrayOutputStream;
|
30 |
import org.apache.commons.io.output.ByteArrayOutputStream;
|
| 32 |
import org.apache.commons.lang.StringUtils;
|
31 |
import org.apache.commons.lang.StringUtils;
|
| 33 |
import org.apache.http.client.methods.CloseableHttpResponse;
|
32 |
import org.apache.http.client.methods.CloseableHttpResponse;
|
| 34 |
import org.apache.http.client.methods.HttpPost;
|
33 |
import org.apache.http.client.methods.HttpPost;
|
| 35 |
import org.apache.http.entity.StringEntity;
|
34 |
import org.apache.http.entity.StringEntity;
|
| 36 |
import org.apache.http.impl.client.CloseableHttpClient;
|
35 |
import org.apache.http.impl.client.CloseableHttpClient;
|
| 37 |
import org.apache.http.impl.client.HttpClients;
|
36 |
import org.apache.http.impl.client.HttpClients;
|
| 38 |
import org.apache.logging.log4j.LogManager;
|
37 |
import org.apache.logging.log4j.LogManager;
|
| 39 |
import org.apache.logging.log4j.Logger;
|
38 |
import org.apache.logging.log4j.Logger;
|
| 40 |
import org.json.JSONArray;
|
- |
|
| 41 |
import org.json.JSONObject;
|
39 |
import org.json.JSONObject;
|
| 42 |
import org.springframework.beans.factory.annotation.Autowired;
|
40 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 43 |
import org.springframework.beans.factory.annotation.Qualifier;
|
41 |
import org.springframework.beans.factory.annotation.Qualifier;
|
| 44 |
import org.springframework.beans.factory.annotation.Value;
|
42 |
import org.springframework.beans.factory.annotation.Value;
|
| 45 |
import org.springframework.core.io.ByteArrayResource;
|
43 |
import org.springframework.core.io.ByteArrayResource;
|
| Line 49... |
Line 47... |
| 49 |
import org.springframework.stereotype.Component;
|
47 |
import org.springframework.stereotype.Component;
|
| 50 |
import org.springframework.transaction.annotation.Transactional;
|
48 |
import org.springframework.transaction.annotation.Transactional;
|
| 51 |
|
49 |
|
| 52 |
import com.google.common.collect.Lists;
|
50 |
import com.google.common.collect.Lists;
|
| 53 |
import com.google.gson.Gson;
|
51 |
import com.google.gson.Gson;
|
| 54 |
import com.google.gson.GsonBuilder;
|
- |
|
| 55 |
import com.razorpay.Payment;
|
52 |
import com.razorpay.Payment;
|
| 56 |
import com.razorpay.RazorpayException;
|
- |
|
| 57 |
import com.spice.profitmandi.common.enumuration.MessageType;
|
53 |
import com.spice.profitmandi.common.enumuration.MessageType;
|
| 58 |
import com.spice.profitmandi.common.enumuration.RechargeStatus;
|
54 |
import com.spice.profitmandi.common.enumuration.RechargeStatus;
|
| 59 |
import com.spice.profitmandi.common.enumuration.ReporticoProject;
|
55 |
import com.spice.profitmandi.common.enumuration.ReporticoProject;
|
| 60 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
56 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 61 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
57 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
| Line 70... |
Line 66... |
| 70 |
import com.spice.profitmandi.common.util.FormattingUtils;
|
66 |
import com.spice.profitmandi.common.util.FormattingUtils;
|
| 71 |
import com.spice.profitmandi.common.util.PdfUtils;
|
67 |
import com.spice.profitmandi.common.util.PdfUtils;
|
| 72 |
import com.spice.profitmandi.common.util.Utils;
|
68 |
import com.spice.profitmandi.common.util.Utils;
|
| 73 |
import com.spice.profitmandi.common.util.Utils.Attachment;
|
69 |
import com.spice.profitmandi.common.util.Utils.Attachment;
|
| 74 |
import com.spice.profitmandi.dao.Interface.Campaign;
|
70 |
import com.spice.profitmandi.dao.Interface.Campaign;
|
| 75 |
import com.spice.profitmandi.dao.convertor.LocalDateTimeJsonConverter;
|
- |
|
| 76 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
71 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
| 77 |
import com.spice.profitmandi.dao.entity.catalog.FocusedModel;
|
72 |
import com.spice.profitmandi.dao.entity.catalog.FocusedModel;
|
| 78 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
73 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
| 79 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
74 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
| 80 |
import com.spice.profitmandi.dao.entity.cs.Position;
|
75 |
import com.spice.profitmandi.dao.entity.cs.Position;
|
| Line 102... |
Line 97... |
| 102 |
import com.spice.profitmandi.dao.entity.fofo.RazorPay;
|
97 |
import com.spice.profitmandi.dao.entity.fofo.RazorPay;
|
| 103 |
import com.spice.profitmandi.dao.entity.fofo.ScanRecord;
|
98 |
import com.spice.profitmandi.dao.entity.fofo.ScanRecord;
|
| 104 |
import com.spice.profitmandi.dao.entity.fofo.SchemeInOut;
|
99 |
import com.spice.profitmandi.dao.entity.fofo.SchemeInOut;
|
| 105 |
import com.spice.profitmandi.dao.entity.inventory.SaholicCIS;
|
100 |
import com.spice.profitmandi.dao.entity.inventory.SaholicCIS;
|
| 106 |
import com.spice.profitmandi.dao.entity.inventory.SaholicPOItem;
|
101 |
import com.spice.profitmandi.dao.entity.inventory.SaholicPOItem;
|
| 107 |
import com.spice.profitmandi.dao.entity.transaction.Order;
|
- |
|
| 108 |
import com.spice.profitmandi.dao.entity.transaction.PriceDrop;
|
102 |
import com.spice.profitmandi.dao.entity.transaction.PriceDrop;
|
| 109 |
import com.spice.profitmandi.dao.entity.transaction.PriceDropIMEI;
|
103 |
import com.spice.profitmandi.dao.entity.transaction.PriceDropIMEI;
|
| 110 |
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
|
104 |
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
|
| 111 |
import com.spice.profitmandi.dao.entity.transaction.UserWalletHistory;
|
105 |
import com.spice.profitmandi.dao.entity.transaction.UserWalletHistory;
|
| 112 |
import com.spice.profitmandi.dao.entity.user.Address;
|
106 |
import com.spice.profitmandi.dao.entity.user.Address;
|
| Line 174... |
Line 168... |
| 174 |
import com.spice.profitmandi.dao.repository.transaction.PriceDropRepository;
|
168 |
import com.spice.profitmandi.dao.repository.transaction.PriceDropRepository;
|
| 175 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletHistoryRepository;
|
169 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletHistoryRepository;
|
| 176 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletRepository;
|
170 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletRepository;
|
| 177 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
171 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
| 178 |
import com.spice.profitmandi.dao.repository.user.UserRepository;
|
172 |
import com.spice.profitmandi.dao.repository.user.UserRepository;
|
| 179 |
import com.spice.profitmandi.service.EmailService;
|
- |
|
| 180 |
import com.spice.profitmandi.service.NotificationService;
|
173 |
import com.spice.profitmandi.service.NotificationService;
|
| 181 |
import com.spice.profitmandi.service.PartnerInvestmentService;
|
174 |
import com.spice.profitmandi.service.PartnerInvestmentService;
|
| 182 |
import com.spice.profitmandi.service.integrations.RazorpayPaymentService;
|
175 |
import com.spice.profitmandi.service.integrations.RazorpayPaymentService;
|
| 183 |
import com.spice.profitmandi.service.integrations.toffee.ToffeeService;
|
176 |
import com.spice.profitmandi.service.integrations.toffee.ToffeeService;
|
| 184 |
import com.spice.profitmandi.service.inventory.InventoryService;
|
177 |
import com.spice.profitmandi.service.inventory.InventoryService;
|
| Line 191... |
Line 184... |
| 191 |
import com.spice.profitmandi.service.transaction.TransactionService;
|
184 |
import com.spice.profitmandi.service.transaction.TransactionService;
|
| 192 |
import com.spice.profitmandi.service.user.RetailerService;
|
185 |
import com.spice.profitmandi.service.user.RetailerService;
|
| 193 |
import com.spice.profitmandi.service.wallet.WalletService;
|
186 |
import com.spice.profitmandi.service.wallet.WalletService;
|
| 194 |
|
187 |
|
| 195 |
import in.shop2020.model.v1.order.OrderStatus;
|
188 |
import in.shop2020.model.v1.order.OrderStatus;
|
| 196 |
import in.shop2020.model.v1.order.WalletReferenceType;
|
189 |
import in.shop2020.model.v1.order.WalletReferenceType;;
|
| 197 |
import okhttp3.OkHttpClient;
|
- |
|
| 198 |
import okhttp3.Request;
|
- |
|
| 199 |
import okhttp3.Response;;
|
- |
|
| 200 |
|
190 |
|
| 201 |
@Component
|
191 |
@Component
|
| 202 |
@Transactional(rollbackFor = Throwable.class)
|
192 |
@Transactional(rollbackFor = Throwable.class)
|
| 203 |
public class ScheduledTasks {
|
193 |
public class ScheduledTasks {
|
| 204 |
|
194 |
|