|
@@ -1,47 +1,54 @@
|
|
|
-package cn.com.qmth.examcloud.core.basic.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.core.basic.api.StudentCloudService;
|
|
|
-import cn.com.qmth.examcloud.core.basic.api.request.GetStudentReq;
|
|
|
-import cn.com.qmth.examcloud.core.basic.api.request.SaveStudentReq;
|
|
|
-import cn.com.qmth.examcloud.core.basic.api.response.GetStudentResp;
|
|
|
-import cn.com.qmth.examcloud.core.basic.api.response.SaveStudentResp;
|
|
|
-
|
|
|
-@Service
|
|
|
-public class StudentCloudServiceClient extends BasicCloudClientSupport
|
|
|
- implements
|
|
|
- StudentCloudService {
|
|
|
-
|
|
|
- private static final long serialVersionUID = 7669672850482842766L;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private RestTemplate restTemplate;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private RedisClient redisClient;
|
|
|
-
|
|
|
- @Override
|
|
|
- protected RedisClient getRedisClient() {
|
|
|
- return redisClient;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- protected RestTemplate getRestTemplate() {
|
|
|
- return restTemplate;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public SaveStudentResp saveStudent(SaveStudentReq studentReq) {
|
|
|
- return post("student/saveStudent", studentReq, SaveStudentResp.class);
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- public GetStudentResp getStudent(GetStudentReq req) {
|
|
|
- return post("student/getStudent", req, GetStudentResp.class);
|
|
|
- }
|
|
|
-
|
|
|
-}
|
|
|
+package cn.com.qmth.examcloud.core.basic.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.core.basic.api.StudentCloudService;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.request.GetStudentReq;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.request.SaveStudentReq;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.request.UnbindStudentCodeReq;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.response.GetStudentResp;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.response.SaveStudentResp;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.response.UnbindStudentCodeResp;
|
|
|
+
|
|
|
+@Service
|
|
|
+public class StudentCloudServiceClient extends BasicCloudClientSupport
|
|
|
+ implements
|
|
|
+ StudentCloudService {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 7669672850482842766L;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private RestTemplate restTemplate;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private RedisClient redisClient;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected RedisClient getRedisClient() {
|
|
|
+ return redisClient;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected RestTemplate getRestTemplate() {
|
|
|
+ return restTemplate;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public SaveStudentResp saveStudent(SaveStudentReq req) {
|
|
|
+ return post("student/saveStudent", req, SaveStudentResp.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public GetStudentResp getStudent(GetStudentReq req) {
|
|
|
+ return post("student/getStudent", req, GetStudentResp.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public UnbindStudentCodeResp unbindStudentCode(UnbindStudentCodeReq req) {
|
|
|
+ return post("student/unbindStudentCode", req, UnbindStudentCodeResp.class);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|