|
@@ -0,0 +1,44 @@
|
|
|
+package cn.com.qmth.examcloud.core.questions.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.questions.api.PaperCloudService;
|
|
|
+import cn.com.qmth.examcloud.core.questions.api.request.GetQuestionListReq;
|
|
|
+import cn.com.qmth.examcloud.core.questions.api.response.GetPaperResp;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author weiwenhai
|
|
|
+ * @date 2018.10.8
|
|
|
+ * @company qmth
|
|
|
+ * @description 试卷对象远程调用
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class PaperCloudServiceClient extends BasicCloudClientSupport implements PaperCloudService{
|
|
|
+
|
|
|
+ private static final long serialVersionUID = 1657323811328647049L;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private RestTemplate restTemplate;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private RedisClient redisClient;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public GetPaperResp genPaper(GetQuestionListReq req) {
|
|
|
+ return post("default_paper/save", req, GetPaperResp.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected RestTemplate getRestTemplate() {
|
|
|
+ return restTemplate;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected RedisClient getRedisClient() {
|
|
|
+ return redisClient;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|