From f028b02ddba8c5d6b00245640d0a382541efa820 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期二, 10 三月 2026 09:19:27 +0800
Subject: [PATCH] refactor(service): 优化依赖注入方式

---
 src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpFileServiceImpl.java              |    6 +++++-
 src/main/java/com/ruoyi/projectManagement/service/impl/handle/ContractInfoHandleService.java |    5 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpFileServiceImpl.java b/src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpFileServiceImpl.java
index f0e4716..54b4af0 100644
--- a/src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpFileServiceImpl.java
+++ b/src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpFileServiceImpl.java
@@ -11,6 +11,8 @@
 import com.ruoyi.basic.service.CustomerFollowUpService;
 import com.ruoyi.common.vo.SimpleFileVo;
 import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 
 import java.util.*;
@@ -31,7 +33,9 @@
 @RequiredArgsConstructor
 public class CustomerFollowUpFileServiceImpl extends ServiceImpl<CustomerFollowUpFileMapper, CustomerFollowUpFile> implements CustomerFollowUpFileService {
 
-    private final CustomerFollowUpService customerFollowUpService;
+    @Autowired
+    @Lazy
+    private CustomerFollowUpService customerFollowUpService;
 
 
     @Override
diff --git a/src/main/java/com/ruoyi/projectManagement/service/impl/handle/ContractInfoHandleService.java b/src/main/java/com/ruoyi/projectManagement/service/impl/handle/ContractInfoHandleService.java
index 899bbf3..18bdc96 100644
--- a/src/main/java/com/ruoyi/projectManagement/service/impl/handle/ContractInfoHandleService.java
+++ b/src/main/java/com/ruoyi/projectManagement/service/impl/handle/ContractInfoHandleService.java
@@ -5,6 +5,7 @@
 import com.ruoyi.projectManagement.mapper.ContractInfoMapper;
 import com.ruoyi.projectManagement.pojo.ContractInfo;
 import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -17,11 +18,11 @@
  * @email 3038525872@qq.com
  */
 @Component
-@RequiredArgsConstructor
 @Transactional(rollbackFor = Exception.class,readOnly = true)
 public class ContractInfoHandleService{
 
-    private final ContractInfoMapper contractInfoMapper;
+    @Autowired
+    private ContractInfoMapper contractInfoMapper;
 
     @Transactional(rollbackFor = Exception.class)
     public void save(@Nullable Long id, @NotNull ContractInfoDto contractInfoDto) {

--
Gitblit v1.9.3