|
@@ -8,6 +8,7 @@ import cn.com.qmth.examcloud.core.oe.student.dao.entity.ExamCaptureQueueEntity;
|
|
|
import cn.com.qmth.examcloud.core.oe.student.dao.enums.ExamCaptureQueueStatus;
|
|
|
import cn.com.qmth.examcloud.core.oe.task.service.ExamCaptureQueueService;
|
|
|
import cn.com.qmth.examcloud.core.oe.task.service.ExamRecordDataService;
|
|
|
+import cn.com.qmth.examcloud.starters.face.verify.common.CommonUtils;
|
|
|
import cn.com.qmth.examcloud.starters.face.verify.common.FaceVerifyException;
|
|
|
import cn.com.qmth.examcloud.starters.face.verify.model.FaceResult;
|
|
|
import cn.com.qmth.examcloud.starters.face.verify.model.param.ImageBase64Parm;
|
|
@@ -90,9 +91,15 @@ public class ExamCaptureQueueServiceImpl implements ExamCaptureQueueService {
|
|
|
queues.size(), useBaiduApi ? "baidu" : "face++", baiduExpectFaceCompareScore);
|
|
|
|
|
|
// 将学生底照图片转成Base64格式
|
|
|
- String basePhotoUrl = ossClient.valueOfOssFilePath(studentCache.getPhotoPath());
|
|
|
- byte[] basePhotoBytes = ossClient.download(basePhotoUrl);
|
|
|
- ImageParm basePhoto = new ImageBase64Parm(Base64.encodeBase64String(basePhotoBytes));
|
|
|
+ ImageParm basePhoto;
|
|
|
+ if (studentCache.getPhotoPath().contains("upyun.qmth.com.cn")) {
|
|
|
+ // 兼容又拍云旧图片路径
|
|
|
+ basePhoto = new ImageBase64Parm(CommonUtils.toBase64(studentCache.getPhotoPath()));
|
|
|
+ } else {
|
|
|
+ String basePhotoUrl = ossClient.valueOfOssFilePath(studentCache.getPhotoPath());
|
|
|
+ byte[] basePhotoBytes = ossClient.download(basePhotoUrl);
|
|
|
+ basePhoto = new ImageBase64Parm(Base64.encodeBase64String(basePhotoBytes));
|
|
|
+ }
|
|
|
|
|
|
for (ExamCaptureQueueEntity queue : queues) {
|
|
|
queue.setFaceCompareStartTime(System.currentTimeMillis());
|