| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.dao.util;
|
1 |
package com.spice.profitmandi.dao.util;
|
| 2 |
|
2 |
|
| 3 |
import java.io.File;
|
- |
|
| 4 |
import java.io.IOException;
|
- |
|
| 5 |
import java.lang.reflect.Type;
|
- |
|
| 6 |
import java.time.LocalDateTime;
|
- |
|
| 7 |
import java.util.HashMap;
|
- |
|
| 8 |
import java.util.HashSet;
|
- |
|
| 9 |
import java.util.List;
|
- |
|
| 10 |
import java.util.Map;
|
- |
|
| 11 |
import java.util.Set;
|
- |
|
| 12 |
|
- |
|
| 13 |
import org.apache.commons.io.FileUtils;
|
- |
|
| 14 |
import org.apache.logging.log4j.LogManager;
|
- |
|
| 15 |
import org.apache.logging.log4j.Logger;
|
- |
|
| 16 |
import org.springframework.beans.factory.annotation.Autowired;
|
- |
|
| 17 |
import org.springframework.stereotype.Component;
|
- |
|
| 18 |
|
- |
|
| 19 |
import com.google.gson.Gson;
|
3 |
import com.google.gson.Gson;
|
| 20 |
import com.google.gson.reflect.TypeToken;
|
4 |
import com.google.gson.reflect.TypeToken;
|
| 21 |
import com.spice.profitmandi.common.enumuration.ContentType;
|
5 |
import com.spice.profitmandi.common.enumuration.ContentType;
|
| 22 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
6 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 23 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
7 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 24 |
import com.spice.profitmandi.common.util.FileUtil;
|
8 |
import com.spice.profitmandi.common.util.FileUtil;
|
| 25 |
import com.spice.profitmandi.dao.entity.dtr.Document;
|
- |
|
| 26 |
import com.spice.profitmandi.dao.entity.dtr.Retailer;
|
- |
|
| 27 |
import com.spice.profitmandi.dao.entity.dtr.RetailerRegisteredAddress;
|
- |
|
| 28 |
import com.spice.profitmandi.dao.entity.dtr.Role;
|
- |
|
| 29 |
import com.spice.profitmandi.dao.entity.dtr.Shop;
|
- |
|
| 30 |
import com.spice.profitmandi.dao.entity.dtr.ShopAddress;
|
- |
|
| 31 |
import com.spice.profitmandi.dao.entity.dtr.User;
|
9 |
import com.spice.profitmandi.dao.entity.dtr.User;
|
| 32 |
import com.spice.profitmandi.dao.entity.dtr.UserAccount;
|
- |
|
| 33 |
import com.spice.profitmandi.dao.entity.dtr.UserRole;
|
10 |
import com.spice.profitmandi.dao.entity.dtr.*;
|
| 34 |
import com.spice.profitmandi.dao.entity.fofo.FofoPartnerPaymentOption;
|
11 |
import com.spice.profitmandi.dao.entity.fofo.FofoPartnerPaymentOption;
|
| 35 |
import com.spice.profitmandi.dao.entity.fofo.PaymentOption;
|
12 |
import com.spice.profitmandi.dao.entity.fofo.PaymentOption;
|
| 36 |
import com.spice.profitmandi.dao.entity.user.Address;
|
- |
|
| 37 |
import com.spice.profitmandi.dao.entity.user.Cart;
|
13 |
import com.spice.profitmandi.dao.entity.user.*;
|
| 38 |
import com.spice.profitmandi.dao.entity.user.Counter;
|
- |
|
| 39 |
import com.spice.profitmandi.dao.entity.user.PrivateDealUser;
|
- |
|
| 40 |
import com.spice.profitmandi.dao.entity.user.PrivateDealUserAddressMapping;
|
- |
|
| 41 |
import com.spice.profitmandi.dao.enumuration.dtr.AccountType;
|
14 |
import com.spice.profitmandi.dao.enumuration.dtr.AccountType;
|
| 42 |
import com.spice.profitmandi.dao.enumuration.dtr.RetailerType;
|
15 |
import com.spice.profitmandi.dao.enumuration.dtr.RetailerType;
|
| 43 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
16 |
import com.spice.profitmandi.dao.enumuration.dtr.RoleType;
|
| 44 |
import com.spice.profitmandi.dao.enumuration.fofo.PaymentOptionType;
|
17 |
import com.spice.profitmandi.dao.enumuration.fofo.PaymentOptionType;
|
| 45 |
import com.spice.profitmandi.dao.repository.dtr.DocumentRepository;
|
- |
|
| 46 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
- |
|
| 47 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRegisteredAddressRepository;
|
- |
|
| 48 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
|
- |
|
| 49 |
import com.spice.profitmandi.dao.repository.dtr.RoleRepository;
|
- |
|
| 50 |
import com.spice.profitmandi.dao.repository.dtr.ShopAddressRepository;
|
- |
|
| 51 |
import com.spice.profitmandi.dao.repository.dtr.ShopRepository;
|
- |
|
| 52 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
- |
|
| 53 |
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
|
18 |
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
|
| 54 |
import com.spice.profitmandi.dao.repository.dtr.UserRoleRepository;
|
19 |
import com.spice.profitmandi.dao.repository.dtr.*;
|
| 55 |
import com.spice.profitmandi.dao.repository.fofo.FofoPartnerPaymentOptionRepository;
|
20 |
import com.spice.profitmandi.dao.repository.fofo.FofoPartnerPaymentOptionRepository;
|
| 56 |
import com.spice.profitmandi.dao.repository.fofo.PaymentOptionRepository;
|
21 |
import com.spice.profitmandi.dao.repository.fofo.PaymentOptionRepository;
|
| 57 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
- |
|
| 58 |
import com.spice.profitmandi.dao.repository.user.CartRepository;
|
22 |
import com.spice.profitmandi.dao.repository.user.*;
|
| 59 |
import com.spice.profitmandi.dao.repository.user.CounterRepository;
|
- |
|
| 60 |
import com.spice.profitmandi.dao.repository.user.PrivateDealUserAddressMappingRepository;
|
- |
|
| 61 |
import com.spice.profitmandi.dao.repository.user.PrivateDealUserRepository;
|
- |
|
| 62 |
|
- |
|
| 63 |
import in.shop2020.model.v1.user.CartStatus;
|
23 |
import in.shop2020.model.v1.user.CartStatus;
|
| - |
|
24 |
import org.apache.commons.io.FileUtils;
|
| - |
|
25 |
import org.apache.logging.log4j.LogManager;
|
| - |
|
26 |
import org.apache.logging.log4j.Logger;
|
| - |
|
27 |
import org.springframework.beans.factory.annotation.Autowired;
|
| - |
|
28 |
import org.springframework.stereotype.Component;
|
| - |
|
29 |
|
| - |
|
30 |
import java.io.File;
|
| - |
|
31 |
import java.io.IOException;
|
| - |
|
32 |
import java.lang.reflect.Type;
|
| - |
|
33 |
import java.time.LocalDateTime;
|
| - |
|
34 |
import java.util.*;
|
| 64 |
|
35 |
|
| 65 |
@Component
|
36 |
@Component
|
| - |
|
37 |
public class
|
| 66 |
public class MigrationUtil {
|
38 |
MigrationUtil {
|
| 67 |
|
39 |
|
| 68 |
@Autowired
|
40 |
@Autowired
|
| 69 |
private DocumentRepository documentRepository;
|
41 |
private DocumentRepository documentRepository;
|
| 70 |
|
42 |
|
| 71 |
@Autowired
|
43 |
@Autowired
|