|
@@ -1,7 +1,9 @@
|
|
|
package cn.com.qmth.examcloud.core.examwork.api.provider;
|
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
@@ -19,6 +21,7 @@ import cn.com.qmth.examcloud.commons.api.response.SyncOrgResp;
|
|
|
import cn.com.qmth.examcloud.commons.api.response.SyncSpecialtyResp;
|
|
|
import cn.com.qmth.examcloud.commons.api.response.SyncStudentResp;
|
|
|
import cn.com.qmth.examcloud.commons.web.support.ControllerSupport;
|
|
|
+import cn.com.qmth.examcloud.core.examwork.dao.ExamStudentRepo;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
/**
|
|
@@ -37,45 +40,51 @@ public class HandleSyncCloudServiceProvider extends ControllerSupport
|
|
|
|
|
|
private static final long serialVersionUID = 9122543745597481498L;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ ExamStudentRepo examStudentRepo;
|
|
|
+
|
|
|
@ApiOperation(value = "同步课程")
|
|
|
@PostMapping("syncCourse")
|
|
|
@Override
|
|
|
- public SyncCourseResp syncCourse(SyncCourseReq req) {
|
|
|
+ public SyncCourseResp syncCourse(@RequestBody SyncCourseReq req) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "同步机构")
|
|
|
@PostMapping("syncOrg")
|
|
|
@Override
|
|
|
- public SyncOrgResp syncOrg(SyncOrgReq req) {
|
|
|
+ public SyncOrgResp syncOrg(@RequestBody SyncOrgReq req) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "同步学生")
|
|
|
@PostMapping("syncStudent")
|
|
|
@Override
|
|
|
- public SyncStudentResp syncStudent(SyncStudentReq req) {
|
|
|
+ public SyncStudentResp syncStudent(@RequestBody SyncStudentReq req) {
|
|
|
+ String name = req.getName();
|
|
|
+ Long id = req.getId();
|
|
|
+ examStudentRepo.updateStudent(name, id);
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "同步考生")
|
|
|
@PostMapping("syncExamStudent")
|
|
|
@Override
|
|
|
- public SyncExamStudentResp syncExamStudent(SyncExamStudentReq req) {
|
|
|
+ public SyncExamStudentResp syncExamStudent(@RequestBody SyncExamStudentReq req) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "同步专业")
|
|
|
@PostMapping("syncSpecialty")
|
|
|
@Override
|
|
|
- public SyncSpecialtyResp syncSpecialty(SyncSpecialtyReq req) {
|
|
|
+ public SyncSpecialtyResp syncSpecialty(@RequestBody SyncSpecialtyReq req) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "同步考试")
|
|
|
@PostMapping("syncExam")
|
|
|
@Override
|
|
|
- public SyncExamResp syncExam(SyncExamReq req) {
|
|
|
+ public SyncExamResp syncExam(@RequestBody SyncExamReq req) {
|
|
|
return null;
|
|
|
}
|
|
|
|