From 854b50bd5164f9cb6c77cd04e763b846ed1bf78f Mon Sep 17 00:00:00 2001 From: Binary Wang Date: Tue, 29 Apr 2025 11:33:46 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BF=AE=E5=A4=8D=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java | 2 ++ .../wxpay/service/impl/WxPayServiceApacheHttpImpl.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java index c5bab0126..3a63f0d7f 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java @@ -30,6 +30,7 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; import lombok.Getter; import lombok.Setter; +import lombok.extern.slf4j.Slf4j; import me.chanjar.weixin.common.error.WxRuntimeException; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.reflect.ConstructorUtils; @@ -59,6 +60,7 @@ import static com.github.binarywang.wxpay.constant.WxPayConstants.TarType; * * @author Binary Wang */ +@Slf4j public abstract class BaseWxPayServiceImpl implements WxPayService { private static final String TOTAL_FUND_COUNT = "资金流水总笔数"; diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceApacheHttpImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceApacheHttpImpl.java index e40c92a19..dcd70b523 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceApacheHttpImpl.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceApacheHttpImpl.java @@ -198,7 +198,7 @@ public class WxPayServiceApacheHttpImpl extends BaseWxPayServiceImpl { JsonObject jsonObject = GsonParser.parse(responseString); throw convertException(jsonObject); } catch (Exception e) { - this.log.error("\n【请求地址】:{}\n【异常信息】:{}", url, e.getMessage()); + log.error("\n【请求地址】:{}\n【异常信息】:{}", url, e.getMessage()); throw (e instanceof WxPayException) ? (WxPayException) e : new WxPayException(e.getMessage(), e); } finally { httpRequest.releaseConnection(); @@ -344,7 +344,7 @@ public class WxPayServiceApacheHttpImpl extends BaseWxPayServiceImpl { } private WxPayException convertException(JsonObject jsonObject) { - //todo 这里考虑使用新的适用于V3的异常 + //TODO 这里考虑使用新的适用于V3的异常 JsonElement codeElement = jsonObject.get("code"); String code = codeElement == null ? null : codeElement.getAsString(); String message = jsonObject.get("message").getAsString();