|
@@ -21,26 +21,32 @@ import cn.com.qmth.examcloud.core.basic.dao.entity.Student;
|
|
@Service
|
|
@Service
|
|
public class DataSendService {
|
|
public class DataSendService {
|
|
|
|
|
|
- @Autowired
|
|
|
|
- DataSyncService dataSyncService;
|
|
|
|
-
|
|
|
|
- public void sendCourse(Course course){
|
|
|
|
- CourseSync courseSync = BeanCopierUtil.copyProperties(course,CourseSync.class);
|
|
|
|
- dataSyncService.send(courseSync);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public void sendOrg(Org org){
|
|
|
|
- OrgSync orgSync = BeanCopierUtil.copyProperties(org,OrgSync.class);
|
|
|
|
- dataSyncService.send(orgSync);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public void sendStudent(Student student){
|
|
|
|
- StudentSync studentSync = BeanCopierUtil.copyProperties(student,StudentSync.class);
|
|
|
|
- dataSyncService.send(studentSync);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- public void sendSpecialty(Specialty specialty){
|
|
|
|
- SpecialtySync specialtySync = BeanCopierUtil.copyProperties(specialty,SpecialtySync.class);
|
|
|
|
- dataSyncService.send(specialtySync);
|
|
|
|
- }
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ DataSyncService dataSyncService;
|
|
|
|
+
|
|
|
|
+ public void sendCourse(Course course) {
|
|
|
|
+ CourseSync courseSync = new CourseSync();
|
|
|
|
+ courseSync.setCode(course.getCode());
|
|
|
|
+ courseSync.setEnable(course.getEnable());
|
|
|
|
+ courseSync.setId(course.getId());
|
|
|
|
+ courseSync.setLevel(course.getLevel().name());
|
|
|
|
+ courseSync.setName(course.getName());
|
|
|
|
+ courseSync.setOrgId(course.getOrgId());
|
|
|
|
+ dataSyncService.send(courseSync);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void sendOrg(Org org) {
|
|
|
|
+ OrgSync orgSync = BeanCopierUtil.copyProperties(org, OrgSync.class);
|
|
|
|
+ dataSyncService.send(orgSync);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void sendStudent(Student student) {
|
|
|
|
+ StudentSync studentSync = BeanCopierUtil.copyProperties(student, StudentSync.class);
|
|
|
|
+ dataSyncService.send(studentSync);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void sendSpecialty(Specialty specialty) {
|
|
|
|
+ SpecialtySync specialtySync = BeanCopierUtil.copyProperties(specialty, SpecialtySync.class);
|
|
|
|
+ dataSyncService.send(specialtySync);
|
|
|
|
+ }
|
|
}
|
|
}
|