|
@@ -13,6 +13,9 @@ import cn.com.qmth.examcloud.core.basic.api.request.SaveStudentFaceReq;
|
|
import cn.com.qmth.examcloud.core.basic.api.response.SaveStudentFaceResp;
|
|
import cn.com.qmth.examcloud.core.basic.api.response.SaveStudentFaceResp;
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentFaceRepo;
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentFaceRepo;
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
|
|
|
|
+import cn.com.qmth.examcloud.core.basic.dao.entity.StudentFaceEntity;
|
|
|
|
+import cn.com.qmth.examcloud.core.basic.service.StudentFaceService;
|
|
|
|
+import cn.com.qmth.examcloud.core.basic.service.bean.StudentFaceInfo;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -37,12 +40,25 @@ public class StudentFaceCloudServiceProvider extends ControllerSupport
|
|
@Autowired
|
|
@Autowired
|
|
StudentRepo studentRepo;
|
|
StudentRepo studentRepo;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ StudentFaceService studentFaceService;
|
|
|
|
+
|
|
@ApiOperation(value = "保存学生人脸数据")
|
|
@ApiOperation(value = "保存学生人脸数据")
|
|
- @PostMapping("saveStudentFaceInfo")
|
|
|
|
|
|
+ @PostMapping("saveStudentFace")
|
|
@Override
|
|
@Override
|
|
public SaveStudentFaceResp saveStudentFace(@RequestBody SaveStudentFaceReq req) {
|
|
public SaveStudentFaceResp saveStudentFace(@RequestBody SaveStudentFaceReq req) {
|
|
|
|
+ StudentFaceInfo info = new StudentFaceInfo();
|
|
|
|
+ info.setFacesetToken(req.getFacesetToken());
|
|
|
|
+ info.setFaceToken(req.getFaceToken());
|
|
|
|
+ info.setOperator(req.getOperator());
|
|
|
|
+ info.setPhotoName(req.getPhotoName());
|
|
|
|
+ info.setRootOrgId(req.getRootOrgId());
|
|
|
|
+ info.setStudentId(req.getStudentId());
|
|
|
|
|
|
- return null;
|
|
|
|
|
|
+ StudentFaceEntity saved = studentFaceService.saveStudentFace(info);
|
|
|
|
+ SaveStudentFaceResp resp = new SaveStudentFaceResp();
|
|
|
|
+ resp.setId(saved.getStudentId());
|
|
|
|
+ return resp;
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|