|
@@ -0,0 +1,47 @@
|
|
|
+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.SysConfigCloudService;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.request.GetSysConfigReq;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.request.SetSysConfigReq;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.response.GetSysConfigResp;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.response.SetSysConfigResp;
|
|
|
+
|
|
|
+@Service
|
|
|
+public class SysConfigCloudServiceClient extends BasicCloudClientSupport
|
|
|
+ implements
|
|
|
+ SysConfigCloudService {
|
|
|
+
|
|
|
+ private static final long serialVersionUID = -1572107451517177867L;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private RestTemplate restTemplate;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private RedisClient redisClient;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected RedisClient getRedisClient() {
|
|
|
+ return redisClient;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected RestTemplate getRestTemplate() {
|
|
|
+ return restTemplate;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public SetSysConfigResp setSysConfig(SetSysConfigReq req) {
|
|
|
+ return post("sysConfig/setSysConfig", req, SetSysConfigResp.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public GetSysConfigResp getSysConfig(GetSysConfigReq req) {
|
|
|
+ return post("sysConfig/getSysConfig", req, GetSysConfigResp.class);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|