Commit 7022acf2 authored by 周健威's avatar 周健威

修改接口

parent 4a7abea5
......@@ -738,6 +738,7 @@ public class GtDataRestClient {
* @param filePath
* 文件保存的路径
* @param path
* gtdata 路径
* @param sign
* @param time
* @return
......
......@@ -60,9 +60,9 @@ public class AdminDataTempcacheController extends BaseController<DataTempcacheBi
if(DataTempcache.UPTYPE_GTDATA == dataTempcacheDB.getUptype()) {
//判断是否存在本地路径和url
if(StrUtil.isBlank(dataTempcacheDB.getUpurl())) {
Map<String, Object> result = gtDataRestClient.open(dataTempcacheDB.getGtdataPath());
byte[] content = (byte[]) result.get("file");
getResponse().setContentLength(content.length);
// Map<String, Object> result = gtDataRestClient.openLarge(dataTempcacheDB.getGtdataPath());
// byte[] content = (byte[]) result.get("file");
// getResponse().setContentLength(content.length);
String realPath = tempcachePath+"/"+dataTempcache.getId();
String serverPath = baseUploadPath + realPath;
......@@ -71,7 +71,9 @@ public class AdminDataTempcacheController extends BaseController<DataTempcacheBi
FileUtil.mkdir(serverPath);
}
FileUtil.writeBytes(content, serverPath + "/" + dataTempcache.getFilename());
gtDataRestClient.openLarge(serverPath + "/" + dataTempcache.getFilename(), dataTempcacheDB.getGtdataPath());
// FileUtil.writeBytes(content, serverPath + "/" + dataTempcache.getFilename());
baseBiz.updateSelectiveById(new DataTempcache(){{
setId(dataTempcacheDB.getId());
setFilepath(serverPath + "/" + dataTempcache.getFilename());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment