danchaofan1412 3 лет назад
Родитель
Сommit
011142216f

+ 3 - 2
framework-common/src/main/java/com/mrxu/framework/common/weixin/base/WxHttp.java

@@ -3,6 +3,7 @@ package com.mrxu.framework.common.weixin.base;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.mrxu.framework.common.util.BusinessException;
 import com.mrxu.framework.common.util.HttpUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -25,7 +26,7 @@ public class WxHttp {
 		}
 		T wxRs = JSON.parseObject(rs, clazz);
 		if(!wxRs.isSuccess()) {
-			throw new RuntimeException(wxRs.getErrmsg());
+			throw new BusinessException(wxRs.getErrmsg());
 		}
 		return wxRs;
     }
@@ -44,7 +45,7 @@ public class WxHttp {
 		}
 		T wxRs = JSON.parseObject(rs, clazz);
 		if(!wxRs.isSuccess()) {
-			throw new RuntimeException(wxRs.getErrmsg());
+			throw new BusinessException(wxRs.getErrmsg());
 		}
         return wxRs;
     }