|
@@ -0,0 +1,33 @@
|
|
|
+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.core.basic.api.UserCloudService;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.request.LoginReq;
|
|
|
+import cn.com.qmth.examcloud.core.basic.api.response.LoginResp;
|
|
|
+
|
|
|
+/**
|
|
|
+ * user 云服务客户端
|
|
|
+ *
|
|
|
+ * @author WANGWEI
|
|
|
+ *
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class UserCloudServiceClient extends BasicCloudClientSupport implements UserCloudService {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ RestTemplate restTemplate;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ protected RestTemplate getRestTemplate() {
|
|
|
+ return restTemplate;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public LoginResp login(LoginReq req) {
|
|
|
+ return post("user/login", req, LoginResp.class);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|