Commit da5425da2f5a9619d878a4734d70a43e5601f4de

Authored by YunaiV
1 parent 5380e210

【修复】pay:PayWalletServiceImpl 可能存在的循环依赖问题

【修复】system:dev 配置文件,缺少 WECHAT_MINI_APP 配置项~
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 {
36 36  
37 37 @Resource
38 38 private PayWalletMapper walletMapper;
  39 +
39 40 @Resource
  41 + @Lazy // 延迟加载,避免循环依赖
40 42 private PayWalletTransactionService walletTransactionService;
41 43 @Resource
42   - @Lazy
  44 + @Lazy // 延迟加载,避免循环依赖
43 45 private PayOrderService orderService;
44 46 @Resource
45   - @Lazy
  47 + @Lazy // 延迟加载,避免循环依赖
46 48 private PayRefundService refundService;
47 49  
48 50 @Override
... ...
yudao-server/src/main/resources/application-dev.yaml
... ... @@ -198,6 +198,16 @@ justauth:
198 198 client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
199 199 agent-id: 1000004
200 200 ignore-check-redirect-uri: true
  201 + # noinspection SpringBootApplicationYaml
  202 + WECHAT_MINI_APP: # 微信小程序
  203 + client-id: ${wx.miniapp.appid}
  204 + client-secret: ${wx.miniapp.secret}
  205 + ignore-check-redirect-uri: true
  206 + ignore-check-state: true # 微信小程序,不会使用到 state,所以不进行校验
  207 + WECHAT_MP: # 微信公众号
  208 + client-id: ${wx.mp.app-id}
  209 + client-secret: ${wx.mp.secret}
  210 + ignore-check-redirect-uri: true
201 211 cache:
202 212 type: REDIS
203 213 prefix: 'social_auth_state:' # 缓存前缀,目前只对 Redis 缓存生效,默认 JUSTAUTH::STATE::
... ...
yudao-server/src/main/resources/application-local.yaml
... ... @@ -254,6 +254,7 @@ justauth:
254 254 client-secret: 1wTb7hYxnpT2TUbIeHGXGo7T0odav1ic10mLdyyATOw
255 255 agent-id: 1000004
256 256 ignore-check-redirect-uri: true
  257 + # noinspection SpringBootApplicationYaml
257 258 WECHAT_MINI_APP: # 微信小程序
258 259 client-id: ${wx.miniapp.appid}
259 260 client-secret: ${wx.miniapp.secret}
... ...