From 14857a20b20a636a952375e064cf72f88296911d Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期五, 01 三月 2024 15:20:44 +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