| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.web.controller;
|
1 |
package com.spice.profitmandi.web.controller;
|
| 2 |
|
2 |
|
| 3 |
import java.math.BigDecimal;
|
- |
|
| 4 |
import java.math.RoundingMode;
|
- |
|
| 5 |
import java.time.Duration;
|
- |
|
| 6 |
import java.time.LocalDate;
|
- |
|
| 7 |
import java.time.LocalDateTime;
|
- |
|
| 8 |
import java.util.ArrayList;
|
- |
|
| 9 |
import java.util.Arrays;
|
- |
|
| 10 |
import java.util.HashMap;
|
- |
|
| 11 |
import java.util.HashSet;
|
- |
|
| 12 |
import java.util.List;
|
- |
|
| 13 |
import java.util.Map;
|
- |
|
| 14 |
import java.util.Map.Entry;
|
- |
|
| 15 |
import java.util.Set;
|
- |
|
| 16 |
import java.util.stream.Collectors;
|
- |
|
| 17 |
|
- |
|
| 18 |
import javax.servlet.http.HttpServletRequest;
|
- |
|
| 19 |
import javax.transaction.Transactional;
|
- |
|
| 20 |
|
- |
|
| 21 |
import org.apache.logging.log4j.LogManager;
|
- |
|
| 22 |
import org.apache.logging.log4j.Logger;
|
- |
|
| 23 |
import org.springframework.beans.factory.annotation.Autowired;
|
- |
|
| 24 |
import org.springframework.mail.javamail.JavaMailSender;
|
- |
|
| 25 |
import org.springframework.stereotype.Controller;
|
- |
|
| 26 |
import org.springframework.ui.Model;
|
- |
|
| 27 |
import org.springframework.web.bind.annotation.RequestBody;
|
- |
|
| 28 |
import org.springframework.web.bind.annotation.RequestMapping;
|
- |
|
| 29 |
import org.springframework.web.bind.annotation.RequestMethod;
|
- |
|
| 30 |
import org.springframework.web.bind.annotation.RequestParam;
|
- |
|
| 31 |
|
- |
|
| 32 |
import com.spice.profitmandi.common.enumuration.MessageType;
|
3 |
import com.spice.profitmandi.common.enumuration.MessageType;
|
| 33 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
4 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 34 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
5 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
| 35 |
import com.spice.profitmandi.common.model.SendNotificationModel;
|
6 |
import com.spice.profitmandi.common.model.SendNotificationModel;
|
| 36 |
import com.spice.profitmandi.common.util.Utils;
|
7 |
import com.spice.profitmandi.common.util.Utils;
|
| Line 38... |
Line 9... |
| 38 |
import com.spice.profitmandi.dao.entity.dtr.CreditAccount;
|
9 |
import com.spice.profitmandi.dao.entity.dtr.CreditAccount;
|
| 39 |
import com.spice.profitmandi.dao.entity.dtr.CreditStatus;
|
10 |
import com.spice.profitmandi.dao.entity.dtr.CreditStatus;
|
| 40 |
import com.spice.profitmandi.dao.entity.fofo.CurrentPartnerDailyInvestment;
|
11 |
import com.spice.profitmandi.dao.entity.fofo.CurrentPartnerDailyInvestment;
|
| 41 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
12 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
| 42 |
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
|
13 |
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
|
| 43 |
import com.spice.profitmandi.dao.entity.transaction.Loan;
|
14 |
import com.spice.profitmandi.dao.entity.transaction.*;
|
| 44 |
import com.spice.profitmandi.dao.entity.transaction.Order;
|
- |
|
| 45 |
import com.spice.profitmandi.dao.entity.transaction.SDCreditRequirement;
|
- |
|
| 46 |
import com.spice.profitmandi.dao.entity.transaction.SanctionRequest;
|
- |
|
| 47 |
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
|
- |
|
| 48 |
import com.spice.profitmandi.dao.entity.user.Address;
|
15 |
import com.spice.profitmandi.dao.entity.user.Address;
|
| 49 |
import com.spice.profitmandi.dao.enumuration.fofo.Gateway;
|
16 |
import com.spice.profitmandi.dao.enumuration.fofo.Gateway;
|
| 50 |
import com.spice.profitmandi.dao.enumuration.transaction.SanctionStatus;
|
17 |
import com.spice.profitmandi.dao.enumuration.transaction.SanctionStatus;
|
| 51 |
import com.spice.profitmandi.dao.model.SDCreditResponseOut;
|
18 |
import com.spice.profitmandi.dao.model.SDCreditResponseOut;
|
| 52 |
import com.spice.profitmandi.dao.model.SanctionRequestModel;
|
19 |
import com.spice.profitmandi.dao.model.SanctionRequestModel;
|
| Line 56... |
Line 23... |
| 56 |
import com.spice.profitmandi.dao.repository.dtr.CreditAccountRepository;
|
23 |
import com.spice.profitmandi.dao.repository.dtr.CreditAccountRepository;
|
| 57 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
24 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
| 58 |
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
|
25 |
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
|
| 59 |
import com.spice.profitmandi.dao.repository.fofo.CurrentPartnerDailyInvestmentRepository;
|
26 |
import com.spice.profitmandi.dao.repository.fofo.CurrentPartnerDailyInvestmentRepository;
|
| 60 |
import com.spice.profitmandi.dao.repository.fofo.PartnerDailyInvestmentRepository;
|
27 |
import com.spice.profitmandi.dao.repository.fofo.PartnerDailyInvestmentRepository;
|
| 61 |
import com.spice.profitmandi.dao.repository.transaction.LoanRepository;
|
28 |
import com.spice.profitmandi.dao.repository.transaction.*;
|
| 62 |
import com.spice.profitmandi.dao.repository.transaction.LoanStatementRepository;
|
- |
|
| 63 |
import com.spice.profitmandi.dao.repository.transaction.OrderRepository;
|
- |
|
| 64 |
import com.spice.profitmandi.dao.repository.transaction.SDCreditRequirementRepository;
|
- |
|
| 65 |
import com.spice.profitmandi.dao.repository.transaction.SanctionRequestRepository;
|
- |
|
| 66 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletRepository;
|
- |
|
| 67 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
29 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
| 68 |
import com.spice.profitmandi.service.NotificationService;
|
30 |
import com.spice.profitmandi.service.NotificationService;
|
| 69 |
import com.spice.profitmandi.service.transaction.SDCreditService;
|
31 |
import com.spice.profitmandi.service.transaction.SDCreditService;
|
| 70 |
import com.spice.profitmandi.service.user.RetailerService;
|
32 |
import com.spice.profitmandi.service.user.RetailerService;
|
| 71 |
import com.spice.profitmandi.web.model.LoginDetails;
|
33 |
import com.spice.profitmandi.web.model.LoginDetails;
|
| 72 |
import com.spice.profitmandi.web.util.CookiesProcessor;
|
34 |
import com.spice.profitmandi.web.util.CookiesProcessor;
|
| 73 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
35 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
| - |
|
36 |
import org.apache.logging.log4j.LogManager;
|
| - |
|
37 |
import org.apache.logging.log4j.Logger;
|
| - |
|
38 |
import org.springframework.beans.factory.annotation.Autowired;
|
| - |
|
39 |
import org.springframework.mail.javamail.JavaMailSender;
|
| - |
|
40 |
import org.springframework.stereotype.Controller;
|
| - |
|
41 |
import org.springframework.ui.Model;
|
| - |
|
42 |
import org.springframework.web.bind.annotation.RequestBody;
|
| - |
|
43 |
import org.springframework.web.bind.annotation.RequestMapping;
|
| - |
|
44 |
import org.springframework.web.bind.annotation.RequestMethod;
|
| - |
|
45 |
import org.springframework.web.bind.annotation.RequestParam;
|
| - |
|
46 |
|
| - |
|
47 |
import javax.servlet.http.HttpServletRequest;
|
| - |
|
48 |
import javax.transaction.Transactional;
|
| - |
|
49 |
import java.math.BigDecimal;
|
| - |
|
50 |
import java.math.RoundingMode;
|
| - |
|
51 |
import java.time.Duration;
|
| - |
|
52 |
import java.time.LocalDate;
|
| - |
|
53 |
import java.time.LocalDateTime;
|
| - |
|
54 |
import java.util.*;
|
| - |
|
55 |
import java.util.Map.Entry;
|
| - |
|
56 |
import java.util.stream.Collectors;
|
| 74 |
|
57 |
|
| 75 |
@Controller
|
58 |
@Controller
|
| 76 |
@Transactional(rollbackOn = Throwable.class)
|
59 |
@Transactional(rollbackOn = Throwable.class)
|
| 77 |
public class SDCreditController {
|
60 |
public class SDCreditController {
|
| 78 |
|
61 |
|
| Line 542... |
Line 525... |
| 542 |
|
525 |
|
| 543 |
e.printStackTrace();
|
526 |
e.printStackTrace();
|
| 544 |
|
527 |
|
| 545 |
}
|
528 |
}
|
| 546 |
|
529 |
|
| 547 |
model.addAttribute("response", mvcResponseSender.createResponseString(true));
|
530 |
model.addAttribute("response1", mvcResponseSender.createResponseString(true));
|
| 548 |
|
531 |
|
| 549 |
return "response";
|
532 |
return "response";
|
| 550 |
|
533 |
|
| 551 |
}
|
534 |
}
|
| 552 |
|
535 |
|