|
@@ -106,8 +106,23 @@ public class ExamCaptureQueueServiceImpl implements ExamCaptureQueueService {
|
|
|
|
|
|
// 将抓拍照图片转成Base64格式
|
|
// 将抓拍照图片转成Base64格式
|
|
String capturePhotoUrl = ossClient.valueOfOssFilePath(FileStorageUtil.realPath(queue.getFileUrl()));
|
|
String capturePhotoUrl = ossClient.valueOfOssFilePath(FileStorageUtil.realPath(queue.getFileUrl()));
|
|
|
|
+ if (StringUtils.isBlank(capturePhotoUrl)) {
|
|
|
|
+ // 删除错误无效数据
|
|
|
|
+ log.warn("人脸抓拍图片地址错误!examRecordDataId:{} queueId:{} imgUrl:{}",
|
|
|
|
+ queue.getExamRecordDataId(), queue.getId(), queue.getFileUrl());
|
|
|
|
+ examCaptureQueueRepo.deleteById(queue.getId());
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+
|
|
byte[] capturePhotoBytes = ossClient.download(capturePhotoUrl);
|
|
byte[] capturePhotoBytes = ossClient.download(capturePhotoUrl);
|
|
ImageParm capturePhoto = new ImageBase64Parm(Base64.encodeBase64String(capturePhotoBytes));
|
|
ImageParm capturePhoto = new ImageBase64Parm(Base64.encodeBase64String(capturePhotoBytes));
|
|
|
|
+ if (StringUtils.isBlank(capturePhoto.value())) {
|
|
|
|
+ // 删除错误无效数据
|
|
|
|
+ log.warn("人脸抓拍图片为空白!examRecordDataId:{} queueId:{} imgUrl:{}",
|
|
|
|
+ queue.getExamRecordDataId(), queue.getId(), queue.getFileUrl());
|
|
|
|
+ examCaptureQueueRepo.deleteById(queue.getId());
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
|
|
String extMsg = "";
|
|
String extMsg = "";
|
|
boolean errFace = false;
|
|
boolean errFace = false;
|