| Line 2... |
Line 2... |
| 2 |
|
2 |
|
| 3 |
import java.io.File;
|
3 |
import java.io.File;
|
| 4 |
import java.time.LocalDate;
|
4 |
import java.time.LocalDate;
|
| 5 |
import java.time.LocalDateTime;
|
5 |
import java.time.LocalDateTime;
|
| 6 |
import java.time.LocalTime;
|
6 |
import java.time.LocalTime;
|
| - |
|
7 |
import java.time.format.DateTimeFormatter;
|
| - |
|
8 |
import java.time.format.DateTimeFormatterBuilder;
|
| 7 |
import java.util.ArrayList;
|
9 |
import java.util.ArrayList;
|
| 8 |
import java.util.Arrays;
|
10 |
import java.util.Arrays;
|
| 9 |
import java.util.Collections;
|
11 |
import java.util.Collections;
|
| 10 |
import java.util.HashMap;
|
12 |
import java.util.HashMap;
|
| 11 |
import java.util.HashSet;
|
13 |
import java.util.HashSet;
|
| Line 32... |
Line 34... |
| 32 |
import org.springframework.transaction.annotation.Transactional;
|
34 |
import org.springframework.transaction.annotation.Transactional;
|
| 33 |
|
35 |
|
| 34 |
import com.smartdukaan.cron.scheduled.ScheduledTasks;
|
36 |
import com.smartdukaan.cron.scheduled.ScheduledTasks;
|
| 35 |
import com.spice.profitmandi.common.enumuration.ItemType;
|
37 |
import com.spice.profitmandi.common.enumuration.ItemType;
|
| 36 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
38 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| - |
|
39 |
import com.spice.profitmandi.common.services.SamsungIMEIActivationService;
|
| 37 |
import com.spice.profitmandi.common.util.FileUtil;
|
40 |
import com.spice.profitmandi.common.util.FileUtil;
|
| 38 |
import com.spice.profitmandi.common.util.FormattingUtils;
|
41 |
import com.spice.profitmandi.common.util.FormattingUtils;
|
| 39 |
import com.spice.profitmandi.common.util.Utils;
|
42 |
import com.spice.profitmandi.common.util.Utils;
|
| 40 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
43 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
| 41 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
44 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
| Line 98... |
Line 101... |
| 98 |
import com.spice.profitmandi.service.pricing.PriceDropService;
|
101 |
import com.spice.profitmandi.service.pricing.PriceDropService;
|
| 99 |
import com.spice.profitmandi.service.scheme.SchemeService;
|
102 |
import com.spice.profitmandi.service.scheme.SchemeService;
|
| 100 |
import com.spice.profitmandi.service.transaction.TransactionService;
|
103 |
import com.spice.profitmandi.service.transaction.TransactionService;
|
| 101 |
import com.spice.profitmandi.service.user.RetailerService;
|
104 |
import com.spice.profitmandi.service.user.RetailerService;
|
| 102 |
import com.spice.profitmandi.service.wallet.WalletService;
|
105 |
import com.spice.profitmandi.service.wallet.WalletService;
|
| 103 |
import com.spice.profitmandi.thrift.clients.PurchaseClient;
|
- |
|
| 104 |
|
106 |
|
| 105 |
import in.shop2020.model.v1.order.OrderStatus;
|
107 |
import in.shop2020.model.v1.order.OrderStatus;
|
| 106 |
import in.shop2020.model.v1.order.WalletReferenceType;
|
108 |
import in.shop2020.model.v1.order.WalletReferenceType;
|
| 107 |
|
109 |
|
| 108 |
@Component
|
110 |
@Component
|
| Line 119... |
Line 121... |
| 119 |
|
121 |
|
| 120 |
@Autowired
|
122 |
@Autowired
|
| 121 |
private CsService csService;
|
123 |
private CsService csService;
|
| 122 |
|
124 |
|
| 123 |
@Autowired
|
125 |
@Autowired
|
| - |
|
126 |
private SamsungIMEIActivationService samsungActivationService;
|
| - |
|
127 |
|
| - |
|
128 |
@Autowired
|
| 124 |
private PrebookingOrderRepository prebookingOrderRepository;
|
129 |
private PrebookingOrderRepository prebookingOrderRepository;
|
| 125 |
|
130 |
|
| 126 |
@Autowired
|
131 |
@Autowired
|
| 127 |
private SaholicReservationInventorySnapshotRepository saholicReservationInventorySnapshotRepository;
|
132 |
private SaholicReservationInventorySnapshotRepository saholicReservationInventorySnapshotRepository;
|
| 128 |
|
133 |
|
| Line 285... |
Line 290... |
| 285 |
}
|
290 |
}
|
| 286 |
}
|
291 |
}
|
| 287 |
|
292 |
|
| 288 |
}
|
293 |
}
|
| 289 |
|
294 |
|
| - |
|
295 |
public void fetchImeiActivation( ) throws Exception{
|
| - |
|
296 |
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd[['T'][' ']]HH:mm:ss");
|
| - |
|
297 |
System.out.println(LocalDateTime.parse("2019-01-01 00:00:00", df));
|
| - |
|
298 |
System.out.println(LocalDateTime.parse("2019-01-01T00:00:00", df));
|
| - |
|
299 |
System.out.println("Done");
|
| - |
|
300 |
//samsungActivationService.getActivationsBetween(LocalDate.of(2020, 1, 1), LocalDate.now());
|
| - |
|
301 |
}
|
| 290 |
public void migarateLineItemsToNewTable() throws Exception {
|
302 |
public void migarateLineItemsToNewTable() throws Exception {
|
| 291 |
LOGGER.info("Before Migrated LineItems Successfully");
|
303 |
LOGGER.info("Before Migrated LineItems Successfully");
|
| 292 |
int lineItemImeiId = 0;
|
304 |
int lineItemImeiId = 0;
|
| 293 |
LocalDateTime startDate = null;
|
305 |
LocalDateTime startDate = null;
|
| 294 |
try {
|
306 |
try {
|