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

修改接口

parent 4a7abea5
...@@ -738,6 +738,7 @@ public class GtDataRestClient { ...@@ -738,6 +738,7 @@ public class GtDataRestClient {
* @param filePath * @param filePath
* 文件保存的路径 * 文件保存的路径
* @param path * @param path
* gtdata 路径
* @param sign * @param sign
* @param time * @param time
* @return * @return
......
...@@ -60,9 +60,9 @@ public class AdminDataTempcacheController extends BaseController<DataTempcacheBi ...@@ -60,9 +60,9 @@ public class AdminDataTempcacheController extends BaseController<DataTempcacheBi
if(DataTempcache.UPTYPE_GTDATA == dataTempcacheDB.getUptype()) { if(DataTempcache.UPTYPE_GTDATA == dataTempcacheDB.getUptype()) {
//判断是否存在本地路径和url //判断是否存在本地路径和url
if(StrUtil.isBlank(dataTempcacheDB.getUpurl())) { if(StrUtil.isBlank(dataTempcacheDB.getUpurl())) {
Map<String, Object> result = gtDataRestClient.open(dataTempcacheDB.getGtdataPath()); // Map<String, Object> result = gtDataRestClient.openLarge(dataTempcacheDB.getGtdataPath());
byte[] content = (byte[]) result.get("file"); // byte[] content = (byte[]) result.get("file");
getResponse().setContentLength(content.length); // getResponse().setContentLength(content.length);
String realPath = tempcachePath+"/"+dataTempcache.getId(); String realPath = tempcachePath+"/"+dataTempcache.getId();
String serverPath = baseUploadPath + realPath; String serverPath = baseUploadPath + realPath;
...@@ -71,7 +71,9 @@ public class AdminDataTempcacheController extends BaseController<DataTempcacheBi ...@@ -71,7 +71,9 @@ public class AdminDataTempcacheController extends BaseController<DataTempcacheBi
FileUtil.mkdir(serverPath); 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(){{ baseBiz.updateSelectiveById(new DataTempcache(){{
setId(dataTempcacheDB.getId()); setId(dataTempcacheDB.getId());
setFilepath(serverPath + "/" + dataTempcache.getFilename()); 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