From a0c9adb1e44f502c0473e9aafb7545981173b130 Mon Sep 17 00:00:00 2001
From: buhuazhen <hua100783@gmail.com>
Date: 星期三, 25 三月 2026 13:19:32 +0800
Subject: [PATCH] refactor(customer): 注释Excel导出相关字段及优化批量导入逻辑
---
src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java b/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java
index 58810c9..3c8327a 100644
--- a/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java
+++ b/src/main/java/com/ruoyi/basic/service/impl/CustomerServiceImpl.java
@@ -29,6 +29,7 @@
import com.ruoyi.sales.pojo.SalesLedger;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
+import org.springframework.aop.framework.AopContext;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -191,6 +192,11 @@
LoginUser loginUser = SecurityUtils.getLoginUser();
Long tenantId = loginUser.getTenantId();
customer.setTenantId(tenantId);
+ customer.setTaxpayerIdentificationNumber("");
+ customer.setCompanyAddress("");
+ customer.setCompanyPhone("");
+ customer.setMaintainer("");
+ customer.setMaintenanceTime(new Date());
return customerMapper.insert(customer);
}
@@ -251,7 +257,11 @@
if (CollectionUtils.isEmpty(userList)) {
return AjaxResult.warn("妯℃澘閿欒鎴栧鍏ユ暟鎹负绌�");
}
- this.saveOrUpdateBatch(userList);
+ ICustomerService proxy = (ICustomerService) AopContext.currentProxy();
+ for (Customer customer : userList) {
+ proxy.insertCustomer(customer);
+ }
+// this.saveOrUpdateBatch(userList);
return AjaxResult.success(true);
} catch (Exception e) {
e.printStackTrace();
--
Gitblit v1.9.3