提交 10ebcc2c 编写于 作者: chenzhehao's avatar chenzhehao

返回null判定

上级 c355df73
...@@ -3,6 +3,7 @@ package com.pica.cloud.wechat.yunqueyilian.common.aop; ...@@ -3,6 +3,7 @@ package com.pica.cloud.wechat.yunqueyilian.common.aop;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken; import com.google.gson.reflect.TypeToken;
import com.pica.cloud.foundation.utils.utils.StringUtil;
import org.apache.commons.fileupload.servlet.ServletFileUpload; import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.ProceedingJoinPoint;
...@@ -72,7 +73,9 @@ public class PicaLogAspectForXml { ...@@ -72,7 +73,9 @@ public class PicaLogAspectForXml {
Object result = pjp.proceed(); Object result = pjp.proceed();
String res = ""; String res = "";
if (this.contentType.get().equals("text/xml")) { if (this.contentType.get().equals("text/xml")) {
res = result.toString(); if (StringUtil.isNull(result)){
res = result.toString();
}
} else if (this.contentType.get().equals("application/json")) { } else if (this.contentType.get().equals("application/json")) {
Gson gson = new Gson(); Gson gson = new Gson();
res = gson.toJson(result); res = gson.toJson(result);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册