From 5b99c8021cc7790eb29d9632fd52ac220a60a2cb Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期三, 28 二月 2024 18:54:19 +0800
Subject: [PATCH] 修改间距,客户新增

---
 north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java b/north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java
index d575958..9c04b4b 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java
@@ -44,9 +44,11 @@
         try {
             Customer customer = JSONObject.parseObject(JSONObject.toJSONString(object.get("customer")), Customer.class);
            if(customer!=null){
-               if (customer.getId()!=null){
+               if (customer.getId()!=null && customer.getId()!=0){
+                   System.out.println(111);
                    customerMapper.updateCustomer(customer);
                }else{
+                   System.out.println(222);
                    customerMapper.insertCustomer(customer);
                }
 

--
Gitblit v1.8.0