| Line 1... |
Line 1... |
| 1 |
package com.smartdukaan.cron.scheduled;
|
1 |
package com.smartdukaan.cron.scheduled;
|
| 2 |
|
2 |
|
| 3 |
import com.spice.profitmandi.dao.model.ImeiActivationTimestampModel;
|
3 |
import com.spice.profitmandi.dao.model.ImeiActivationTimestampModel;
|
| 4 |
import com.spice.profitmandi.dao.repository.fofo.ActivatedImeiRepository;
|
4 |
import com.spice.profitmandi.dao.repository.fofo.ActivatedImeiRepository;
|
| - |
|
5 |
import org.apache.logging.log4j.LogManager;
|
| - |
|
6 |
import org.apache.logging.log4j.Logger;
|
| 5 |
import org.springframework.beans.factory.annotation.Autowired;
|
7 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 6 |
import org.springframework.stereotype.Component;
|
8 |
import org.springframework.stereotype.Component;
|
| 7 |
import org.springframework.transaction.annotation.Transactional;
|
9 |
import org.springframework.transaction.annotation.Transactional;
|
| 8 |
|
10 |
|
| 9 |
import java.util.List;
|
11 |
import java.util.List;
|
| Line 17... |
Line 19... |
| 17 |
private OppoImeiActivationService oppoImeiActivationService;
|
19 |
private OppoImeiActivationService oppoImeiActivationService;
|
| 18 |
|
20 |
|
| 19 |
@Autowired
|
21 |
@Autowired
|
| 20 |
private ActivatedImeiRepository activatedImeiRepository;
|
22 |
private ActivatedImeiRepository activatedImeiRepository;
|
| 21 |
|
23 |
|
| - |
|
24 |
private static final Logger LOGGER = LogManager.getLogger(StandAlone.class);
|
| - |
|
25 |
|
| 22 |
public void checkOppoImeiStatus() throws Exception {
|
26 |
public void checkOppoImeiStatus() throws Exception {
|
| 23 |
//Bring just 25 imeis in 1 go
|
27 |
//Bring just 25 imeis in 1 go
|
| 24 |
List<ImeiActivationTimestampModel> imeiActivationTimestampModels = activatedImeiRepository.selectImeiActivationByBrand("Oppo");
|
28 |
List<ImeiActivationTimestampModel> imeiActivationTimestampModels = activatedImeiRepository.selectImeiActivationByBrand("Oppo");
|
| 25 |
List<String> imeis = imeiActivationTimestampModels.stream().map(x -> x.getSerialNumber()).collect(Collectors.toList());
|
29 |
List<String> imeis = imeiActivationTimestampModels.stream().map(x -> x.getSerialNumber()).collect(Collectors.toList());
|
| - |
|
30 |
LOGGER.info("imeis {}", imeis);
|
| 26 |
oppoImeiActivationService.updateActivationDate(imeis);
|
31 |
oppoImeiActivationService.updateActivationDate(imeis);
|
| 27 |
}
|
32 |
}
|
| 28 |
}
|
33 |
}
|
| 29 |
|
34 |
|