|
|
|
@ -8,14 +8,18 @@ import cn.jyjz.xiaoyao.common.base.util.StringUtils;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.api.PrevailCloudApi;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.api.entity.PictureSourceParameter;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.api.entity.PictureSourceResult;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.api.impl.PrevailCloudApiImpl;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.api.utils.ApiConfig;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.OcrPictureService;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.OcrPrevailCloudLogService;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.thread.TaskQueue;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.google.common.collect.Maps;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
|
import org.apache.commons.compress.utils.Lists;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
@ -32,6 +36,7 @@ import java.util.Map;
|
|
|
|
|
|
|
|
|
|
@Component
|
|
|
|
|
public class PullPictureDataJob {
|
|
|
|
|
private static Logger logger = LoggerFactory.getLogger(PullPictureDataJob.class);
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private PrevailCloudApi prevailCloudApi;
|
|
|
|
@ -50,6 +55,8 @@ public class PullPictureDataJob {
|
|
|
|
|
|
|
|
|
|
@Scheduled(cron = "0 5 0 * * ?") // 每天晚上0点五分执行一次
|
|
|
|
|
public void pullPicture() {
|
|
|
|
|
|
|
|
|
|
logger.info("开始执行-------------每日定时拉取任务------------------------时间戳:{}",System.currentTimeMillis());
|
|
|
|
|
//配置查询参数信息
|
|
|
|
|
Integer pageNo = 1;
|
|
|
|
|
Integer pageSize = 20;
|
|
|
|
@ -125,6 +132,7 @@ public class PullPictureDataJob {
|
|
|
|
|
TaskQueue.pictureDisposePushData(pictureSourceResult, ocrPictureService, ocrPrevailCloudLogService);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
System.out.println("当前区间内图片总数:" + count + "条,可处理数据:" + size + "条");
|
|
|
|
|
logger.info("执行完毕-------------每日定时拉取任务------------------------时间戳:{}",System.currentTimeMillis());
|
|
|
|
|
logger.info("当前区间内图片总数:{}条,可处理数据:{}条",System.currentTimeMillis(),size);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|