Przeglądaj źródła

学生底照路径由exchange传递,basic不能自己拼

xiatian 5 lat temu
rodzic
commit
0b4fbb5582

+ 1 - 0
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/provider/FaceCloudServiceProvider.java

@@ -71,6 +71,7 @@ public class FaceCloudServiceProvider extends ControllerSupport implements FaceC
 		info.setRootOrgId(req.getRootOrgId());
 		info.setStudentId(req.getStudentId());
 		info.setFaceCount(req.getFaceCount());
+		info.setPhotoTreatyPath(req.getPhotoTreatyPath());
 
 		StudentFaceEntity saved = studentFaceService.saveStudentFace(info);
 		SaveStudentFaceResp resp = new SaveStudentFaceResp();

+ 12 - 0
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/bean/StudentFaceInfo.java

@@ -26,6 +26,8 @@ public class StudentFaceInfo implements JsonSerializable {
 	private String operator;
 
 	private Long faceCount;
+	
+	private String photoTreatyPath;
 
 	public Long getRootOrgId() {
 		return rootOrgId;
@@ -83,4 +85,14 @@ public class StudentFaceInfo implements JsonSerializable {
 		this.faceCount = faceCount;
 	}
 
+	public String getPhotoTreatyPath() {
+		return photoTreatyPath;
+	}
+
+	public void setPhotoTreatyPath(String photoTreatyPath) {
+		this.photoTreatyPath = photoTreatyPath;
+	}
+	
+	
+
 }

+ 6 - 1
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/FaceServiceImpl.java

@@ -82,6 +82,10 @@ public class FaceServiceImpl implements FaceService {
 		if (!photoName.matches("\\w+\\.\\w+")) {
 			throw new StatusException("680006", "photoName is wrong");
 		}
+		
+		if (StringUtils.isBlank(photoName)) {
+			throw new StatusException("680015", "photoTreatyPath is null");
+		}
 
 		if (null == faceCount) {
 			throw new StatusException("680008", "faceCount is null");
@@ -106,7 +110,8 @@ public class FaceServiceImpl implements FaceService {
 			throw new StatusException("680011", "facesetEntity is null");
 		}
 
-		String photoPath = rootOrgId + "/" + studentId + "/" + photoName;
+//		String photoPath = rootOrgId + "/" + studentId + "/" + photoName;
+		String photoPath =info.getPhotoTreatyPath();
 		studentEntity.setPhotoPath(photoPath);
 
 		StudentFaceEntity studentFaceEntity = GlobalHelper.getEntity(studentFaceRepo, studentId,