Commit 1a87da92 by Huang Linyu

Merge branch 'release' of 192.168.10.6:caosy/fun-admin into release

parents b7c269a2 bdef0c47
...@@ -54,10 +54,12 @@ public class QiniuFileService { ...@@ -54,10 +54,12 @@ public class QiniuFileService {
new InetSocketAddress(proxyHost, proxyPort))); new InetSocketAddress(proxyHost, proxyPort)));
} }
if (multipartFile == null || multipartFile.isEmpty()) { if (multipartFile == null || multipartFile.isEmpty()) {
System.out.println("multipartFile is null 000");
logger.error("Qiniu upload error:host:" + proxyHost + ",port:" + proxyPort, "上传文件不能为空"); logger.error("Qiniu upload error:host:" + proxyHost + ",port:" + proxyPort, "上传文件不能为空");
return null; return null;
} }
if (StringUtils.isEmpty(filename) || StringUtils.isEmpty(filename.trim())) { if (StringUtils.isEmpty(filename) || StringUtils.isEmpty(filename.trim())) {
System.out.println("multipartFile is null 111");
logger.error("Qiniu upload error:host:" + proxyHost + ",port:" + proxyPort, "上传文件名为空"); logger.error("Qiniu upload error:host:" + proxyHost + ",port:" + proxyPort, "上传文件名为空");
return null; return null;
} }
...@@ -76,11 +78,13 @@ public class QiniuFileService { ...@@ -76,11 +78,13 @@ public class QiniuFileService {
QiniuResponse qiniuResponse = new Gson() QiniuResponse qiniuResponse = new Gson()
.fromJson(res.bodyString(), QiniuResponse.class); .fromJson(res.bodyString(), QiniuResponse.class);
if (!StringUtils.isEmpty(qiniuResponse.getError())) { if (!StringUtils.isEmpty(qiniuResponse.getError())) {
System.out.println("multipartFile is null 2222");
logger.error("Qiniu upload error:host:" + proxyHost + ",port:" + proxyPort, logger.error("Qiniu upload error:host:" + proxyHost + ",port:" + proxyPort,
String.format("error: %s", qiniuResponse.getError())); String.format("error: %s", qiniuResponse.getError()));
return null; return null;
} }
if (StringUtils.isEmpty(qiniuResponse.getKey())) { if (StringUtils.isEmpty(qiniuResponse.getKey())) {
System.out.println("multipartFile is null 3333");
logger.error("Qiniu upload error:host:" + proxyHost + ",port:" + proxyPort, "七牛服务返回值的key为空"); logger.error("Qiniu upload error:host:" + proxyHost + ",port:" + proxyPort, "七牛服务返回值的key为空");
return null; return null;
} }
...@@ -89,15 +93,18 @@ public class QiniuFileService { ...@@ -89,15 +93,18 @@ public class QiniuFileService {
com.ctrip.fun.admin.utility.qiniu.QiniuResponse r = e.response; com.ctrip.fun.admin.utility.qiniu.QiniuResponse r = e.response;
if (r != null) { if (r != null) {
try { try {
logger.error("Qiniu upload error:host:" + proxyHost + ",port:" + proxyPort, System.out.println("multipartFile is null 444");
logger.error("Qiniu upload error:host:" + proxyHost + ",port:" + proxyPort+",exception:"+r.bodyString(),
String.format("QiniuException msg: %s", r.bodyString())); String.format("QiniuException msg: %s", r.bodyString()));
} catch (Exception e2) { } catch (Exception e2) {
System.out.println("multipartFile is null 555");
logger.error("Qiniu upload error:host:" + proxyHost + ",port:" + proxyPort, logger.error("Qiniu upload error:host:" + proxyHost + ",port:" + proxyPort,
String.format("Exceptio2 msg: %s", e.getMessage())); String.format("Exceptio2 msg: %s", e.getMessage()));
} }
} }
} catch (Exception e) { } catch (Exception e) {
System.out.println("multipartFile is null 666");
logger.error("Qiniu upload error:host:" + proxyHost + ",port:" + proxyPort, logger.error("Qiniu upload error:host:" + proxyHost + ",port:" + proxyPort,
String.format("Exception error: %s", e.getMessage())); String.format("Exception error: %s", e.getMessage()));
} finally { } finally {
......
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 sign in to comment