|
@@ -1,5 +1,6 @@
|
|
package cn.com.qmth.examcloud.task.api.provider;
|
|
package cn.com.qmth.examcloud.task.api.provider;
|
|
|
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -15,6 +16,11 @@ import cn.com.qmth.examcloud.task.api.response.SyncCourseResp;
|
|
import cn.com.qmth.examcloud.task.api.response.SyncOrgResp;
|
|
import cn.com.qmth.examcloud.task.api.response.SyncOrgResp;
|
|
import cn.com.qmth.examcloud.task.api.response.SyncSpecialtyResp;
|
|
import cn.com.qmth.examcloud.task.api.response.SyncSpecialtyResp;
|
|
import cn.com.qmth.examcloud.task.api.response.SyncStudentResp;
|
|
import cn.com.qmth.examcloud.task.api.response.SyncStudentResp;
|
|
|
|
+import cn.com.qmth.examcloud.task.service.DataSyncService;
|
|
|
|
+import cn.com.qmth.examcloud.task.service.bean.CourseInfo;
|
|
|
|
+import cn.com.qmth.examcloud.task.service.bean.OrgInfo;
|
|
|
|
+import cn.com.qmth.examcloud.task.service.bean.SpecialtyInfo;
|
|
|
|
+import cn.com.qmth.examcloud.task.service.bean.StudentInfo;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 数据同步
|
|
* 数据同步
|
|
@@ -29,29 +35,40 @@ public class DataSyncCloudServiceProvider extends ControllerSupport
|
|
implements
|
|
implements
|
|
DataSyncCloudService {
|
|
DataSyncCloudService {
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ DataSyncService dataSyncService;
|
|
|
|
+
|
|
private static final long serialVersionUID = -2880611326177571371L;
|
|
private static final long serialVersionUID = -2880611326177571371L;
|
|
|
|
|
|
@PostMapping("syncCourse")
|
|
@PostMapping("syncCourse")
|
|
@Override
|
|
@Override
|
|
public SyncCourseResp syncCourse(@RequestBody SyncCourseReq req) {
|
|
public SyncCourseResp syncCourse(@RequestBody SyncCourseReq req) {
|
|
|
|
+ CourseInfo info = new CourseInfo();
|
|
|
|
+ dataSyncService.syncCourse(info);
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping("syncOrg")
|
|
@PostMapping("syncOrg")
|
|
@Override
|
|
@Override
|
|
public SyncOrgResp syncOrg(@RequestBody SyncOrgReq req) {
|
|
public SyncOrgResp syncOrg(@RequestBody SyncOrgReq req) {
|
|
|
|
+ OrgInfo info = new OrgInfo();
|
|
|
|
+ dataSyncService.syncOrg(info);
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping("syncStudent")
|
|
@PostMapping("syncStudent")
|
|
@Override
|
|
@Override
|
|
public SyncStudentResp syncStudent(@RequestBody SyncStudentReq req) {
|
|
public SyncStudentResp syncStudent(@RequestBody SyncStudentReq req) {
|
|
|
|
+ StudentInfo info = new StudentInfo();
|
|
|
|
+ dataSyncService.syncStudent(info);
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping("syncSpecialty")
|
|
@PostMapping("syncSpecialty")
|
|
@Override
|
|
@Override
|
|
public SyncSpecialtyResp syncSpecialty(@RequestBody SyncSpecialtyReq req) {
|
|
public SyncSpecialtyResp syncSpecialty(@RequestBody SyncSpecialtyReq req) {
|
|
|
|
+ SpecialtyInfo info = new SpecialtyInfo();
|
|
|
|
+ dataSyncService.syncSpecialty(info);
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
|
|
|