| Line 7... |
Line 7... |
| 7 |
import org.apache.logging.log4j.LogManager;
|
7 |
import org.apache.logging.log4j.LogManager;
|
| 8 |
import org.apache.logging.log4j.Logger;
|
8 |
import org.apache.logging.log4j.Logger;
|
| 9 |
import org.json.JSONObject;
|
9 |
import org.json.JSONObject;
|
| 10 |
import org.springframework.beans.factory.annotation.Autowired;
|
10 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 11 |
import org.springframework.stereotype.Component;
|
11 |
import org.springframework.stereotype.Component;
|
| - |
|
12 |
import org.springframework.transaction.annotation.Propagation;
|
| - |
|
13 |
import org.springframework.transaction.annotation.Transactional;
|
| 12 |
|
14 |
|
| 13 |
import java.nio.file.Files;
|
15 |
import java.nio.file.Files;
|
| 14 |
import java.nio.file.Paths;
|
16 |
import java.nio.file.Paths;
|
| 15 |
import java.time.LocalDate;
|
17 |
import java.time.LocalDate;
|
| 16 |
import java.time.format.DateTimeFormatter;
|
18 |
import java.time.format.DateTimeFormatter;
|
| Line 33... |
Line 35... |
| 33 |
|
35 |
|
| 34 |
private static final Logger LOGGER = LogManager.getLogger(VivoImeiActivationService.class);
|
36 |
private static final Logger LOGGER = LogManager.getLogger(VivoImeiActivationService.class);
|
| 35 |
|
37 |
|
| 36 |
private final Map<String, List<Cookie>> cookieStore = new HashMap<>();
|
38 |
private final Map<String, List<Cookie>> cookieStore = new HashMap<>();
|
| 37 |
|
39 |
|
| - |
|
40 |
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
| 38 |
public void checkImeiActivation() throws Exception {
|
41 |
public void checkImeiActivation() throws Exception {
|
| 39 |
if (LocalDate.now().getDayOfMonth() == 1) return;
|
42 |
if (LocalDate.now().getDayOfMonth() == 1) return;
|
| 40 |
|
43 |
|
| 41 |
List<ImeiActivationTimestampModel> imeisActivationList = activatedImeiRepository
|
44 |
List<ImeiActivationTimestampModel> imeisActivationList = activatedImeiRepository
|
| 42 |
.selectImeiActivationPendingByBrand("Vivo", 2);
|
45 |
.selectImeiActivationPendingByBrand("Vivo", 2);
|
| 43 |
LOGGER.info("Secondary imeisActivationList = {}, size = {}", imeisActivationList, imeisActivationList.size());
|
46 |
LOGGER.info("Secondary imeisActivationList = {}, size = {}", imeisActivationList, imeisActivationList.size());
|
| 44 |
|
47 |
|
| 45 |
processImeis(imeisActivationList);
|
48 |
processImeis(imeisActivationList);
|
| 46 |
}
|
49 |
}
|
| 47 |
|
50 |
|
| - |
|
51 |
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
| 48 |
public void checkImeiActivationTertiary() throws Exception {
|
52 |
public void checkImeiActivationTertiary() throws Exception {
|
| 49 |
if (LocalDate.now().getDayOfMonth() == 1) return;
|
53 |
if (LocalDate.now().getDayOfMonth() == 1) return;
|
| 50 |
|
54 |
|
| 51 |
List<ImeiActivationTimestampModel> imeisActivationList = activatedImeiRepository
|
55 |
List<ImeiActivationTimestampModel> imeisActivationList = activatedImeiRepository
|
| 52 |
.selectImeiActivationPendingByBrandTertiary("Vivo", 2);
|
56 |
.selectImeiActivationPendingByBrandTertiary("Vivo", 2);
|