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); + } } }