wangwei 7 жил өмнө
parent
commit
6028263c44

+ 17 - 0
examcloud-task-api-provider/src/main/java/cn/com/qmth/examcloud/task/api/provider/DataSyncCloudServiceProvider.java

@@ -1,5 +1,6 @@
 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.RequestBody;
 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.SyncSpecialtyResp;
 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
 			DataSyncCloudService {
 
+	@Autowired
+	DataSyncService dataSyncService;
+
 	private static final long serialVersionUID = -2880611326177571371L;
 
 	@PostMapping("syncCourse")
 	@Override
 	public SyncCourseResp syncCourse(@RequestBody SyncCourseReq req) {
+		CourseInfo info = new CourseInfo();
+		dataSyncService.syncCourse(info);
 		return null;
 	}
 
 	@PostMapping("syncOrg")
 	@Override
 	public SyncOrgResp syncOrg(@RequestBody SyncOrgReq req) {
+		OrgInfo info = new OrgInfo();
+		dataSyncService.syncOrg(info);
 		return null;
 	}
 
 	@PostMapping("syncStudent")
 	@Override
 	public SyncStudentResp syncStudent(@RequestBody SyncStudentReq req) {
+		StudentInfo info = new StudentInfo();
+		dataSyncService.syncStudent(info);
 		return null;
 	}
 
 	@PostMapping("syncSpecialty")
 	@Override
 	public SyncSpecialtyResp syncSpecialty(@RequestBody SyncSpecialtyReq req) {
+		SpecialtyInfo info = new SpecialtyInfo();
+		dataSyncService.syncSpecialty(info);
 		return null;
 	}
 

+ 53 - 0
examcloud-task-service/src/main/java/cn/com/qmth/examcloud/task/service/DataSyncService.java

@@ -0,0 +1,53 @@
+package cn.com.qmth.examcloud.task.service;
+
+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;
+
+/**
+ * 类注释
+ *
+ * @author WANGWEI
+ * @date 2018年8月2日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public interface DataSyncService {
+
+	/**
+	 * 同步课程
+	 *
+	 * @author WANGWEI
+	 * @param info
+	 * @return
+	 */
+	void syncCourse(CourseInfo info);
+
+	/**
+	 * 同步机构
+	 *
+	 * @author WANGWEI
+	 * @param info
+	 * @return
+	 */
+	void syncOrg(OrgInfo info);
+
+	/**
+	 * 同步学生
+	 *
+	 * @author WANGWEI
+	 * @param info
+	 * @return
+	 */
+	void syncStudent(StudentInfo info);
+
+	/**
+	 * 同步专业
+	 *
+	 * @author WANGWEI
+	 * @param info
+	 * @return
+	 */
+	void syncSpecialty(SpecialtyInfo info);
+
+}

+ 76 - 0
examcloud-task-service/src/main/java/cn/com/qmth/examcloud/task/service/bean/CourseInfo.java

@@ -0,0 +1,76 @@
+package cn.com.qmth.examcloud.task.service.bean;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.JsonSerializable;
+
+/**
+ * 类注释
+ *
+ * @author WANGWEI
+ * @date 2018年8月2日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class CourseInfo implements JsonSerializable {
+
+	private static final long serialVersionUID = -1031140605770551820L;
+
+	private Long id;
+
+	private String code;
+
+	private String name;
+
+	private Long rootOrgId;
+
+	private String level;
+
+	private Boolean enable;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getCode() {
+		return code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public String getLevel() {
+		return level;
+	}
+
+	public void setLevel(String level) {
+		this.level = level;
+	}
+
+	public Boolean getEnable() {
+		return enable;
+	}
+
+	public void setEnable(Boolean enable) {
+		this.enable = enable;
+	}
+
+}

+ 69 - 0
examcloud-task-service/src/main/java/cn/com/qmth/examcloud/task/service/bean/OrgInfo.java

@@ -0,0 +1,69 @@
+package cn.com.qmth.examcloud.task.service.bean;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.JsonSerializable;
+
+public class OrgInfo implements JsonSerializable {
+
+	private static final long serialVersionUID = -2104134978729044084L;
+
+	private Long id;
+
+	private Long rootId;
+
+	private Long parentId;
+
+	private Integer level;
+
+	private String name;
+
+	private Boolean enable;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public Long getRootId() {
+		return rootId;
+	}
+
+	public void setRootId(Long rootId) {
+		this.rootId = rootId;
+	}
+
+	public Long getParentId() {
+		return parentId;
+	}
+
+	public void setParentId(Long parentId) {
+		this.parentId = parentId;
+	}
+
+	public Integer getLevel() {
+		return level;
+	}
+
+	public void setLevel(Integer level) {
+		this.level = level;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Boolean getEnable() {
+		return enable;
+	}
+
+	public void setEnable(Boolean enable) {
+		this.enable = enable;
+	}
+
+}

+ 59 - 0
examcloud-task-service/src/main/java/cn/com/qmth/examcloud/task/service/bean/SpecialtyInfo.java

@@ -0,0 +1,59 @@
+package cn.com.qmth.examcloud.task.service.bean;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.BaseRequest;
+
+public class SpecialtyInfo extends BaseRequest {
+
+	private static final long serialVersionUID = 1668418232494824050L;
+
+	private Long id;
+
+	private String code;
+
+	private String name;
+
+	private Long rootOrgId;
+
+	private Boolean enable;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getCode() {
+		return code;
+	}
+
+	public void setCode(String code) {
+		this.code = code;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public Boolean getEnable() {
+		return enable;
+	}
+
+	public void setEnable(Boolean enable) {
+		this.enable = enable;
+	}
+
+}

+ 165 - 0
examcloud-task-service/src/main/java/cn/com/qmth/examcloud/task/service/bean/StudentInfo.java

@@ -0,0 +1,165 @@
+package cn.com.qmth.examcloud.task.service.bean;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.JsonSerializable;
+
+public class StudentInfo implements JsonSerializable  {
+
+	private static final long serialVersionUID = -8613202479412809385L;
+
+	/**
+	 * 学生ID
+	 */
+	private Long id;
+
+	/**
+	 * 学生姓名
+	 */
+	private String name;
+
+	/**
+	 * 顶级机构ID
+	 */
+	private Long rootOrgId;
+
+	/**
+	 * 机构ID
+	 */
+	private Long orgId;
+
+	/**
+	 * 学习中心编码
+	 */
+	private String orgCode;
+
+	/**
+	 * 学习中心名称
+	 */
+	private String orgName;
+
+	/**
+	 * 学生code
+	 */
+	private String studentCode;
+
+	/**
+	 * 身份证号码
+	 */
+	private String identityNumber;
+
+	/**
+	 * 图片地址
+	 */
+	private String photoPath;
+
+	/**
+	 * 手机号码
+	 */
+	private String phoneNumber;
+
+	/**
+	 * 是否可用
+	 */
+	private Boolean enable;
+
+	/**
+	 * 安全手机号码(用于登录)
+	 */
+	private String securityPhone;
+
+	public Long getId() {
+		return id;
+	}
+
+	public void setId(Long id) {
+		this.id = id;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public Long getOrgId() {
+		return orgId;
+	}
+
+	public void setOrgId(Long orgId) {
+		this.orgId = orgId;
+	}
+
+	public String getOrgCode() {
+		return orgCode;
+	}
+
+	public void setOrgCode(String orgCode) {
+		this.orgCode = orgCode;
+	}
+
+	public String getOrgName() {
+		return orgName;
+	}
+
+	public void setOrgName(String orgName) {
+		this.orgName = orgName;
+	}
+
+	public String getStudentCode() {
+		return studentCode;
+	}
+
+	public void setStudentCode(String studentCode) {
+		this.studentCode = studentCode;
+	}
+
+	public String getIdentityNumber() {
+		return identityNumber;
+	}
+
+	public void setIdentityNumber(String identityNumber) {
+		this.identityNumber = identityNumber;
+	}
+
+	public String getPhotoPath() {
+		return photoPath;
+	}
+
+	public void setPhotoPath(String photoPath) {
+		this.photoPath = photoPath;
+	}
+
+	public String getPhoneNumber() {
+		return phoneNumber;
+	}
+
+	public void setPhoneNumber(String phoneNumber) {
+		this.phoneNumber = phoneNumber;
+	}
+
+	public Boolean getEnable() {
+		return enable;
+	}
+
+	public void setEnable(Boolean enable) {
+		this.enable = enable;
+	}
+
+	public String getSecurityPhone() {
+		return securityPhone;
+	}
+
+	public void setSecurityPhone(String securityPhone) {
+		this.securityPhone = securityPhone;
+	}
+
+}

+ 45 - 0
examcloud-task-service/src/main/java/cn/com/qmth/examcloud/task/service/impl/DataSyncServiceImpl.java

@@ -0,0 +1,45 @@
+package cn.com.qmth.examcloud.task.service.impl;
+
+import org.springframework.stereotype.Service;
+
+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;
+
+/**
+ * 类注释
+ *
+ * @author WANGWEI
+ * @date 2018年8月2日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+@Service
+public class DataSyncServiceImpl implements DataSyncService {
+
+	@Override
+	public void syncCourse(CourseInfo info) {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void syncOrg(OrgInfo info) {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void syncStudent(StudentInfo info) {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void syncSpecialty(SpecialtyInfo info) {
+		// TODO Auto-generated method stub
+
+	}
+
+}