|
@@ -1,131 +1,131 @@
|
|
-package cn.com.qmth.examcloud.examwork.api.client;
|
|
|
|
-
|
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
|
-import org.springframework.web.client.RestTemplate;
|
|
|
|
-
|
|
|
|
-import cn.com.qmth.examcloud.commons.web.redis.RedisClient;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.ExamCloudService;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.request.CountExamStudentReq;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.request.GetExamCourseListReq;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.request.GetExamCoursePaperTypeListReq;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.request.GetExamListReq;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.request.GetExamOrgListReq;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.request.GetExamPropertyReq;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.request.GetExamReq;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.request.GetExamStudentPropertyValueListReq;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.request.GetOngoingExamListReq;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.request.LockExamStudentsReq;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.request.SaveExamReq;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.request.SetExamPropertyReq;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.request.UnlockExamStudentsReq;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.response.CountExamStudentResp;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.response.GetExamCourseListResp;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.response.GetExamCoursePaperTypeListResp;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.response.GetExamListResp;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.response.GetExamOrgListResp;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.response.GetExamPropertyResp;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.response.GetExamResp;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.response.GetExamStudentPropertyValueListResp;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.response.GetOngoingExamListResp;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.response.LockExamStudentsResp;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.response.SaveExamResp;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.response.SetExamPropertyResp;
|
|
|
|
-import cn.com.qmth.examcloud.examwork.api.response.UnlockExamStudentsResp;
|
|
|
|
-
|
|
|
|
-/**
|
|
|
|
- * @author chenken
|
|
|
|
- * @date 2018年5月3日 上午9:18:19
|
|
|
|
- * @company QMTH
|
|
|
|
- * @description ExamClient.java
|
|
|
|
- */
|
|
|
|
-@Service
|
|
|
|
-public class ExamCloudServiceClient extends BasicCloudClientSupport implements ExamCloudService {
|
|
|
|
-
|
|
|
|
- private static final long serialVersionUID = -2880611326177571371L;
|
|
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
- RestTemplate restTemplate;
|
|
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
- private RedisClient redisClient;
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- protected RedisClient getRedisClient() {
|
|
|
|
- return redisClient;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- protected RestTemplate getRestTemplate() {
|
|
|
|
- return restTemplate;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public SaveExamResp saveExam(SaveExamReq req) {
|
|
|
|
- return post("exam/saveExam", req, SaveExamResp.class);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public GetExamResp getExam(GetExamReq req) {
|
|
|
|
- return post("exam/getExam", req, GetExamResp.class);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public SetExamPropertyResp setExamProperty(SetExamPropertyReq req) {
|
|
|
|
- return post("exam/setExamProperty", req, SetExamPropertyResp.class);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public GetExamPropertyResp getExamProperty(GetExamPropertyReq req) {
|
|
|
|
- return post("exam/getExamProperty", req, GetExamPropertyResp.class);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public GetOngoingExamListResp getOngoingExamList(GetOngoingExamListReq req) {
|
|
|
|
- return post("exam/getOngoingExamList", req, GetOngoingExamListResp.class);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public LockExamStudentsResp lockExamStudents(LockExamStudentsReq req) {
|
|
|
|
- return post("exam/lockExamStudents", req, LockExamStudentsResp.class);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public UnlockExamStudentsResp unlockExamStudents(UnlockExamStudentsReq req) {
|
|
|
|
- return post("exam/unlockExamStudents", req, UnlockExamStudentsResp.class);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public GetExamListResp getExamList(GetExamListReq req) {
|
|
|
|
- return post("exam/getExamList", req, GetExamListResp.class);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public GetExamCourseListResp getExamCourseList(GetExamCourseListReq req) {
|
|
|
|
- return post("exam/getExamCourseList", req, GetExamCourseListResp.class);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public GetExamCoursePaperTypeListResp getExamCoursePaperTypeList(
|
|
|
|
- GetExamCoursePaperTypeListReq req) {
|
|
|
|
- return post("exam/getExamCoursePaperTypeList", req, GetExamCoursePaperTypeListResp.class);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public CountExamStudentResp countExamStudent(CountExamStudentReq req) {
|
|
|
|
- return post("exam/countExamStudent", req, CountExamStudentResp.class);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public GetExamOrgListResp getExamOrgList(GetExamOrgListReq req) {
|
|
|
|
- return post("exam/getExamOrgList", req, GetExamOrgListResp.class);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public GetExamStudentPropertyValueListResp getExamStudentPropertyValueList(
|
|
|
|
- GetExamStudentPropertyValueListReq req) {
|
|
|
|
- return post("exam/getExamStudentPropertyValueList", req,
|
|
|
|
- GetExamStudentPropertyValueListResp.class);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-}
|
|
|
|
|
|
+package cn.com.qmth.examcloud.examwork.api.client;
|
|
|
|
+
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
|
+import org.springframework.web.client.RestTemplate;
|
|
|
|
+
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.ExamCloudService;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.CountExamStudentReq;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.GetExamCourseListReq;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.GetExamCoursePaperTypeListReq;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.GetExamListReq;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.GetExamOrgListReq;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.GetExamPropertyReq;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.GetExamReq;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.GetExamStudentPropertyValueListReq;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.GetOngoingExamListReq;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.LockExamStudentsReq;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.SaveExamReq;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.SetExamPropertyReq;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.request.UnlockExamStudentsReq;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.CountExamStudentResp;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.GetExamCourseListResp;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.GetExamCoursePaperTypeListResp;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.GetExamListResp;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.GetExamOrgListResp;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.GetExamPropertyResp;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.GetExamResp;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.GetExamStudentPropertyValueListResp;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.GetOngoingExamListResp;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.LockExamStudentsResp;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.SaveExamResp;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.SetExamPropertyResp;
|
|
|
|
+import cn.com.qmth.examcloud.examwork.api.response.UnlockExamStudentsResp;
|
|
|
|
+import cn.com.qmth.examcloud.web.redis.RedisClient;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @author chenken
|
|
|
|
+ * @date 2018年5月3日 上午9:18:19
|
|
|
|
+ * @company QMTH
|
|
|
|
+ * @description ExamClient.java
|
|
|
|
+ */
|
|
|
|
+@Service
|
|
|
|
+public class ExamCloudServiceClient extends BasicCloudClientSupport implements ExamCloudService {
|
|
|
|
+
|
|
|
|
+ private static final long serialVersionUID = -2880611326177571371L;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ RestTemplate restTemplate;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private RedisClient redisClient;
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ protected RedisClient getRedisClient() {
|
|
|
|
+ return redisClient;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ protected RestTemplate getRestTemplate() {
|
|
|
|
+ return restTemplate;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public SaveExamResp saveExam(SaveExamReq req) {
|
|
|
|
+ return post("exam/saveExam", req, SaveExamResp.class);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public GetExamResp getExam(GetExamReq req) {
|
|
|
|
+ return post("exam/getExam", req, GetExamResp.class);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public SetExamPropertyResp setExamProperty(SetExamPropertyReq req) {
|
|
|
|
+ return post("exam/setExamProperty", req, SetExamPropertyResp.class);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public GetExamPropertyResp getExamProperty(GetExamPropertyReq req) {
|
|
|
|
+ return post("exam/getExamProperty", req, GetExamPropertyResp.class);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public GetOngoingExamListResp getOngoingExamList(GetOngoingExamListReq req) {
|
|
|
|
+ return post("exam/getOngoingExamList", req, GetOngoingExamListResp.class);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public LockExamStudentsResp lockExamStudents(LockExamStudentsReq req) {
|
|
|
|
+ return post("exam/lockExamStudents", req, LockExamStudentsResp.class);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public UnlockExamStudentsResp unlockExamStudents(UnlockExamStudentsReq req) {
|
|
|
|
+ return post("exam/unlockExamStudents", req, UnlockExamStudentsResp.class);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public GetExamListResp getExamList(GetExamListReq req) {
|
|
|
|
+ return post("exam/getExamList", req, GetExamListResp.class);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public GetExamCourseListResp getExamCourseList(GetExamCourseListReq req) {
|
|
|
|
+ return post("exam/getExamCourseList", req, GetExamCourseListResp.class);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public GetExamCoursePaperTypeListResp getExamCoursePaperTypeList(
|
|
|
|
+ GetExamCoursePaperTypeListReq req) {
|
|
|
|
+ return post("exam/getExamCoursePaperTypeList", req, GetExamCoursePaperTypeListResp.class);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public CountExamStudentResp countExamStudent(CountExamStudentReq req) {
|
|
|
|
+ return post("exam/countExamStudent", req, CountExamStudentResp.class);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public GetExamOrgListResp getExamOrgList(GetExamOrgListReq req) {
|
|
|
|
+ return post("exam/getExamOrgList", req, GetExamOrgListResp.class);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public GetExamStudentPropertyValueListResp getExamStudentPropertyValueList(
|
|
|
|
+ GetExamStudentPropertyValueListReq req) {
|
|
|
|
+ return post("exam/getExamStudentPropertyValueList", req,
|
|
|
|
+ GetExamStudentPropertyValueListResp.class);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+}
|