Commit 548fa468 by jinxin

空指针异常处理

parent 8d3413bd
......@@ -192,6 +192,10 @@ public class MaterialServiceImpl implements MaterialService {
if (type == 4) {
fileType = QywxMediaTypeEnum.VIDEO;
url = old.getLink();
//如果from == 2,取ImgUrl
if(from==2){
url = old.getImgUrl();
}
}
if (type == 5) {
fileType = QywxMediaTypeEnum.FILE;
......@@ -208,11 +212,6 @@ public class MaterialServiceImpl implements MaterialService {
url = entity.getImgUrl() ;
}
String[] arr = null ;
//空指针异常处理
if (url == null){
logger.info("url不存在!");
return jp;
}
if(url.contains("?")) {
arr = url.split("\\?")[0].split("/") ;
}else {
......
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