WANG há 6 anos atrás
pai
commit
d54bac6198

+ 5 - 0
examcloud-exchange-inner-api-provider/src/main/java/cn/com/qmth/examcloud/exchange/inner/api/provider/UpyunCloudServiceProvider.java

@@ -1,6 +1,7 @@
 package cn.com.qmth.examcloud.exchange.inner.api.provider;
 
 import java.io.IOException;
+import java.util.Map;
 
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.ModelAttribute;
@@ -45,6 +46,8 @@ public class UpyunCloudServiceProvider extends ControllerSupport implements Upyu
 	@Override
 	public PutFileResp putFile(@ModelAttribute PutFileReq req) {
 		String fileSuffix = req.getFileSuffix();
+		String relativePath = req.getRelativePath();
+		Map<String, String> properties = req.getProperties();
 		Long rootOrgId = req.getRootOrgId();
 		Long userId = req.getUserId();
 		String siteId = req.getSiteId();
@@ -54,6 +57,8 @@ public class UpyunCloudServiceProvider extends ControllerSupport implements Upyu
 		env.setRootOrgId(String.valueOf(rootOrgId));
 		env.setUserId(String.valueOf(userId));
 		env.setFileSuffix(fileSuffix);
+		env.setRelativePath(relativePath);
+		env.setProperties(properties);
 
 		UpYunPathInfo path = null;
 		try {

+ 28 - 0
examcloud-exchange-inner-service/src/main/java/cn/com/qmth/examcloud/exchange/inner/service/bean/UpyunPathEnvironmentInfo.java

@@ -1,5 +1,7 @@
 package cn.com.qmth.examcloud.exchange.inner.service.bean;
 
+import java.util.Map;
+
 import cn.com.qmth.examcloud.api.commons.exchange.JsonSerializable;
 
 /**
@@ -33,6 +35,16 @@ public class UpyunPathEnvironmentInfo implements JsonSerializable {
 	 */
 	private String fileSuffix;
 
+	/**
+	 * 相对路径
+	 */
+	private String relativePath;
+
+	/**
+	 * 其他属性
+	 */
+	private Map<String, String> properties;
+
 	public String getRootOrgId() {
 		return rootOrgId;
 	}
@@ -65,4 +77,20 @@ public class UpyunPathEnvironmentInfo implements JsonSerializable {
 		this.fileSuffix = fileSuffix;
 	}
 
+	public String getRelativePath() {
+		return relativePath;
+	}
+
+	public void setRelativePath(String relativePath) {
+		this.relativePath = relativePath;
+	}
+
+	public Map<String, String> getProperties() {
+		return properties;
+	}
+
+	public void setProperties(Map<String, String> properties) {
+		this.properties = properties;
+	}
+
 }