From dd24d8acd180f7643c00758984824a621b56d495 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 12 三月 2026 14:29:59 +0800
Subject: [PATCH] 删除员工台账或者离职信息后,对应的打卡记录也删除

---
 src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpFileServiceImpl.java |   10 +++++++---
 1 files changed, 7 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 6d4d4e5..628dcb4 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.*;
@@ -28,10 +30,11 @@
  * @since 2026/03/04 14:53
  */
 @Service
-@RequiredArgsConstructor
 public class CustomerFollowUpFileServiceImpl extends ServiceImpl<CustomerFollowUpFileMapper, CustomerFollowUpFile> implements CustomerFollowUpFileService {
 
-    private final CustomerFollowUpService customerFollowUpService;
+    @Autowired
+    @Lazy
+    private CustomerFollowUpService customerFollowUpService;
 
 
     @Override
@@ -64,7 +67,8 @@
             if (StrUtil.isNotBlank(attachmentIds)) {
                 List<SimpleFileVo> fileVos = Arrays.stream(attachmentIds.split(","))
                         .map(Long::valueOf)
-                        .map(it->collectMap.getOrDefault(it, (SimpleFileVo) Collections.emptyList()))
+                        .map(it->collectMap.getOrDefault(it, null))
+                        .filter(Objects::nonNull)
                         .collect(Collectors.toList());
                 setAttachmentList.accept(t, fileVos);
             }

--
Gitblit v1.9.3