From 6518050093fe8f36b603a7fef9d4683813a91645 Mon Sep 17 00:00:00 2001
From: chenhj <1263187585@qq.com>
Date: 星期三, 22 四月 2026 14:57:30 +0800
Subject: [PATCH] 修复循环依赖
---
src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpServiceImpl.java | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpServiceImpl.java b/src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpServiceImpl.java
index 4fd252c..29013d3 100644
--- a/src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpServiceImpl.java
+++ b/src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpServiceImpl.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.basic.dto.CustomerFollowUpDto;
+import com.ruoyi.basic.dto.CustomerFollowUpFileDto;
import com.ruoyi.basic.mapper.CustomerFollowUpMapper;
import com.ruoyi.basic.pojo.CustomerFollowUp;
import com.ruoyi.basic.pojo.CustomerFollowUpFile;
@@ -11,13 +12,11 @@
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.basic.dto.CustomerFollowUpFileDto;
import com.ruoyi.project.system.domain.SysUser;
import com.ruoyi.project.system.service.ISysUserService;
-
+import lombok.RequiredArgsConstructor;
import org.apache.commons.io.FilenameUtils;
import org.springframework.beans.BeanUtils;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -30,6 +29,7 @@
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
import java.util.UUID;
@@ -43,16 +43,15 @@
* @since 2026/03/04 14:48
*/
@Service
+@RequiredArgsConstructor
public class CustomerFollowUpServiceImpl extends ServiceImpl<CustomerFollowUpMapper, CustomerFollowUp> implements CustomerFollowUpService {
- @Autowired
- private CustomerFollowUpFileService customerFollowUpFileService;
+ private final CustomerFollowUpFileService customerFollowUpFileService;
@Value("${file.upload-dir}")
private String uploadDir;
- @Autowired
- private ISysUserService sysUserService;
+ private final ISysUserService sysUserService;
@Override
@Transactional(rollbackFor = Exception.class)
@@ -131,7 +130,7 @@
}
List<CustomerFollowUp> followUps = list(new LambdaQueryWrapper<CustomerFollowUp>()
- .eq(CustomerFollowUp::getCustomerId, customerId));
+ .eq(CustomerFollowUp::getCustomerPrivatePoolId, customerId));
if (followUps != null && !followUps.isEmpty()) {
for (CustomerFollowUp followUp : followUps) {
@@ -141,7 +140,7 @@
}
@Override
- public List<CustomerFollowUpFile> getFollowUpFilesByIds(List<Long> fileIds) {
+ public List<CustomerFollowUpFile> getFollowUpFilesByIds(Collection<Long> fileIds) {
if (fileIds == null || fileIds.isEmpty()) {
return new ArrayList<>(0);
}
--
Gitblit v1.9.3