From 260dd6fe156265832544715192ce1491e9c2afd6 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期五, 26 六月 2026 13:41:13 +0800
Subject: [PATCH] fix(stock): 解决库存管理中的重复键异常问题 - 在采购台账服务中添加净合同金额字段设置 - 在销售台账服务中添加净合同金额字段设置 - 在入库记录服务中为库存插入操作添加重复键异常处理 - 在入库记录服务中为非库存插入操作添加重复键异常处理 - 在库存服务中为库存插入操作添加重复键异常处理 - 统一处理数据库唯一键约束冲突,避免系统错误
---
src/main/java/com/ruoyi/basic/service/impl/CustomerFollowUpServiceImpl.java | 14 ++++++--------
1 files changed, 6 insertions(+), 8 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 12c7e06..7946753 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;
@@ -44,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)
@@ -132,7 +130,7 @@
}
List<CustomerFollowUp> followUps = list(new LambdaQueryWrapper<CustomerFollowUp>()
- .eq(CustomerFollowUp::getCustomerPrivatePoolId, customerId));
+ .eq(CustomerFollowUp::getCustomerId, customerId));
if (followUps != null && !followUps.isEmpty()) {
for (CustomerFollowUp followUp : followUps) {
--
Gitblit v1.9.3