|
@@ -21,6 +21,7 @@ import cn.com.qmth.examcloud.service.core.entity.Student;
|
|
|
import cn.com.qmth.examcloud.service.core.entity.StudentFaceInfo;
|
|
|
import cn.com.qmth.examcloud.service.core.repo.StudentFaceInfoRepo;
|
|
|
import cn.com.qmth.examcloud.service.core.repo.StudentRepo;
|
|
|
+import cn.com.qmth.examcloud.service.core.service.StudentFaceInfoService;
|
|
|
|
|
|
/**
|
|
|
* 学生照片API
|
|
@@ -32,11 +33,13 @@ public class StudentFaceInfoApi {
|
|
|
@Autowired
|
|
|
StudentFaceInfoRepo studentFaceInfoRepo;
|
|
|
@Autowired
|
|
|
+ StudentFaceInfoService studentFaceInfoService;
|
|
|
+ @Autowired
|
|
|
StudentRepo studentRepo;
|
|
|
|
|
|
@ApiOperation(value="按身份证查询",notes="查询")
|
|
|
@GetMapping("/identityNumber")
|
|
|
- public ResponseEntity findByIdentityNumber(@RequestParam String identityNumber){
|
|
|
+ public ResponseEntity findByIdentityNumber(@RequestParam Long orgId,@RequestParam String identityNumber){
|
|
|
Student student = studentRepo.findByIdentityNumber(identityNumber);
|
|
|
if(student == null){
|
|
|
return new ResponseEntity(new ErrorMsg("该学生不存在"),HttpStatus.OK);
|
|
@@ -73,8 +76,7 @@ public class StudentFaceInfoApi {
|
|
|
@ApiOperation(value="新增学生照片信息",notes="新增")
|
|
|
@PostMapping
|
|
|
public ResponseEntity add(@RequestBody StudentFaceInfo studentFaceInfo){
|
|
|
- studentFaceInfo.setCreateTime(new Date());
|
|
|
- return new ResponseEntity(studentFaceInfoRepo.save(studentFaceInfo),HttpStatus.CREATED);
|
|
|
+ return new ResponseEntity(studentFaceInfoService.save(studentFaceInfo),HttpStatus.CREATED);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value="更新学生照片信息",notes="更新")
|