fix: 解决没有开启获取hash值问题

fix/localPictureUrlIsNotNull
shuliYao 1 year ago
parent 294463c6a1
commit cb3c46e5a3

@ -22,7 +22,7 @@ public class TaskRunner implements CommandLineRunner {
TaskThreadPool taskThreadPool = new TaskThreadPool(); TaskThreadPool taskThreadPool = new TaskThreadPool();
taskThreadPool.startPictureDisposePull(); taskThreadPool.startPictureDisposePull();
taskThreadPool.startPictureImgToLocalPull(); taskThreadPool.startPictureImgToLocalPull();
// ImageDownloadMonitoring imageDownloadMonitoring = new ImageDownloadMonitoring(); ImageDownloadMonitoring imageDownloadMonitoring = new ImageDownloadMonitoring();
// imageDownloadMonitoring.startImageDownloadMonitoring(localImagePath); imageDownloadMonitoring.startImageDownloadMonitoring(localImagePath);
} }
} }

@ -64,26 +64,26 @@ public class PictureImgToLocalTask implements Runnable {
if (ObjectUtil.isNotEmpty(picture)) { if (ObjectUtil.isNotEmpty(picture)) {
picture.setLocalpictrueurl(pictureImgToLocal.getLocalPath()); picture.setLocalpictrueurl(pictureImgToLocal.getLocalPath());
picture.setIsdownload(1); picture.setIsdownload(1);
// try { try {
// picture.setLocalThumbnailUrl(ImageUtils.generateThumbnail(pictureImgToLocal.getLocalPath(),182)); picture.setLocalThumbnailUrl(ImageUtils.generateThumbnail(pictureImgToLocal.getLocalPath(),182));
// picture.setServerThumbnailUrl(ocrPictureService.getServerUrl()+ImageUtils.getFileName(picture.getLocalThumbnailUrl())); picture.setServerThumbnailUrl(ocrPictureService.getServerUrl()+ImageUtils.getFileName(picture.getLocalThumbnailUrl()));
// } catch (IOException e) { } catch (IOException e) {
// throw new RuntimeException(e); throw new RuntimeException(e);
// } }
// Map<String, String> ocrPictureClassifyAndHash = ocrPictureService.getOcrPictureClassifyAndHash(picture.getLocalpictrueurl()); Map<String, String> ocrPictureClassifyAndHash = ocrPictureService.getOcrPictureClassifyAndHash(picture.getLocalpictrueurl());
// if(ocrPictureClassifyAndHash!=null){ if(ocrPictureClassifyAndHash!=null){
// picture.setImgHash(ocrPictureClassifyAndHash.get("hash")); picture.setImgHash(ocrPictureClassifyAndHash.get("hash"));
// picture.setClassificationid(ocrPictureClassifyAndHash.get("classId")); picture.setClassificationid(ocrPictureClassifyAndHash.get("classId"));
// } }
// 获取拍照时间 // 获取拍照时间
// Long timestamp = ocrPictureService.getPhotoDateTime(picture); // Long timestamp = ocrPictureService.getPhotoDateTime(picture);
// if(timestamp != 0L){ // if(timestamp != 0L){
// picture.setPhotoDateTimestamp(timestamp); // picture.setPhotoDateTimestamp(timestamp);
// } // }
// ocrPictureService.updateById(picture); ocrPictureService.updateById(picture);
logger.info("图片本地化,回写数据完成!"); logger.info("图片本地化,回写数据完成!");
logger.info("开启获取图片信息操作!"); logger.info("开启获取图片信息操作!");
// ocrPictureService.savePicturesInfo(picture); ocrPictureService.savePicturesInfo(picture);
logger.info("获取图片信息操作,结束!"); logger.info("获取图片信息操作,结束!");
} }
}else{ }else{

Loading…
Cancel
Save