Skip to content

Commit 854b50b

Browse files
committed
🎨 修复日志代码报错问题
1 parent 2d8d1df commit 854b50b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import com.google.gson.GsonBuilder;
3131
import lombok.Getter;
3232
import lombok.Setter;
33+
import lombok.extern.slf4j.Slf4j;
3334
import me.chanjar.weixin.common.error.WxRuntimeException;
3435
import org.apache.commons.lang3.StringUtils;
3536
import org.apache.commons.lang3.reflect.ConstructorUtils;
@@ -59,6 +60,7 @@
5960
*
6061
* @author <a href="https://github.com/binarywang">Binary Wang</a>
6162
*/
63+
@Slf4j
6264
public abstract class BaseWxPayServiceImpl implements WxPayService {
6365
private static final String TOTAL_FUND_COUNT = "资金流水总笔数";
6466

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/WxPayServiceApacheHttpImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ public String requestV3(String url, HttpRequestBase httpRequest) throws WxPayExc
198198
JsonObject jsonObject = GsonParser.parse(responseString);
199199
throw convertException(jsonObject);
200200
} catch (Exception e) {
201-
this.log.error("\n【请求地址】:{}\n【异常信息】:{}", url, e.getMessage());
201+
log.error("\n【请求地址】:{}\n【异常信息】:{}", url, e.getMessage());
202202
throw (e instanceof WxPayException) ? (WxPayException) e : new WxPayException(e.getMessage(), e);
203203
} finally {
204204
httpRequest.releaseConnection();
@@ -344,7 +344,7 @@ private void initSSLContext(HttpClientBuilder httpClientBuilder) throws WxPayExc
344344
}
345345

346346
private WxPayException convertException(JsonObject jsonObject) {
347-
//todo 这里考虑使用新的适用于V3的异常
347+
//TODO 这里考虑使用新的适用于V3的异常
348348
JsonElement codeElement = jsonObject.get("code");
349349
String code = codeElement == null ? null : codeElement.getAsString();
350350
String message = jsonObject.get("message").getAsString();

0 commit comments

Comments
 (0)