From da5425da2f5a9619d878a4734d70a43e5601f4de Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 24 Apr 2024 12:53:30 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91pay?= =?UTF-8?q?=EF=BC=9APayWalletServiceImpl=20=E5=8F=AF=E8=83=BD=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E7=9A=84=E5=BE=AA=E7=8E=AF=E4=BE=9D=E8=B5=96=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20=E3=80=90=E4=BF=AE=E5=A4=8D=E3=80=91system=EF=BC=9A?= =?UTF-8?q?dev=20=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=EF=BC=8C=E7=BC=BA?= =?UTF-8?q?=E5=B0=91=20WECHAT=5FMINI=5FAPP=20=E9=85=8D=E7=BD=AE=E9=A1=B9~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pay/service/wallet/PayWalletServiceImpl.java | 6 ++++-- yudao-server/src/main/resources/application-dev.yaml | 10 ++++++++++ yudao-server/src/main/resources/application-local.yaml | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletServiceImpl.java index 036d73d04..58c36c312 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletServiceImpl.java @@ -36,13 +36,15 @@ public class PayWalletServiceImpl implements PayWalletService { @Resource private PayWalletMapper walletMapper; + @Resource + @Lazy // 延迟加载,避免循环依赖 private PayWalletTransactionService walletTransactionService; @Resource - @Lazy + @Lazy // 延迟加载,避免循环依赖 private PayOrderService orderService; @Resource - @Lazy + @Lazy // 延迟加载,避免循环依赖 private PayRefundService refundService; @Override diff --git a/yudao-server/src/main/resources/application-dev.yaml b/yudao-server/src/main/resources/application-dev.yaml index 8caf15b08..91ea2b2a7 100644 --- a/yudao-server/src/main/resources/application-dev.yaml +++ b/yudao-server/src/main/resources/application-dev.yaml @@ -198,6 +198,16 @@ justauth: client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw agent-id: 1000004 ignore-check-redirect-uri: true + # noinspection SpringBootApplicationYaml + WECHAT_MINI_APP: # 微信小程序 + client-id: ${wx.miniapp.appid} + client-secret: ${wx.miniapp.secret} + ignore-check-redirect-uri: true + ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验 + WECHAT_MP: # 微信公众号 + client-id: ${wx.mp.app-id} + client-secret: ${wx.mp.secret} + ignore-check-redirect-uri: true cache: type: REDIS prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE:: diff --git a/yudao-server/src/main/resources/application-local.yaml b/yudao-server/src/main/resources/application-local.yaml index 89a037830..c08317115 100644 --- a/yudao-server/src/main/resources/application-local.yaml +++ b/yudao-server/src/main/resources/application-local.yaml @@ -254,6 +254,7 @@ justauth: client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw agent-id: 1000004 ignore-check-redirect-uri: true + # noinspection SpringBootApplicationYaml WECHAT_MINI_APP: # 微信小程序 client-id: ${wx.miniapp.appid} client-secret: ${wx.miniapp.secret}