|
|
|
@ -14,6 +14,7 @@ import com.shxy.xymanager_service.service.CacheService;
|
|
|
|
|
import com.shxy.xymanager_service.service.NewCacheService;
|
|
|
|
|
import com.shxy.xymanager_service.service.TermSetService;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
@ -29,6 +30,9 @@ import java.util.Map;
|
|
|
|
|
@Slf4j
|
|
|
|
|
public class StoreCameraScheduleTask {
|
|
|
|
|
|
|
|
|
|
@Value("${camera-schedule:false}")
|
|
|
|
|
private boolean enable;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
NewCacheService newCacheService;
|
|
|
|
|
@Resource
|
|
|
|
@ -90,6 +94,9 @@ public class StoreCameraScheduleTask {
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 1 3 * * ?")
|
|
|
|
|
private void search() {
|
|
|
|
|
if (!enable) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
Map<Integer, Terminals> terminalMap = newCacheService.getTerminalMap();
|
|
|
|
|
Map<Integer, TermAndChannelDto> termAndChannelMap = cacheService.getTermAndChannelMap();
|
|
|
|
|
Iterator<Integer> it = terminalMap.keySet().iterator();
|
|
|
|
|