WANG 6 years ago
parent
commit
fa3406ee21

+ 45 - 0
examcloud-exchange-inner-api-client/src/main/java/cn/com/qmth/examcloud/exchange/inner/api/client/UpyunCloudServiceClient.java

@@ -0,0 +1,45 @@
+package cn.com.qmth.examcloud.exchange.inner.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.exchange.inner.api.UpyunCloudService;
+import cn.com.qmth.examcloud.exchange.inner.api.request.PutFileReq;
+import cn.com.qmth.examcloud.exchange.inner.api.response.PutFileResp;
+
+/**
+ * 类注释
+ *
+ * @author WANGWEI
+ * @date 2018年11月27日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+@Service
+public class UpyunCloudServiceClient extends ExchangeCloudClientSupport
+		implements
+			UpyunCloudService {
+
+	@Autowired
+	RestTemplate restTemplate;
+
+	@Autowired
+	private RedisClient redisClient;
+
+	@Override
+	protected RedisClient getRedisClient() {
+		return redisClient;
+	}
+
+	@Override
+	protected RestTemplate getRestTemplate() {
+		return restTemplate;
+	}
+
+	@Override
+	public PutFileResp putFile(PutFileReq req) {
+		return null;
+	}
+
+}

+ 24 - 0
examcloud-exchange-inner-api/src/main/java/cn/com/qmth/examcloud/exchange/inner/api/UpyunCloudService.java

@@ -0,0 +1,24 @@
+package cn.com.qmth.examcloud.exchange.inner.api;
+
+import cn.com.qmth.examcloud.exchange.inner.api.request.PutFileReq;
+import cn.com.qmth.examcloud.exchange.inner.api.response.PutFileResp;
+
+/**
+ * 类注释
+ *
+ * @author WANGWEI
+ * @date 2018年11月27日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public interface UpyunCloudService {
+
+	/**
+	 * 方法注释
+	 *
+	 * @author WANGWEI
+	 * @param req
+	 * @return
+	 */
+	public PutFileResp putFile(PutFileReq req);
+
+}

+ 68 - 0
examcloud-exchange-inner-api/src/main/java/cn/com/qmth/examcloud/exchange/inner/api/request/PutFileReq.java

@@ -0,0 +1,68 @@
+package cn.com.qmth.examcloud.exchange.inner.api.request;
+
+import java.io.File;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.BaseRequest;
+
+/**
+ * 类注释
+ *
+ * @author WANGWEI
+ * @date 2018年11月27日
+ * @Copyright (c) 2018-? http://qmth.com.cn All Rights Reserved.
+ */
+public class PutFileReq extends BaseRequest {
+
+	private static final long serialVersionUID = -5081384094670542845L;
+
+	private String siteId;
+
+	private Long rootOrgId;
+
+	private Long userId;
+
+	private File file;
+
+	private String fileName;
+
+	public String getSiteId() {
+		return siteId;
+	}
+
+	public void setSiteId(String siteId) {
+		this.siteId = siteId;
+	}
+
+	public Long getRootOrgId() {
+		return rootOrgId;
+	}
+
+	public void setRootOrgId(Long rootOrgId) {
+		this.rootOrgId = rootOrgId;
+	}
+
+	public Long getUserId() {
+		return userId;
+	}
+
+	public void setUserId(Long userId) {
+		this.userId = userId;
+	}
+
+	public File getFile() {
+		return file;
+	}
+
+	public void setFile(File file) {
+		this.file = file;
+	}
+
+	public String getFileName() {
+		return fileName;
+	}
+
+	public void setFileName(String fileName) {
+		this.fileName = fileName;
+	}
+
+}

+ 9 - 0
examcloud-exchange-inner-api/src/main/java/cn/com/qmth/examcloud/exchange/inner/api/response/PutFileResp.java

@@ -0,0 +1,9 @@
+package cn.com.qmth.examcloud.exchange.inner.api.response;
+
+import cn.com.qmth.examcloud.commons.web.cloud.api.BaseResponse;
+
+public class PutFileResp extends BaseResponse {
+
+	private static final long serialVersionUID = 8104484024663316592L;
+
+}