Преглед изворни кода

add examcloud-core-oe-admin module.

deason пре 6 година
родитељ
комит
825bd27cdc

+ 23 - 0
examcloud-core-oe-admin-api/pom.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>cn.com.qmth.examcloud</groupId>
+    <artifactId>examcloud-core-oe-admin-api</artifactId>
+    <packaging>jar</packaging>
+
+    <parent>
+        <groupId>cn.com.qmth.examcloud.rmi</groupId>
+        <artifactId>examcloud-rmi</artifactId>
+        <version>2.0-SNAPSHOT</version>
+    </parent>
+
+    <dependencies>
+        <dependency>
+            <groupId>cn.com.qmth.examcloud.commons</groupId>
+            <artifactId>examcloud-commons-web</artifactId>
+            <version>${examcloud.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 27 - 0
examcloud-core-oe-admin-api/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/ExamInfoCloudService.java

@@ -0,0 +1,27 @@
+/*
+ * *************************************************
+ * Copyright (c) 2018 QMTH. All Rights Reserved.
+ * Created by Deason on 2018-08-15 14:15:53.
+ * *************************************************
+ */
+
+package cn.com.qmth.examcloud.core.oe.admin.api;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.CloudService;
+import cn.com.qmth.examcloud.core.oe.admin.api.request.SaveExamInfoReq;
+import cn.com.qmth.examcloud.core.oe.admin.api.response.SaveExamInfoResp;
+
+/**
+ * 考生的考试信息接口
+ *
+ * @author: fengdesheng
+ * @since: 2018/8/15
+ */
+public interface ExamInfoCloudService extends CloudService {
+
+    /**
+     * 保存考生信息
+     */
+    SaveExamInfoResp saveExamInfo(SaveExamInfoReq req);
+
+}

+ 54 - 0
examcloud-core-oe-admin-api/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/bean/ExamInfoBean.java

@@ -0,0 +1,54 @@
+/*
+ * *************************************************
+ * Copyright (c) 2018 QMTH. All Rights Reserved.
+ * Created by Deason on 2018-08-16 15:58:23.
+ * *************************************************
+ */
+
+package cn.com.qmth.examcloud.core.oe.admin.api.bean;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.JsonSerializable;
+
+/**
+ * @author: fengdesheng
+ * @since: 2018/8/15
+ */
+public class ExamInfoBean implements JsonSerializable {
+    private Long id;
+    private Long rootOrgId;
+    private Long studentId;
+    private String studentName;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getRootOrgId() {
+        return rootOrgId;
+    }
+
+    public void setRootOrgId(Long rootOrgId) {
+        this.rootOrgId = rootOrgId;
+    }
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+
+    public String getStudentName() {
+        return studentName;
+    }
+
+    public void setStudentName(String studentName) {
+        this.studentName = studentName;
+    }
+
+}

+ 45 - 0
examcloud-core-oe-admin-api/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/request/SaveExamInfoReq.java

@@ -0,0 +1,45 @@
+/*
+ * *************************************************
+ * Copyright (c) 2018 QMTH. All Rights Reserved.
+ * Created by Deason on 2018-08-16 15:58:12.
+ * *************************************************
+ */
+
+package cn.com.qmth.examcloud.core.oe.admin.api.request;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.BaseRequest;
+
+/**
+ * @author: fengdesheng
+ * @since: 2018/8/15
+ */
+public class SaveExamInfoReq extends BaseRequest {
+    private Long rootOrgId;
+    private Long studentId;
+    private String studentName;
+
+    public Long getRootOrgId() {
+        return rootOrgId;
+    }
+
+    public void setRootOrgId(Long rootOrgId) {
+        this.rootOrgId = rootOrgId;
+    }
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+
+    public String getStudentName() {
+        return studentName;
+    }
+
+    public void setStudentName(String studentName) {
+        this.studentName = studentName;
+    }
+
+}

+ 29 - 0
examcloud-core-oe-admin-api/src/main/java/cn/com/qmth/examcloud/core/oe/admin/api/response/SaveExamInfoResp.java

@@ -0,0 +1,29 @@
+/*
+ * *************************************************
+ * Copyright (c) 2018 QMTH. All Rights Reserved.
+ * Created by Deason on 2018-08-16 16:17:06.
+ * *************************************************
+ */
+
+package cn.com.qmth.examcloud.core.oe.admin.api.response;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.BaseResponse;
+import cn.com.qmth.examcloud.core.oe.admin.api.bean.ExamInfoBean;
+
+/**
+ * @author: fengdesheng
+ * @since: 2018/8/15
+ */
+public class SaveExamInfoResp extends BaseResponse {
+
+    private ExamInfoBean examInfoBean;
+
+    public ExamInfoBean getExamInfoBean() {
+        return examInfoBean;
+    }
+
+    public void setExamInfoBean(ExamInfoBean examInfoBean) {
+        this.examInfoBean = examInfoBean;
+    }
+
+}

+ 23 - 0
examcloud-core-oe-admin-client/pom.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>cn.com.qmth.examcloud</groupId>
+    <artifactId>examcloud-core-oe-admin-client</artifactId>
+    <packaging>jar</packaging>
+
+    <parent>
+        <groupId>cn.com.qmth.examcloud.rmi</groupId>
+        <artifactId>examcloud-rmi</artifactId>
+        <version>2.0-SNAPSHOT</version>
+    </parent>
+
+    <dependencies>
+        <dependency>
+            <groupId>cn.com.qmth.examcloud</groupId>
+            <artifactId>examcloud-core-oe-admin-api</artifactId>
+            <version>${examcloud.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>

+ 23 - 0
examcloud-core-oe-admin-client/src/main/java/cn/com/qmth/examcloud/core/oe/admin/client/BasicCloudClientSupport.java

@@ -0,0 +1,23 @@
+/*
+ * *************************************************
+ * Copyright (c) 2018 QMTH. All Rights Reserved.
+ * Created by Deason on 2018-08-16 16:20:56.
+ * *************************************************
+ */
+
+package cn.com.qmth.examcloud.core.oe.admin.client;
+
+import cn.com.qmth.examcloud.commons.web.support.CloudClientSupport;
+
+/**
+ * @author: fengdesheng
+ * @since: 2018/8/15
+ */
+public abstract class BasicCloudClientSupport extends CloudClientSupport {
+
+    @Override
+    public String getUrlPrefix() {
+        return "http://EXAMCLOUD-SERVICE-OE/api/core/oe/";
+    }
+
+}

+ 47 - 0
examcloud-core-oe-admin-client/src/main/java/cn/com/qmth/examcloud/core/oe/admin/client/ExamInfoCloudServiceClient.java

@@ -0,0 +1,47 @@
+/*
+ * *************************************************
+ * Copyright (c) 2018 QMTH. All Rights Reserved.
+ * Created by Deason on 2018-08-16 16:19:24.
+ * *************************************************
+ */
+
+package cn.com.qmth.examcloud.core.oe.admin.client;
+
+import cn.com.qmth.examcloud.commons.web.redis.RedisClient;
+import cn.com.qmth.examcloud.core.oe.admin.api.ExamInfoCloudService;
+import cn.com.qmth.examcloud.core.oe.admin.api.request.SaveExamInfoReq;
+import cn.com.qmth.examcloud.core.oe.admin.api.response.SaveExamInfoResp;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+/**
+ * 考生的考试信息接口
+ *
+ * @author: fengdesheng
+ * @since: 2018/8/15
+ */
+@Service
+public class ExamInfoCloudServiceClient extends BasicCloudClientSupport implements ExamInfoCloudService {
+    private static final long serialVersionUID = -8874453764538303046L;
+    @Autowired
+    private RestTemplate restTemplate;
+    @Autowired
+    private RedisClient redisClient;
+
+    @Override
+    public SaveExamInfoResp saveExamInfo(SaveExamInfoReq examInfoReq) {
+        return post("examInfo/saveExamInfo", examInfoReq, SaveExamInfoResp.class);
+    }
+
+    @Override
+    protected RedisClient getRedisClient() {
+        return redisClient;
+    }
+
+    @Override
+    protected RestTemplate getRestTemplate() {
+        return restTemplate;
+    }
+
+}

+ 26 - 23
pom.xml

@@ -1,31 +1,34 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>cn.com.qmth.examcloud</groupId>
-		<artifactId>examcloud-parent</artifactId>
-		<version>2.0-SNAPSHOT</version>
-	</parent>
-	<groupId>cn.com.qmth.examcloud.rmi</groupId>
-	<artifactId>examcloud-rmi</artifactId>
-	<packaging>pom</packaging>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>cn.com.qmth.examcloud</groupId>
+        <artifactId>examcloud-parent</artifactId>
+        <version>2.0-SNAPSHOT</version>
+    </parent>
+    <groupId>cn.com.qmth.examcloud.rmi</groupId>
+    <artifactId>examcloud-rmi</artifactId>
+    <packaging>pom</packaging>
 
-	<modules>
-		<module>examcloud-core-basic-api</module>
-		<module>examcloud-core-basic-api-client</module>
+    <modules>
+        <module>examcloud-core-basic-api</module>
+        <module>examcloud-core-basic-api-client</module>
 
-		<module>examcloud-core-examwork-api</module>
-		<module>examcloud-core-examwork-api-client</module>
+        <module>examcloud-core-examwork-api</module>
+        <module>examcloud-core-examwork-api-client</module>
 
-		<module>examcloud-exchange-inner-api</module>
-		<module>examcloud-exchange-inner-api-client</module>
+        <module>examcloud-exchange-inner-api</module>
+        <module>examcloud-exchange-inner-api-client</module>
 
-		<module>examcloud-task-api</module>
-		<module>examcloud-task-api-client</module>
-		
-		<module>examcloud-core-questions-api</module>
-		<module>examcloud-core-questions-api-client</module>
+        <module>examcloud-task-api</module>
+        <module>examcloud-task-api-client</module>
 
-	</modules>
+        <module>examcloud-core-oe-admin-api</module>
+        <module>examcloud-core-oe-admin-client</module>
+
+        <module>examcloud-core-questions-api</module>
+        <module>examcloud-core-questions-api-client</module>
+    </modules>
 
 </project>