|
@@ -55,6 +55,7 @@ public class FaceServiceImpl implements FaceService {
|
|
String photoName = info.getPhotoName();
|
|
String photoName = info.getPhotoName();
|
|
Long rootOrgId = info.getRootOrgId();
|
|
Long rootOrgId = info.getRootOrgId();
|
|
Long studentId = info.getStudentId();
|
|
Long studentId = info.getStudentId();
|
|
|
|
+ Long faceCount = info.getFaceCount();
|
|
|
|
|
|
if (null == studentId) {
|
|
if (null == studentId) {
|
|
throw new StatusException("B-680001", "studentId is null");
|
|
throw new StatusException("B-680001", "studentId is null");
|
|
@@ -75,6 +76,10 @@ public class FaceServiceImpl implements FaceService {
|
|
throw new StatusException("B-680006", "photoName is null");
|
|
throw new StatusException("B-680006", "photoName is null");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (StringUtils.isBlank(photoName)) {
|
|
|
|
+ throw new StatusException("B-680006", "photoName is null");
|
|
|
|
+ }
|
|
|
|
+
|
|
StudentEntity studentEntity = studentRepo.findOne(studentId);
|
|
StudentEntity studentEntity = studentRepo.findOne(studentId);
|
|
|
|
|
|
if (null == studentEntity) {
|
|
if (null == studentEntity) {
|
|
@@ -106,6 +111,11 @@ public class FaceServiceImpl implements FaceService {
|
|
studentFaceEntity.setFaceToken(faceToken);
|
|
studentFaceEntity.setFaceToken(faceToken);
|
|
studentFaceEntity.setModifiedBy(operator);
|
|
studentFaceEntity.setModifiedBy(operator);
|
|
|
|
|
|
|
|
+ if (facesetEntity.getFaceCount() < faceCount) {
|
|
|
|
+ facesetEntity.setFaceCount(faceCount);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ facesetRepo.save(facesetEntity);
|
|
studentRepo.save(studentEntity);
|
|
studentRepo.save(studentEntity);
|
|
StudentFaceEntity saved = studentFaceRepo.save(studentFaceEntity);
|
|
StudentFaceEntity saved = studentFaceRepo.save(studentFaceEntity);
|
|
|
|
|