|
@@ -1,18 +1,10 @@
|
|
|
package cn.com.qmth.examcloud.exchange.inner.api.client;
|
|
|
|
|
|
-import java.io.File;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.web.client.RestTemplate;
|
|
|
-
|
|
|
-import com.google.common.collect.Maps;
|
|
|
|
|
|
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;
|
|
|
-import cn.com.qmth.examcloud.web.redis.RedisClient;
|
|
|
|
|
|
/**
|
|
|
* 类注释
|
|
@@ -30,16 +22,7 @@ public class UpyunCloudServiceClient extends AbstractCloudClientSupport
|
|
|
|
|
|
@Override
|
|
|
public PutFileResp putFile(PutFileReq req) {
|
|
|
- Map<String, String> params = Maps.newHashMap();
|
|
|
- params.put("siteId", req.getSiteId());
|
|
|
- params.put("fileSuffix", req.getFileSuffix());
|
|
|
- params.put("rootOrgId", String.valueOf(req.getRootOrgId()));
|
|
|
- params.put("userId", String.valueOf(req.getUserId()));
|
|
|
- params.put("filePath", req.getFilePath());
|
|
|
-
|
|
|
- // return postForm("upyun/putFile", params, new File(req.getFilePath()),
|
|
|
- // PutFileResp.class);
|
|
|
- return null;
|
|
|
+ return postForm("upyun/putFile", req, PutFileResp.class);
|
|
|
}
|
|
|
|
|
|
}
|