文件下载

master
chengqf 2 years ago
parent 5b395ca619
commit c2a680f85f

@ -89,7 +89,6 @@ public class FileServiceImpl implements FileService {
if(!isExists) if(!isExists)
return ResultVOUtils.error(9999,filePath + filePathSlash + imagePath + strs[0]); return ResultVOUtils.error(9999,filePath + filePathSlash + imagePath + strs[0]);
String result = relayFile(files,host); String result = relayFile(files,host);
logger.error(result);
if (IDCUtils.isJson(result)) { if (IDCUtils.isJson(result)) {
BaseResponse baseResponse = JSON.parseObject(result,BaseResponse.class); BaseResponse baseResponse = JSON.parseObject(result,BaseResponse.class);
return baseResponse; return baseResponse;
@ -149,7 +148,6 @@ public class FileServiceImpl implements FileService {
if(isRelay) { if(isRelay) {
String result = relayFile(saveFiles,host); String result = relayFile(saveFiles,host);
logger.info(result);
if (IDCUtils.isJson(result)&&!result.contains("<html")) { if (IDCUtils.isJson(result)&&!result.contains("<html")) {
BaseResponse baseResponse = JSON.parseObject(result,BaseResponse.class); BaseResponse baseResponse = JSON.parseObject(result,BaseResponse.class);
return baseResponse; return baseResponse;
@ -203,7 +201,6 @@ public class FileServiceImpl implements FileService {
try { try {
Response response = client.newCall(req).execute(); Response response = client.newCall(req).execute();
result = response.body().string(); result = response.body().string();
logger.info("result--->" + result);
} catch (IOException e) { } catch (IOException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
@ -228,7 +225,7 @@ public class FileServiceImpl implements FileService {
} }
if(!StringUtils.isEmpty(host)) { if(!StringUtils.isEmpty(host)) {
String result = IDCUtils.post(host+"/spssync/file/downloadFile", params); String result = IDCUtils.post(host+"/spssync/file/downloadFile", params);
logger.info(host+":sync-result--"+result);
JSONObject object = JSON.parseObject(result); JSONObject object = JSON.parseObject(result);
boolean success = false; boolean success = false;
if(object.getInteger("code")==20000) { if(object.getInteger("code")==20000) {

Loading…
Cancel
Save