From 90d77acff0450347bc8ac5bb20b2a76bf2eafac9 Mon Sep 17 00:00:00 2001 From: Caps <452713115@qq.com> Date: Mon, 27 Apr 2020 21:18:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E7=AE=A1=E7=90=86=E9=9B=B6?= =?UTF-8?q?=E5=94=AE=E5=85=AC=E5=8F=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/kiisoo/ic/customer/CustomerService.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/kiisoo/ic/customer/CustomerService.java b/src/main/java/com/kiisoo/ic/customer/CustomerService.java index f4aab58..6f3abff 100644 --- a/src/main/java/com/kiisoo/ic/customer/CustomerService.java +++ b/src/main/java/com/kiisoo/ic/customer/CustomerService.java @@ -246,7 +246,7 @@ public class CustomerService { opVip1.setPhone(turnBackDTO.getVipData().getPhone()); opVip1.setName(turnBackDTO.getVipData().getName()); opVip1.setBirthday(turnBackDTO.getVipData().getBirthday()); - opVip1.setRegisterTime(simpleDateFormat.parse(turnBackDTO.getVipData().getRegisterTime())); + opVip1.setRegisterTime(turnBackDTO.getVipData().getRegisterTime().equals("") ? new Date() : simpleDateFormat.parse(turnBackDTO.getVipData().getRegisterTime())); if(opVip == null){ //数据库没有这个数据--新建数据 opVip1.setCreateBy(Constants.SYS_OPERATION); @@ -316,6 +316,7 @@ public class CustomerService { insertRelation.setUpdateTime(new Date()); insertRelation.setCustomerId(opCustomer.getId()); insertRelation.setStoreId(shopId); + insertRelation.setUserId(0L); insertRelation.setCreateBy(Constants.SYS_OPERATION); insertRelation.setUpdateBy(Constants.SYS_OPERATION); @@ -330,7 +331,11 @@ public class CustomerService { //无效 insertRelation.setType(2); } - opSellerCustomerRelationDOMapper.insert(insertRelation); + try { + opSellerCustomerRelationDOMapper.insert(insertRelation); + }catch (Exception e){ + log.error("",e); + } } }