Browse Source

修改循环依赖的问题

gaohp 10 months ago
parent
commit
d50a4adb56

+ 1 - 0
feifan-module-pay/feifan-module-pay-biz/src/main/java/cn/newfeifan/mall/module/pay/service/wallet/PayWalletServiceImpl.java

@@ -37,6 +37,7 @@ public class PayWalletServiceImpl implements  PayWalletService {
     @Resource
     private PayWalletMapper walletMapper;
     @Resource
+    @Lazy
     private PayWalletTransactionService walletTransactionService;
     @Resource
     @Lazy

+ 2 - 0
feifan-module-pay/feifan-module-pay-biz/src/main/java/cn/newfeifan/mall/module/pay/service/wallet/PayWalletTransactionServiceImpl.java

@@ -12,6 +12,7 @@ import cn.newfeifan.mall.module.pay.dal.redis.no.PayNoRedisDAO;
 import cn.newfeifan.mall.module.pay.enums.wallet.PayWalletBizTypeEnum;
 import cn.newfeifan.mall.module.pay.service.wallet.bo.WalletTransactionCreateReqBO;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.validation.annotation.Validated;
 
@@ -38,6 +39,7 @@ public class PayWalletTransactionServiceImpl implements PayWalletTransactionServ
     private static final String WALLET_NO_PREFIX = "W";
 
     @Resource
+    @Lazy
     private PayWalletService payWalletService;
     @Resource
     private PayWalletTransactionMapper payWalletTransactionMapper;